Catalog
pydantic/logfire-setup

pydantic

logfire-setup

Entry point for Pydantic Logfire — an observability, monitoring, and evals platform. Use this skill when the user asks to "set up Logfire", "add Logfire to my project", "get me set up properly with Logfire", "send as much data as would be useful", mentions Logfire without a specific scope, or their request spans more than one of instrumenting application code / monitoring infrastructure / evaluating AI behavior. If the request is clearly scoped to exactly one of those, fetch that specific skill directly instead of this one — this skill exists to route, not to duplicate their content.

v1.0LATEST
NewUpdated Oct 13, 2026

Set Up Logfire

Logfire is an observability platform built on OpenTelemetry, with several distinct product surfaces. This skill authenticates, orients, and routes you to the specific skill for the surface you actually need — don't try to cover install/instrument/verify detail from within this file.

Keep the user informed with short updates, but proceed through ordinary, reversible setup without asking approval — no clean tree, branch, commits, or plan needed, and no commands the user could run only because you chose not to. Pause only for: browser auth, a genuinely ambiguous app/project after inspection, materially increasing production telemetry or cost, deploy/infra changes, or destructive/unrelated work — then ask one concrete question. Never report a check, a score, or a run as verified without having actually confirmed it in this session.

Step 1: Authenticate and Select the Exact Project

Auth comes first because everything after it depends on having a valid, confirmed connection to the exact right Logfire project: instrumenting or inspecting the repo before that is either wasted if the connection turns out wrong, or worse, ends up silently wired to the wrong project. Do not open, read, or run any project file until whoami confirms you're authenticated to the right project — nothing about this step requires knowing what's in the repo yet.

Use Authenticate and Select the Exact Project 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
Infrastructure monitoring Hosts, Docker, Kubernetes, database/queue/cache servers, cloud-provider metrics — no application code logfire-infrastructure
Evals Set up and run AI/agent evaluations against test-case datasets in Python or Node.js logfire-evals
Querying telemetry Search traces/logs/spans/metrics, summarize errors, find root cause logfire-query
Live UI Open project pages, the live view, trace links, or the Explore page in a browser logfire-ui
Feature flags Runtime-managed variables (logfire.var(), logfire.template_var()) no dedicated skill yet — see the product's own docs
AI Gateway Spend caps, failover, and routing for model calls (logfire gateway) no dedicated skill yet — see the product's own docs
  • No specific scope given (e.g. "set up Logfire in this repo end to end")? Default to logfire-instrumentation for ordinary application code. Incidental Docker, Kubernetes, infrastructure, or eval files do not expand the initial setup: get one representative application service to verified first data, then offer the matching additional skill(s). If the repository is clearly infrastructure-only, route directly to logfire-infrastructure instead.
  • 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)

Fetch the skill(s) identified in Step 2 now, for the actual install/instrument/verify steps. Each one's own authenticate step still runs its own whoami check first — that's what confirms it's the same project and region resolved here, not an assumption carried over — and only then skips the rest of its auth commands. They're independently fetchable on purpose, so this composes whether someone reaches a specific skill through this hub or on its own.

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.

Files1
1 files · 1.1 KB

Select a file to preview

Overall Score

84/100

Grade

B

Good

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

Safety

82

Quality

88

Clarity

85

Completeness

78

Summary

This is a routing and authentication skill for Pydantic Logfire, an observability platform built on OpenTelemetry. It guides agents through authenticating to the correct Logfire project, understanding the repository structure, and routing users to specialized downstream skills (instrumentation, infrastructure monitoring, evals, querying, or UI) based on their specific needs.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Credential Exposure
SEC-022SSH/Credentials File AccessMax: B

SSH key or credentials file access

SKILL.mdcredentials.json

Detected Capabilities

authenticated API requestshell command execution (whoami, CLI)file reading (AGENTS.md, README.md, package.json inspection)credentials file access (logfire_credentials.json)environment variable usagebrowser authentication redirectHTTP requests to Pydantic domain

Trigger Keywords

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

set up logfirelogfire authenticationlogfire project setuplogfire instrumentation routingpydantic logfire onboarding

Risk Signals

WARNING

SEC-022: Reads credentials.json token key to hand write token to non-native-SDK applications

SKILL.md | Step 3 and auth.md reference

Referenced Domains

External domains referenced in skill content, detected by static analysis.

pydantic.dev

Use Cases

  • Set up Logfire observability in a new project
  • Authenticate to the correct Logfire project before instrumentation
  • Determine whether to use app instrumentation, infrastructure monitoring, or evals skills
  • Route users to the appropriate Logfire skill based on their use case
  • Verify Logfire authentication and project selection before downstream work

Quality Notes

  • Excellent routing architecture: clearly distinguishes five product surfaces (instrumentation, infrastructure, evals, querying, UI) with explicit decision table and skill references
  • Strong security posture: explicitly forbids logging/echoing/committing tokens; acknowledges credentials file access only for programmatic token extraction, never for display
  • Clear auth-first philosophy: prevents wasted work by confirming project/region before any repo inspection or instrumentation
  • Well-documented decision tree: Step 2 table with condition-to-skill mapping eliminates ambiguity about which skill to fetch next
  • Appropriate use of pausing criteria: distinguishes between reversible setup (proceed without approval) and materially risky operations (browser auth, deploy/infra, destructive work)
  • Good guardrails on agent behavior: 'no commands the user could run only because you chose not to' prevents over-automation
  • Verified confirmation requirement: explicitly forbids reporting checks as verified without session-level confirmation — prevents silent failure
  • Single external domain referenced (pydantic.dev) for all skill/doc fetches — centralized and auditable
Model: claude-haiku-4-5-20251001Analyzed: Oct 13, 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-setup in your dev environment

Command Palette

Search for a command to run...