logfire

logfire is a skill for Claude Code from jiatastic/open-python-skills. It costs 77 tokens per session (1,809 once invoked), scanned A, original, MIT.

A Python monitoring and logging setup based on Pydantic Logfire and OpenTelemetry, an open standard for recording what services are doing. It can record structured events and trace requests across supported tools.

In plain words
What is it for?
Use it to add logs and traces to Python APIs, FastAPI, HTTPX, SQLAlchemy, and large-language-model integrations, while configuring sampling and removal of sensitive data.
Why use it?
It helps you see what an API is doing, follow requests between components, and investigate failures or slow operations with consistent service details.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the open-python-skills plugin — 8 skills shipped together

Good fit Use it to add logs and traces to Python APIs, FastAPI, HTTPX, SQLAlchemy, and large-language-model integrations, while configuring sampling and removal of sensitive data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiatastic/open-python-skills/logfire
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jiatastic/open-python-skills --skill logfire
Clone the repo
git clone --depth 1 https://github.com/jiatastic/open-python-skills

Made for: Claude Code.

Or install open-python-skills, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for logfire

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiatastic/open-python-skills/logfire/github.svg)](https://agentmods.dev/skills/jiatastic/open-python-skills/logfire)
Your own site
<a href="https://agentmods.dev/skills/jiatastic/open-python-skills/logfire"><img src="https://agentmods.dev/badge/skills/jiatastic/open-python-skills/logfire/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for logfire

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiatastic/open-python-skills/logfire"><img src="https://agentmods.dev/badge/skills/jiatastic/open-python-skills/logfire.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01809
Opus 5.5 $0.00031 $0.00724
Sonnet 5.5 $0.00015 $0.00362
Haiku 4.5 $0.00008 $0.00181

Measured 1mo ago against content hash 30780f4243da, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

logfire scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/logfire/SKILL.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Logfire

Structured observability for Python using Pydantic Logfire - fast setup, powerful features, OpenTelemetry-compatible.

Quick Start

uv pip install logfire
import logfire

logfire.configure(service_name="my-api", service_version="1.0.0")
logfire.info("Application started")

Core Patterns

1. Service Configuration

Always set service metadata at startup:

import logfire

logfire.configure(
    service_name="backend",
    service_version="1.0.0",
    environment="production",
    console=False,           # Disable console output in production
    send_to_logfire=True,    # Send to Logfire platform
)

2. Framework Instrumentation

Instrument frameworks before creating clients/apps:

import logfire
from fastapi import FastAPI

# Configure FIRST
logfire.configure(service_name="backend")

# Then instrument
logfire.instrument_fastapi()
logfire.instrument_httpx()
logfire.instrument_sqlalchemy()

# Then create app
app = FastAPI()

3. Log Levels and Structured Logging

# All log levels (trace → fatal)
logfire.trace("Detailed trace", step=1)
logfire.debug("Debug context", variable=locals())
logfire.info("User action", action="login", success=True)
logfire.notice("Important event", event_type="milestone")
logfire.warn("Potential issue", threshold_exceeded=True)
logfire.error("Operation failed", error_code=500)
logfire.fatal("Critical failure", component="database")

# Python 3.11+ f-string magic (auto-extracts variables)
user_id = 123
status = "active"
logfire.info(f"User {user_id} status: {status}")
# Equivalent to: logfire.info("User {user_id}...", user_id=user_id, status=status)

# Exception logging with automatic traceback
try:
    risky_operation()
except Exception:
    logfire.exception("Operation failed", context="extra_info")

4. Manual Spans

# Spans for tracing operations
with logfire.span("Process order {order_id}", order_id="ORD-123"):
    logfire.info("Validating cart")
    # ... processing logic
    logfire.info("Order complete")

# Dynamic span attributes
with logfire.span("Database query") as span:
    results = execute_query()
    span.set_attribute("result_count", len(results))
    span.message = f"Query returned {len(results)} results"

Read the full file on GitHub · 245 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 245 lines · 77 tokens per session scan A 30780f4243da

Subscribe to this mod's changes

logfire is a skill published in the GitHub repository jiatastic/open-python-skills (10 stars, last pushed 8mo ago), licensed MIT. It adds 77 tokens to every session and 1,809 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

frontend-slides

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

gooseworks-ai/goose-skills · 63 tokens

talking-head-video

Creates talking head videos from any source material (docs, changelogs, blog posts, notes, transcripts). Produces multi-scene videos with avatar narration over screenshots/images using HeyGen v2 API. Supports Quick Shot and Full Producer modes.

gooseworks-ai/goose-skills · 54 tokens

targeted-prospecting

Build a prospect list of companies with decision makers, verified contact info, and hiring/intent signals. Use when asked to find leads by industry, build an account list with specific titles, prospect companies that are actively hiring, or create a targeted outreach list filtered by company size, location, and hiring…

gooseworks-ai/goose-skills · 67 tokens

leadership-change-outreach

End-to-end leadership change signal composite. Takes any set of companies, detects recent leadership changes (new VP+, C-suite hires and promotions), evaluates relevance to your product, and drafts personalized outreach. Uses Apollo People Search (free) for fast detection + Apollo Enrichment (1 credit/person) for…

gooseworks-ai/goose-skills · 79 tokens

news-signal-outreach

End-to-end news-triggered signal composite. Takes any piece of news — an article, LinkedIn post, tweet, announcement, event, trend, regulation, product launch, acquisition, layoff, expansion, or any other public event — and evaluates whether the companies or people mentioned are ICP fits. If yes, identifies the…

gooseworks-ai/goose-skills · 201 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens