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
18 other projects use a version of this.
Adopted by
Most recently taken up by
- talayash/spring-fleettheir own version, first seen Sep 29, 2026
- stevepolitodesign/skillstheir own version, first seen Sep 25, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Sep 22, 2026
- simota/agent-skillstheir own version, first seen Sep 17, 2026
- ai-analyst-lab/ai-analysttheir own version, first seen Sep 10, 2026
- shalomb/agent-skillstheir own version, first seen Aug 23, 2026
Used with
Projects with it also use visual-verdict, ai-slop-cleaner 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.
lza6Skillvisual-verdict
Structured visual QA verdict for screenshot-to-reference comparisons
Also in 3 projects that use this
lza6Skillai-slop-cleaner
Run an anti-slop cleanup/refactor/deslop workflow
Also in 3 projects that use this
the-huginSkillconfigure-notifications
Configure notification integrations (Telegram, Discord, Slack) via natural language
Also in 3 projects that use this
an8079Skillhud
Also in 3 projects that use this
an8079Skillralplan
Also in 3 projects that use this
jihe520Skilldoctor
环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。
Also in 4 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- ai-analyst-lab/ai-analyst★ 304same name
- Soul-Brews-Studio/arra-oracle-skills-cli★ 121same name
- petrowsky/agentic-fm★ 95same name
- simota/agent-skills★ 87same name
- mbwsims/claude-universe★ 72same name
- myths-labs/muse★ 35same name
- jexchan/dailyup-second-brain-starter★ 34same name
- HaipingShi/coderail★ 8same name
- lza6/claw-code-tingfeng★ 4same name
8 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 16 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 16 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.

