К основному содержанию
скилл CX Codex

logfire-setup — скилл для Claude Code: маршрутизация настройки Logfire

Разбирает широкий запрос «настрой мне Logfire» и отправляет агента к нужному специалисту: инструментация приложения, инфраструктура, evals, фронтенд, Gateway.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add pydantic/skills --skill logfire-setup -a claude-code
Открыть на GitHub

Что делает logfire-setup

Скилл нужен, когда вы просите агента подключить Pydantic Logfire, но не уточняете, что именно мониторить. Он читает AGENTS.md, CLAUDE.md и README.md, смотрит на язык, рантайм и пакетный менеджер, а потом по таблице выбирает подходящий специализированный скилл: logfire-instrumentation, logfire-frontend, logfire-infrastructure, logfire-evals, logfire-query, logfire-ui, logfire-gateway или logfire-coding-agents.

Перед этим он подтверждает проект через whoami и выводит цель CLI из вашего Logfire URL. Для JS/TS-проектов без uv берётся npm-вариант с внешним префиксом вместо обычного npx, потому что npx может запустить локальный бинарник из репозитория. Если запрос уже сужен до одной поверхности, скилл сразу грузит нужного специалиста и не трогает остальную таблицу.

Обычную обратимою настройку он проходит сам, без запроса подтверждения на каждый шаг. Пауза и один конкретный вопрос — при авторизации в браузере, неоднозначности проекта, заметном росте расходов или объёма телеметрии, изменениях инфраструктуры и деплоя. Токены нигде не печатает и не коммитит; исключение — программное чтение ключа token из .logfire/logfire_credentials.json, чтобы передать его приложению без нативного SDK.

Какие задачи решает

  • подключить Logfire к проекту, когда непонятно, с какой поверхности начать
  • выбрать между инструментацией приложения и инфраструктурным мониторингом
  • настроить сбор трейсов, логов и метрик из кода на Python, JS/TS или Rust
  • развернуть evals для AI-агента на датасете тест-кейсов
  • подключить браузерные ошибки, RUM и Web Vitals

Примеры запросов агенту

  • настрой мне Logfire в этом проекте
  • добавь Logfire и отправляй столько данных, сколько будет полезно
  • подключи Logfire к моему проекту

Как установить logfire-setup

1Через Skills CLI (Vercel)

npx skills add pydantic/skills --skill logfire-setup -a claude-code

2Вручную: положить файлы

~/.claude/skills/logfire-setup/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/logfire-setup/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора12

logfire-instrumentation Встраивает наблюдаемость Pydantic Logfire в код на Python, JS/TS или Rust. Добавляет трейсы, структурированные логи, метрики и спаны AI-агентов без потери данных. CX Codex +1 2 300установок pydantic Скилл для работы с Pydantic: подсказывает, как описывать модели, ограничения полей и валидаторы, когда агенту нужно разобрать внешние данные. CX Codex +1 2 200установок logfire-query Выполняет SQL-запросы к телеметрии Logfire прямо через агента. Скилл нужен для поиска медленных спанов, группировки исключений и расчёта метрик. CX Codex +1 1 900установок logfire-ui Открывает экраны Logfire, трейсы и живой просмотр в браузере без предварительных запросов к телеметрии. CX Codex +1 1 600установок logfire-evals Прогоняет офлайн-оценки Python и Node.js, разбирает отчёты в Logfire и перенаправляет существующие наборы Braintrust. CX Codex +1 554установок migrating-langchain-to-pydantic-ai Скилл для переноса Python-приложений с LangChain, LangGraph и Deep Agents на Pydantic AI. Пригодится, когда нужно сохранить поведение, а не форму фреймворка. CX Codex +1 314установок migrating-vercel-ai-sdk-and-eve-to-pydantic-ai Переводит приложения на TypeScript Vercel AI SDK или Eve на Python с Pydantic AI. Полезен, когда нужно сохранить поведение, а не API исходника. CX Codex +1 306установок migrating-claude-agent-sdk-to-pydantic-ai Скилл ведёт миграцию Python-приложения с Claude Agent SDK на Pydantic AI. Нужен, когда в коде есть импорт claude_agent_sdk. CX Codex +1 308установок

Похожие

observability-and-instrumentation addyosmani Скилл учит агента добавлять структурированные логи, метрики и трейсы в код до деплоя. Пригодится при выпуске новых эндпоинтов, фоновых задач и интеграций. CX Codex +1 54 800установок opentelemetry grafana Скилл помогает подключить OpenTelemetry к приложению и отправить метрики, логи и трейсы в Grafana Cloud или свой Mimir, Loki, Tempo. CX Codex +1 6 100установок otel-instrumentation honeycombio Ставит OpenTelemetry SDK, добавляет кастомные спаны и атрибуты и отправляет данные в Honeycomb. Пригодится, когда нужно разобраться, где именно тормозит запрос. CX Codex +1 3 600установок otel-semantic-conventions dash0 Помогает выбирать и проверять атрибуты телеметрии по спецификации OpenTelemetry Semantic Conventions. Пригодится, когда нужно назвать атрибут правильно, а не выдумывать своё. CX Codex +1 700установок golang-observability-opentelemetry Claude MPM Team Скилл для инструментирования Go-сервисов: OpenTelemetry для распределённых трейсов, Prometheus для метрик, slog для структурных логов. CX Codex +1 409установок opentelemetry-net-instrumentation Aaronontheweb Скилл подсказывает, как расставлять трассировку, метрики и логи в .NET-коде по спецификации OpenTelemetry. Пригодится, когда добавляете телеметрию в библиотеку или приложение. CX Codex +1 408установок

Рядом в теме «DevOps и инфраструктура»

Всё по теме «DevOps и инфраструктура» →

Вопросы о logfire-setup

Как установить logfire-setup в Claude?

Выполните npx skills add pydantic/skills --skill logfire-setup -a claude-code. Скилл окажется в ~/.claude/skills/logfire-setup/SKILL.md.

Что делает logfire-setup?

Определяет, какую поверхность Logfire вы хотите настроить, и передаёт работу профильному скиллу — от инструментации приложения до Gateway и coding agents.

Чем этот скилл отличается от logfire-instrumentation?

logfire-setup — точка входа для запросов без конкретной области. Если вы уже назвали одну поверхность, например «мониторь мой Postgres», он сразу грузит соответствующего специалиста.

Исходный текст

SKILL.md · MIT
---
name: logfire-setup
description: Route broad requests to set up Pydantic Logfire across application instrumentation, infrastructure, evals, frontend observability, Gateway, or coding agents. Use for "set up Logfire", "add Logfire to my project", "get me set up properly with Logfire", "send as much data as would be useful", mentions of Logfire without specific scope, or multi-surface requests; use the matching specialist directly for an already scoped request.
---

# Set Up Logfire

Route each explicitly requested surface to its specialist below; leave installation
and verification to those specialists. Do not expand an otherwise scoped request.

Proceed through ordinary, reversible setup with short updates without asking
approval; no clean tree, branch, commits, or plan is required. Pause for browser
auth, unresolved app/project ambiguity, material production cost or telemetry
increases, deploy/infra changes, or destructive/unrelated work, then ask one
concrete question. Report only
verification observed in this session.

## Step 1: Authenticate and Select the Exact Project

If the request is already scoped to frontend observability, application Gateway,
coding-agent setup, querying, or opening the UI, load that specialist from the
table below first. Its credential requirements differ from ordinary SDK
instrumentation; do not create a project write token merely to route the request.

For ordinary SDK instrumentation, confirm the exact project with `whoami`
before inspecting or running application files.

Use [Authenticate and Select the Exact Project](https://pydantic.dev/.well-known/agent-skills/logfire-instrumentation/references/auth.md) to derive the CLI target from the supplied Logfire URL and run its target-aware `whoami` check with a verified CLI path — for JS/TS projects without `uv`, use the external-prefix npm fallback instead of plain `npx`, which can execute a repository-local binary. Skip to Step 2 if that already reports the right project and resolved `--region` or `--base-url` target; otherwise, continue through the full authentication and project-selection sequence there.


## Step 2: Understand the Repo

Read `AGENTS.md`/`CLAUDE.md`/`README.md` and skim the language, runtime, and package manager. Then match what you find against the table below to decide what to fetch next:

| Surface | Covers | Skill |
|---------|--------|-------|
| App instrumentation | Traces, logs, metrics, and AI/agent spans from application code — Python, JavaScript/TypeScript, Rust, or any OpenTelemetry language | [`logfire-instrumentation`](https://pydantic.dev/.well-known/agent-skills/logfire-instrumentation/SKILL.md) |
| Frontend observability | Browser errors, RUM, Web Vitals, and session replays | [`logfire-frontend`](https://pydantic.dev/.well-known/agent-skills/logfire-frontend/SKILL.md) |
| Infrastructure monitoring | Hosts, Docker, Kubernetes, database/queue/cache servers, cloud-provider metrics — no application code | [`logfire-infrastructure`](https://pydantic.dev/.well-known/agent-skills/logfire-infrastructure/SKILL.md) |
| Evals | Set up and run AI/agent evaluations against test-case datasets in Python or Node.js | [`logfire-evals`](https://pydantic.dev/.well-known/agent-skills/logfire-evals/SKILL.md) |
| Querying telemetry | Search traces/logs/spans/metrics, summarize errors, find root cause | [`logfire-query`](https://pydantic.dev/.well-known/agent-skills/logfire-query/SKILL.md) |
| Live UI | Open project pages, the live view, trace links, or the Explore page in a browser | [`logfire-ui`](https://pydantic.dev/.well-known/agent-skills/logfire-ui/SKILL.md) |
| Feature flags | Runtime-managed variables (`logfire.var()`, `logfire.template_var()`) | no dedicated skill yet — see the product's own docs |
| Application Gateway | Route an application's model calls through Pydantic AI Gateway | [`logfire-gateway`](https://pydantic.dev/.well-known/agent-skills/logfire-gateway/SKILL.md) |
| Coding agents | Record Claude/Codex sessions or configure coding-agent Gateway routing | [`logfire-coding-agents`](https://pydantic.dev/.well-known/agent-skills/logfire-coding-agents/SKILL.md) |

- With no specific scope, get one representative application service to verified first data. Incidental Docker/eval files do not expand the task. Route infrastructure-only repositories to `logfire-infrastructure`.
- A request already scoped to one surface ("monitor my Postgres server", "set up evals for this agent") → fetch that skill directly, skipping the rest of this table.
- Genuinely ambiguous between two adjacent surfaces (e.g. "watch my Postgres" could mean Collector-level infrastructure metrics or app-level query instrumentation)? Ask one clarifying question rather than guessing — loading the wrong skill wastes the user's time reading instructions for a job they didn't ask for.

## Step 3: Fetch the Right Skill(s)

Load the selected skill and follow its credential workflow. SDK specialists
verify the project with `whoami`; CLI specialists preserve prepared handoffs,
and query/UI skills can use existing native MCP access. Do not force one
authentication method across all surfaces.

Never print, log, hard-code, commit, or echo a token, in any of these skills, at any point. The one exception — reading `.logfire/logfire_credentials.json`'s `token` key programmatically to hand a non-native-SDK application its write token, never to display it — is in [auth.md](https://pydantic.dev/.well-known/agent-skills/logfire-instrumentation/references/auth.md#if-the-calling-skill-needs-a-write-token-not-just-a-cli-session).

© pydantic · MIT · pydantic/skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой