trace
Skill2 starsChanged 2 months agoMITView on GitHub
Investigate Pydantic Logfire traces - one-command save plus peek, local SQLite search, API SQL, and debug production issues
- Deletes or force-pushes
30 other projects use a version of this.
Adopted by
Most recently taken up by
- biliboss/skillstheir own version, first seen Nov 29, 2026
- Thoven-CORP/agent-skillstheir own version, first seen Nov 29, 2026
- built-for-devs/dev-tracetheir own version, first seen Nov 29, 2026
- thoughtbot/the-processtheir own version, first seen Nov 29, 2026
- jexchan/dailyup-second-brain-startertheir own version, first seen Nov 26, 2026
- Renozoic-Foundry/forge-publictheir own version, first seen Nov 15, 2026
Used with
Projects with it also use ai-slop-cleaner, ralplan and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Jurel89Skillai-slop-cleaner
Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
Also in 4 projects that use this
ibahgatSkillralplan
Create a strict, quality-first execution plan with explicit gates and rollback-ready sequencing.
Also in 4 projects that use this
woosikkimSkilldeepinit
Generate hierarchical AGENTS.md codebase maps for agent context
Also in 3 projects that use this
klauswgSkilldeep-interview
在明确批准执行之前,通过数学化歧义门控进行苏格拉底式深度访谈
Also in 4 projects that use this
AWSSkillmap
Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.
Also in 4 projects that use this
buddyhSkilldeep-dive
Deep dive on any topic. Decomposes into subtopics, researches each in parallel with thorough source gathering, then synthesizes into a comprehensive report (4,000-10,000+ words, 40-100+ sources). Scales depth dynamically based on topic complexity. Use when asked for a deep dive, deep research, comprehensive analysis, or thorough investigation of a topic.
Also in 3 projects that use this
Other versions30 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 30
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- zereight/gitlab-mcp★ 2.1ksame name
- ai-analyst-lab/ai-analyst★ 304same name
- Soul-Brews-Studio/arra-oracle-skills-cli★ 121same name
- simota/agent-skills★ 106same name
- unlearndev/skills★ 106same name
- petrowsky/agentic-fm★ 98same name
- mbwsims/claude-universe★ 71same name
- thoughtbot/rails-consultant★ 40same name
20 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use lfsnag (./bin/lfsnag or PATH).
“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
lfsnag: Logfire Trace Investigation
Use lfsnag (./bin/lfsnag or PATH). Token: ~/.config/lfsnag/config.json, LOGFIRE_READ_TOKEN, or --token.
The three commands
# 1. SAVE + PEEK: pass a traceId or a full Logfire URL.
# Streams all records into SQLite (RAM-bounded), then prints a small summary
# that includes the "db" path for step 3. URL org/project auto-picks the env profile.
lfsnag 'https://logfire-us.pydantic.dev/org/proj?traceId=<traceId>'
lfsnag -e stage <traceId> # -e overrides URL/auto selection
lfsnag --save /tmp/t.sqlite -e stage <traceId> # custom path instead of cache dir
# 2. API SQL (DataFusion). Cross-trace queries. No local file.
lfsnag -e stage --sql "SELECT span_name, count() cnt FROM records WHERE trace_id = '<traceId>' GROUP BY span_name ORDER BY cnt DESC"
# 3. LOCAL SQL (SQLite). Search the saved file offline. No token and no rate limit.
lfsnag --db ~/.cache/lfsnag/<traceId>.sqlite --peek
lfsnag --db ~/.cache/lfsnag/<traceId>.sqlite --sql "SELECT span_name FROM records WHERE is_exception = 1"Rules the CLI enforces:
--peekworks only with--db. A bare traceId already peeks.--dbneeds--sqlor--peek. It rejects a traceId and--save.--sqlrejects--peek,--save, and a traceId.
Cache: fetches write <UserCacheDir>/lfsnag/<traceId>.sqlite. The path follows XDG_CACHE_HOME. The flag --save F sets a different path. A re-fetch replaces the file atomically. Clear the cache with rm -rf -- "${XDG_CACHE_HOME:-$HOME/.cache}/lfsnag". Do this when no lfsnag process runs. A delete during a fetch loses the data of that fetch.
Reading the peek
{"db": "…", "n": 107, "n_roots": 1, "n_exceptions": 4, "n_slow": 19,
"roots": […], "exceptions": […], "slow": […], "top": […]}n_*are exact totals. The arrays hold at most 20 samples.- The peek limits each
exceptions[].messageto 200 characters. Read the full text with--db --sql. pathon exceptions/slow is the ancestryroot › … › span. The path holds at most 8 hops.toplists the most frequentspan_namewithmax_dur.- Slim
-ffetches lack peek columns. The output then holds{"db","n","note"}only. An absentn_*key means unknown. Fetch without-ffor a full peek.
SQL tips
API --sql runs DataFusion (postgres-ish): attributes->>'key'. Prefer span_name over message. The API limit is 10000. A SQL LIMIT alone does not lift this cap.
SELECT count(*) n FROM records WHERE trace_id = '<traceId>'
SELECT span_name, count() cnt, max(duration) max_dur FROM records WHERE trace_id = '<traceId>' GROUP BY span_name ORDER BY cnt DESC
SELECT span_name, exception_type, exception_message FROM records WHERE trace_id = '<traceId>' AND is_exception
SELECT ... WHERE level >= 'error' -- errors without exception
SELECT ... WHERE parent_span_id IS NULL -- rootsLocal --db --sql runs SQLite. Read JSON with json_extract. Logfire keys contain dots. Quote the path for this reason. Bools are 0/1.
SELECT count(*) n FROM records
SELECT span_name, exception_type, exception_message FROM records WHERE is_exception = 1
SELECT span_name, duration FROM records WHERE duration > 2 ORDER BY duration DESC
SELECT span_name FROM records WHERE attributes LIKE '%gen_ai%' -- cheap key probe
SELECT span_name, json_extract(attributes, '$."gen_ai.request.model"') model FROM records WHERE json_extract(attributes, '$."gen_ai.request.model"') IS NOT NULL
SELECT sum(json_extract(attributes, '$."gen_ai.aggregated_usage.input_tokens"')) FROM records
SELECT span_name, message, attributes FROM records WHERE span_id = '<spanId>'jq: lfsnag -c --db F --peek | jq '.exceptions'
Available fields
start_timestamp- The time when the span/log started (UTC)end_timestamp- When the span/log completed (UTC)duration- Elapsed time in seconds (NULL for logs)trace_id- Trace identifier (32 hex chars)span_id- Span identifier (16 hex chars)parent_span_id- Parent span reference (NULL for root)kind-span,log,span_event, orpending_spanspan_name- Short name shared by similar recordsmessage- Human-readable descriptionlevel- Severity levelis_exception- Whether the span holds an exceptionexception_type- Exception class nameexception_message- Exception messageexception_stacktrace- Formatted tracebackattributes- Arbitrary structured data (JSON)tags- Grouping labelsotel_status_code- Span status (UNSET, OK, ERROR)otel_status_message- Span error descriptionservice_name- Service/application namedeployment_environment- Environment (production, staging)http_response_status_code- HTTP status codehttp_method- HTTP methodhttp_route- HTTP route patternurl_full- Complete URLurl_path- URL pathservice_version- Service versionservice_instance_id- Service instance identifierservice_namespace- Service namespaceprocess_pid- Process IDurl_query- URL query stringlog_body- Body of OpenTelemetry log recordsotel_events- Span events (JSON)otel_links- Span links (JSON)otel_resource_attributes- Resource metadata (JSON)otel_scope_name- Instrumenting library nameotel_scope_version- Instrumenting library versionotel_scope_attributes- Scope metadata (JSON)telemetry_sdk_name- Telemetry SDK nametelemetry_sdk_language- SDK languagetelemetry_sdk_version- SDK version
CLI flags
<traceId | URL>- Fetch the trace into SQLite. The path is the cache dir or--save. The output is a peek withdb.--db FILE- Query local SQLite with--sqlor--peek. Local queries need no token.--sql- Raw SQL (API without--db, local with--db)--save FILE- Override the SQLite path for a fetch-f, --fields- Columns to save (default all)-e, --env- Profile. The URL org/project sets it automatically. The flag-ewins.-c, --compact- One-line JSON-v, --verbose- HTTP debug--token- Override read token
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

