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

logfire-frontend — скилл для Claude Code: что делает и как установить

Скилл logfire-frontend для Claude Code настраивает телеметрию браузера и сессионные записи Pydantic Logfire в веб-приложениях на JavaScript и TypeScript.

MIT 237 установок ★ 156 обновлён 2026-10-16

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

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

Скилл подключает @pydantic/logfire-browser и @pydantic/logfire-session-replay, настраивая сбор ошибок, метрик Web Vitals и сессий в React, Vite и клиентской части Next.js. Агент проверяет точку входа браузера, выбирает профиль захвата трафика и настраивает маскирование конфиденциальных данных перед записью.

Для работы требуется фронтенд-токен и URL приложения из интерфейса Logfire, так как обычные серверные токены не подходят для клиентского кода. Сессионные записи находятся в статусе Early Access, поэтому агент проверяет доступность функции для организации.

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

  • настроить сбор ошибок в браузере
  • подключить запись сессий и RUM
  • ограничить объем телеметрии
  • проверить отправку спанов

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

  • Настрой логирование logfire-frontend для нашего React-приложения
  • Проверь отправку телеметрии и сессий через logfire-frontend
  • Включи минимальный захват ошибок в клиентской части Next.js

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

1Через Skills CLI (Vercel)

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

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

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

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

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

Вопросы о logfire-frontend

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

Выполните команды npx skills add pydantic/skills --skill logfire-frontend -a claude-code и обратитесь к файлу ~/.claude/skills/logfire-frontend/SKILL.md.

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

Скилл автоматизирует настройку фронтенд-наблюдаемости и сессионных записей Logfire в браузерных приложениях на JavaScript и TypeScript.

Что нужно для работы logfire-frontend?

Требуется фронтенд-приложение, созданное в панели Logfire, с региональным URL и ограниченным токеном для браузера.

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

SKILL.md · MIT
---
name: logfire-frontend
description: Set up and troubleshoot Pydantic Logfire frontend observability and session replays in JavaScript/TypeScript browser applications. Use for browser errors, RUM, Web Vitals, replay recording, privacy controls, or reducing browser telemetry volume. Supports browser entrypoints, React/Vite, and the client side of Next.js; use logfire-instrumentation for server-side telemetry.
---

# Set Up Frontend Observability and Session Replays

The application uses `@pydantic/logfire-browser` and, when replay is requested,
`@pydantic/logfire-session-replay`. Configure one browser provider; preserve an
existing OpenTelemetry provider, proxy, and application initialization pattern.

## Confirm the browser application

Read repository instructions, the application manifest, browser entrypoint,
router, and existing instrumentation. For Next.js, distinguish client code from
server instrumentation before changing either. Respect dependency constraints;
check the installed SDK's types before using a capture or sampling option.

Preserve the exact origin, organization, and project supplied by the user or
setup handoff. Browser-only setup does not require a CLI login, a local SDK
credential, or an ordinary project write token. Use existing native MCP access
for verification when available; otherwise use the Logfire UI.

Create or select the frontend application under **Frontend → Applications** and
use its generated regional URL and restricted frontend token. A normal project
write token, server environment variable, or `.logfire` credential is unsuitable
for browser code. The frontend application owns service identity. If no supported
public API/tool can manage it, use the UI; do not invent a private endpoint.

## Match capture to the request

Read [browser setup](./references/setup.md), then the applicable section of
[capture profiles](./references/capture-profiles.md):

- **Full frontend observability:** automatic page/request/interaction spans and
  Web Vitals. Add replay only when requested.
- **Errors and replays with automatic instrumentation:** retain traces with
  Logfire error-level events or OpenTelemetry error status, while keeping replay
  independently enabled. This also retains other spans in a qualifying trace.
- **Minimal errors and replays:** disable automatic spans and Web Vitals and
  explicitly report application errors. Use when the user requires lower browser
  instrumentation overhead or strictly limits the signals collected.

Preserve existing approved replay rates and masking. Trace sampling, replay
sampling, and metric capture are separate decisions. Do not promise that
`minLevel` filters automatic spans, that a trace sampler retains an entire browser
session, or that every handled application failure is captured automatically.

Session replay is Early Access; check availability for the target organization
and keep an existing application rollout flag. Mask text and inputs, leave
console capture off, and block sensitive regions before recording them. Review
attributes and URLs separately from visible-text masking. Add normalized route
templates and opaque user IDs only when useful; names and emails are optional
personal data.

## Verify the selected behavior

Use [verification and troubleshooting](./references/verification.md) to exercise
the real browser application, check the signals retained and omitted, query
fresh errors in the exact project, and play the matching recording. For a
sampling profile, test successful requests and the failure types the user cares
about; inspect actual exported spans rather than assuming how HTTP status maps
to error severity.

Run the application's normal typecheck/build and focused tests. Report browser
execution, telemetry ingestion, and replay playback separately. A successful
build, flush, upload response, or generated link does not prove all three.
Return the verified project/application, capture policy, and a clean relevant UI
link. If account reads or browser playback are unavailable, mark those parts
unverified and state what evidence is missing.

For server-side Node.js or Next.js setup, use
[application instrumentation](../logfire-instrumentation/SKILL.md).

© pydantic · MIT · pydantic/skills

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
Frontend Builder daffy0208 Скилл Frontend Builder задаёт ИИ-агенту правила вёрстки на React и Next.js: как дробить интерфейс на компоненты, где хранить состояние и когда тянуть данные через React Query. CX Codex +1 218установок frontend-patterns affaan-m Скилл frontend-patterns подсказывает паттерны для React и Next.js: компоненты, состояние, загрузка данных и производительность. Нужен при разработке и ревью интерфейса. CX Codex +1 7 900установок oma-frontend First Fluke Субагент oma-frontend для фронтенда на React, Next.js и TypeScript с архитектурой FSD-lite, shadcn/ui и design-tokens. Ставь, когда работаешь с UI, компонентами, страницами, стилями и клиентской логикой. CX Codex +1 ★ 1 472звёзд репо senior-frontend Alireza Rezvani Скилл senior-frontend помогает создавать React-компоненты, запускать проекты Next.js и проверять размер бандла. Пригодится при разработке интерфейса, аудите кода и настройке доступности. CX Codex +1 1 630установок encore-frontend encoredev Скилл encore-frontend связывает фронтенд на React, Next.js, Vue или Svelte с бэкендом Encore.ts: генерация типизированного клиента, CORS и токены авторизации. CX Codex +1 821установок frontend-developer rmyndharis Скилл frontend-developer для Claude Code помогает создавать интерфейсы на React и Next.js, исправлять проблемы с состоянием и доступностью. Задавайте ему задачи по компонентам, страницам и клиентским сценариям. CX Codex +1 257установок

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

Весь набор →
migrating-claude-agent-sdk-to-pydantic-ai Скилл migrating-claude-agent-sdk-to-pydantic-ai для Claude Code, Codex, Cursor, GitHub Copilot и Gemini CLI переводит Python-приложения с claude_agent_sdk на Pydantic AI. CX Codex +1 468установок migrating-mastra-to-pydantic-ai Скилл migrating-mastra-to-pydantic-ai для Claude Code и Codex переносит TypeScript-приложения на Mastra в Python с Pydantic AI. Срабатывает на коде с импортами @mastra/* или агентами, инструментами и воркфлоу Mastra. CX Codex +1 464установок migrating-agno-to-pydantic-ai Скилл migrating-agno-to-pydantic-ai для Claude Code переносит Python-приложения с Agno на Pydantic AI, трассируя реальный путь запроса и сохраняя HTTP-границы и инфраструктуру. CX Codex +1 463установок logfire-coding-agents Скилл logfire-coding-agents для Claude Code подключает сессии ИИ-агентов к телеметрии Logfire и настраивает маршрутизацию запросов моделей через Pydantic AI Gateway. CX Codex +1 239установок logfire-codex-connection Скилл logfire-codex-connection для Claude Code связывает Codex с Logfire, проверяет статус соединения и останавливает запись сессий. Включается при запросах на подключение к телеметрии и проверку статуса. CX Codex +1 235установок migrating-deep-agents-to-pydantic-ai-harness Скилл migrating-deep-agents-to-pydantic-ai-harness для Claude Code переносит Python-приложения LangChain Deep Agents на Pydantic AI и Pydantic AI Harness. Работает с контрактами middleware, памяти, субагентов и sandbox. CX Codex +1 234установок logfire-gateway Скилл logfire-gateway для Claude Code настраивает маршрутизацию запросов приложения к моделям через Pydantic AI Gateway. Активируется по просьбе подключить Gateway, его ключ или пример настройки провайдера. CX Codex +1 232установок pydantic-ai Плагин подсказывает Claude, как писать агентов на Pydantic AI: шаблоны, деревья решений и разбор типичных ошибок. ★ 156звёзд репо

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

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