Generated banner for Logfire Setup
Generated logo for Logfire Setup

Logfire Setup

PydanticOfficialPublished by Pydantic

  • Skill
  • Meta (authoring, orchestration, planning, memory)
  • Cloud and DevOps
  • MIT
  • No issues found

From the author

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.
— the description by Pydantic

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The logfire-setup skill acts as a central orchestrator for users looking to integrate Pydantic Logfire into their projects. It evaluates broad or multi-surface requests to determine the appropriate specialized skill for the task, such as application instrumentation, infrastructure monitoring, or AI evaluations. By analyzing the repository structure and the user's specific goals, it ensures that the correct specialist is loaded, preventing the unnecessary installation of irrelevant tools and ensuring that authentication and project selection are handled according to the specific requirements of the chosen surface.

What it does

  • Analyzes broad user requests to identify the required Logfire observability surface.
  • Routes tasks to specialized skills for application code, infrastructure, evals, or gateway integration.
  • Handles initial authentication and project verification using standard CLI checks.
  • Inspects repository structure to determine the appropriate language and runtime context.
  • Prevents the exposure of sensitive credentials during the setup process.
  • Provides a clear path for multi-surface observability setups.

When to use it

  • When you want to set up Logfire but are unsure which specific component or specialist to use.
  • When you have a multi-surface request involving both application code and infrastructure monitoring.
  • When you need to get started with Logfire and require guidance on the correct installation path.
  • When you have a general request like 'add Logfire to my project' without specifying a scope.

Advantages

  • Reduces complexity by routing users to the exact specialist needed for their specific use case.
  • Ensures secure authentication practices by following established credential workflows.
  • Saves time by avoiding the manual selection of tools for complex observability setups.
  • Maintains a consistent and verified setup process across different project types.

Usage examples

“Set up Logfire for my project.”
The agent will analyze your repository, identify the primary application service, and route you to the appropriate instrumentation specialist to begin verification.
“I need to monitor my Postgres server and my Python app with Logfire.”
The agent will recognize the multi-surface request and coordinate the loading of both infrastructure and application instrumentation specialists.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/pydantic/logfire-setup/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip logfire-setup.zip -d .agents/skills

Documentation by Pydantic

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 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:

SurfaceCoversSkill
App instrumentationTraces, logs, metrics, and AI/agent spans from application code — Python, JavaScript/TypeScript, Rust, or any OpenTelemetry languagelogfire-instrumentation
Frontend observabilityBrowser errors, RUM, Web Vitals, and session replayslogfire-frontend
Infrastructure monitoringHosts, Docker, Kubernetes, database/queue/cache servers, cloud-provider metrics — no application codelogfire-infrastructure
EvalsSet up and run AI/agent evaluations against test-case datasets in Python or Node.jslogfire-evals
Querying telemetrySearch traces/logs/spans/metrics, summarize errors, find root causelogfire-query
Live UIOpen project pages, the live view, trace links, or the Explore page in a browserlogfire-ui
Feature flagsRuntime-managed variables (logfire.var(), logfire.template_var())no dedicated skill yet — see the product's own docs
Application GatewayRoute an application's model calls through Pydantic AI Gatewaylogfire-gateway
Coding agentsRecord Claude/Codex sessions or configure coding-agent Gateway routinglogfire-coding-agents
  • 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.

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Pydantic
Publisher
Pydantic (Official)
Source
pydantic/skills · skills/logfire-setup · commit 98f591c
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
pydantic/skills

AutoGineer is not affiliated with or endorsed by Pydantic or Pydantic.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download logfire-setup.zip