Catalog
pydantic/logfire-coding-agents

pydantic

logfire-coding-agents

Connect Claude Code or Codex itself to Logfire telemetry, or route a coding agent's model requests through Pydantic AI Gateway. Use for coding-session recording, capture policies, Gateway agent configuration, temporary proxy launches, status, or removal. Not for instrumenting an application or routing an application's model client.

v1.0LATEST
NewUpdated Oct 17, 2026

Connect Coding Agents to Logfire

Use the exact Rust CLI executable supplied by the handoff for every operation; examples call it logfire-cli. Preserve its region, organization, project, and data directory. Do not replace it with a package launcher or install a second exporter by hand. These commands require --beta.

Without a prepared handoff, follow native CLI connection. The same skill is distributed in the Logfire plugin; plugin installation alone does not supply a CLI session, project credential, or capture consent.

Distinguish three independent capabilities:

  • Telemetry: record the coding agent's activity in the selected project.
  • Gateway: route the agent's model requests through the organization's paid Gateway access. This does not enable telemetry.
  • MCP: let the agent query Logfire. MCP OAuth is owned by the agent's MCP client; CLI login or telemetry setup does not authenticate that client.

Honor the user's stated goal and agent. Ask only for missing choices; do not enable all three because the user asked to connect one. For application code, use instrumentation or the application Gateway skill instead.

Confirm the destination

A prepared handoff already selected the origin, organization, project, and local SDK credential: reuse those without repeating account commands or creating another write token. Otherwise follow the shared connection reference. Do not guess another project when access fails.

Keep account credentials out of prompts, logs, and child environments. Leave credential storage and settings writes to the CLI. If a saved helper will invoke this executable later, use a persistent installed path, not a temporary build or cache directory.

Choose the requested workflow

  • To observe Claude Code or Codex, read session telemetry.
  • To route coding-agent inference, read Gateway routing.
  • For both, configure telemetry first, then Gateway. Preserve each integration's destination and settings independently.

Do not launch another setup agent or a nested interactive coding session just to configure this one. Explain any required restart. Finish with the configured agent, destination, capture or routing choice, observed verification result, and one next action. Configuration is not proof of ingestion or inference.

Files5
5 files · 15.8 KB

Select a file to preview

Overall Score

83/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

85

Quality

82

Clarity

84

Completeness

78

Summary

This skill guides AI agents to connect coding environments (Claude Code or Codex) to Logfire telemetry/observability. It provides structured workflows for three independent capabilities: telemetry recording, Gateway routing for model requests, and MCP querying. The skill emphasizes credential handling best practices, scope distinction, and verification procedures.

Detected Capabilities

shell execution (logfire-cli commands)credential file management (.logfire directory)environment variable handling (LOGFIRE_API_KEY, LOGFIRE_MCP_TOKEN, CLAUDE_CONFIG_DIR)JSON output parsingOAuth session managementconfiguration read/write operations

Trigger Keywords

Phrases that agents use to match this skill to user intent.

connect claude to logfirelogfire telemetry setupgateway routing agentscoding session recordinglogfire cli configurationagent observability

Risk Signals

INFO

Direct credential file storage in OS credential store via `logfire-cli`

references/connection.md and references/gateway.md
INFO

Environment variable credential handling (LOGFIRE_API_KEY, LOGFIRE_TOKEN, LOGFIRE_MCP_TOKEN)

references/connection.md
INFO

Explicit instruction to omit credentials from child processes and logs

SKILL.md main body and references/connection.md
INFO

Absolute data directory paths required for persistent credential and configuration storage

Multiple reference files

Use Cases

  • Record Claude Code or Codex sessions in Logfire for observability
  • Route coding agent model requests through Pydantic AI Gateway with organization billing
  • Configure telemetry capture policies (metadata-only vs. full content)
  • Enable MCP access to Logfire from coding agents
  • Verify delivery of telemetry or Gateway routing after configuration
  • Remove or disable telemetry recording and Gateway routing from agents

Quality Notes

  • Excellent scope boundaries: skill explicitly distinguishes three independent capabilities (telemetry, Gateway, MCP) and warns against over-enabling
  • Strong security posture: repeatedly emphasizes keeping credentials out of prompts/logs, using OS credential stores, and relying on the CLI for secret management
  • Clear error handling: guidance on network errors, authentication failures, conflicts with existing exporters, and recovery steps
  • Comprehensive verification procedures: includes dry-run commands and guidance on verifying delivery vs. configuration success
  • Well-structured reference documentation: four separate markdown files for different workflows (telemetry, gateway, connection, application-gateway)
  • Good edge case coverage: addresses old configuration states requiring updates, conflicts with independent exporters, and handling of failed operations that may leave partial state
  • Clear separation of CLI vs. plugin responsibilities: distinguishes handoff scenarios from standalone skill invocation
  • Practical examples with absolute paths that require user confirmation before execution
  • Explicitly prohibits nested setup sessions and unsafe practices like deleting configuration files manually
Model: claude-haiku-4-5-20251001Analyzed: Oct 17, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use pydantic/logfire-coding-agents in your dev environment

Command Palette

Search for a command to run...