{"id":"afea6995-1f05-4637-91c3-9d9f5de839be","shortId":"Ew3FDc","kind":"skill","title":"agenttrace-session-audit","tagline":"Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.","description":"# agenttrace Session Audit\n\n## Overview\n\nUse this skill to inspect local AI coding-agent sessions with\n[agenttrace](https://github.com/luoyuctl/agenttrace). It focuses on the process\nbehind a run: token and cost spikes, tool failures, retry loops, latency gaps,\nanomalies, health scores, and session-to-session diffs.\n\nagenttrace is local-first and reads session logs from tools such as Claude Code,\nCodex CLI, Gemini CLI, Aider, Cursor exports, OpenCode, Qwen Code, Kimi, and\ngeneric JSON or JSONL traces.\n\n## When to Use This Skill\n\n- Use when a user asks why an AI coding run was slow, expensive, shallow, or unreliable.\n- Use when reviewing local agent logs before retrying a failed or suspicious task.\n- Use when building a lightweight CI health gate for AI-assisted coding sessions.\n- Use when comparing two attempts and looking for changed tool paths, retries, or cost patterns.\n\n## How It Works\n\n### Step 1: Discover Available Sessions\n\nPrefer an installed `agenttrace` binary when it is available on `PATH`. If the\ncurrent repository is `luoyuctl/agenttrace`, use `go run ./cmd/agenttrace`\ninstead.\n\n```bash\nagenttrace --doctor\nagenttrace --overview\n```\n\nIf no sessions are detected, report the directories checked by `--doctor` and\nask for the exported session file or log directory.\n\n### Step 2: Produce a Human-Readable Audit\n\nUse Markdown when the user wants a concise report they can inspect or share.\n\n```bash\nagenttrace --overview -f markdown -o agenttrace-overview.md\n```\n\nIn the report, lead with the highest-risk sessions and explain why they matter:\ncritical anomalies, repeated tool failures, token or cost waste, long latency\ngaps, low health scores, and suspiciously shallow sessions.\n\n### Step 3: Inspect One Session or Directory\n\nUse the latest session for a quick check, or pass an explicit export path when\nthe user provides one.\n\n```bash\nagenttrace --latest\nagenttrace --latest -f json\nagenttrace path/to/session-or-export.json\nagenttrace --overview -d path/to/session-dir\n```\n\n### Step 4: Compare Attempts When Semantics Matter\n\nToken and latency metrics can look healthy even when an agent confidently takes\nthe wrong implementation path. When the risk is semantic drift, pair the trace\naudit with a diff against a previous or known-good attempt.\n\nLook for:\n\n- changed files or commands that diverge from the intended task\n- missing tests or verification steps compared with the reference attempt\n- repeated edits around the same files without a clear reason\n- lower cost that came from skipping necessary exploration\n\n### Step 5: Add Automation Gates\n\nFor CI or repeatable team workflows, use JSON output or health thresholds.\n\n```bash\nagenttrace --overview -f json -o agenttrace-overview.json\nagenttrace --overview --fail-under-health 80 --fail-on-critical --max-tool-fail-rate 15\n```\n\nTune thresholds to the project. A strict gate is useful for critical workflows;\na reporting-only command is better while the team is learning its baseline.\n\n## Examples\n\n### Quick Local Review\n\n```bash\nagenttrace --overview\nagenttrace --latest\n```\n\nUse this after a long coding-agent run to decide whether the next prompt should\nsplit the task, avoid a failing tool path, add missing tests, or reset context.\n\n### CI Health Check\n\n```bash\nagenttrace --overview --fail-under-health 80 --fail-on-critical\n```\n\nUse this when agent session logs are available in CI and the team wants a simple\nguard against critical anomalies or unhealthy runs.\n\n## Best Practices\n\n- Start with `--doctor` when session discovery is uncertain.\n- Report missing fields plainly; do not invent cost, model, latency, or health data.\n- Treat prompts, code, and session contents as private local data.\n- Prefer JSON output for automation and Markdown output for human review.\n- Use trace metrics for process failures and diff/reference review for semantic drift.\n\n## Limitations\n\n- agenttrace can only analyze logs that are present locally or provided as exports.\n- Some agents do not expose enough fields to infer cost, model, cache use, or latency.\n- Healthy trace metrics do not prove the final code is correct; still run tests and review diffs.\n- CI gates should start as advisory until the team understands normal baseline behavior.\n\n## Security & Safety Notes\n\n- Do not upload private session logs to external services unless the user explicitly approves it.\n- Do not overwrite user reports unless they requested that exact output path.\n- Avoid printing secrets found in prompts, tool output, environment variables, or logs.\n\n## Common Pitfalls\n\n- **Problem:** No sessions are found.\n  **Solution:** Run `agenttrace --doctor`, then point agenttrace at the exported file or log directory.\n\n- **Problem:** A run looks cheap and fast but produced the wrong refactor.\n  **Solution:** Compare the session against a prior attempt or known-good diff; cost metrics alone will miss semantic drift.\n\n- **Problem:** CI fails too often after adding a health gate.\n  **Solution:** Start with JSON or Markdown reporting, inspect normal baselines, then tighten thresholds gradually.\n\n## Related Skills\n\n- `@langfuse` - Use for production LLM application tracing and evaluation.\n- `@observability-engineer` - Use for broader service monitoring, SLOs, and incident workflows.","tags":["agenttrace","session","audit","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-agenttrace-session-audit","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/agenttrace-session-audit","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 37911 github stars · SKILL.md body (5,254 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:50:25.840Z","embedding":null,"createdAt":"2026-05-11T18:50:26.912Z","updatedAt":"2026-05-18T18:50:25.840Z","lastSeenAt":"2026-05-18T18:50:25.840Z","tsv":"'/cmd/agenttrace':195 '/luoyuctl/agenttrace).':44 '1':171 '15':450 '2':224 '3':287 '4':326 '5':411 '80':440,527 'ad':771 'add':412,511 'advisori':662 'agent':10,38,129,342,494,535,626 'agenttrac':2,13,25,41,72,178,198,200,246,313,315,319,321,428,434,483,485,521,612,721,725 'agenttrace-overview.json':433 'agenttrace-overview.md':251 'agenttrace-session-audit':1 'ai':7,35,116,148 'ai-assist':147 'aider':91 'alon':760 'analyz':615 'anomali':19,63,268,551 'applic':796 'approv':686 'around':394 'ask':113,214 'assist':149 'attempt':156,328,369,391,752 'audit':4,5,27,230,358 'autom':413,592 'avail':173,183,539 'avoid':506,700 'baselin':477,668,784 'bash':197,245,312,427,482,520 'behavior':669 'behind':50 'best':555 'better':470 'binari':179 'broader':805 'build':140 'cach':636 'came':405 'chang':160,372 'cheap':737 'check':210,300,519 'ci':23,143,416,517,541,657,766 'claud':85 'clear':400 'cli':88,90 'code':9,37,86,96,117,150,493,580,648 'codex':87 'coding-ag':8,36,492 'command':375,468 'common':712 'compar':154,327,387,746 'concis':238 'confid':343 'content':583 'context':516 'correct':650 'cost':15,55,165,274,403,572,634,758 'critic':267,444,462,531,550 'current':188 'cursor':92 'd':323 'data':577,587 'decid':497 'detect':206 'diff':21,71,361,656,757 'diff/reference':606 'directori':209,222,292,732 'discov':172 'discoveri':562 'diverg':377 'doctor':199,212,559,722 'drift':354,610,764 'edit':393 'engin':802 'enough':630 'environ':708 'evalu':799 'even':339 'exact':697 'exampl':478 'expens':121 'explain':263 'explicit':304,685 'explor':409 'export':93,217,305,624,728 'expos':629 'extern':680 'f':248,317,430 'fail':134,437,442,448,508,524,529,767 'fail-on-crit':441,528 'fail-under-health':436,523 'failur':17,58,271,604 'fast':739 'field':567,631 'file':219,373,397,729 'final':647 'first':76 'focus':46 'found':703,718 'gap':62,278 'gate':24,145,414,458,658,774 'gemini':89 'generic':99 'github.com':43 'github.com/luoyuctl/agenttrace).':42 'go':193 'good':368,756 'gradual':788 'guard':548 'health':20,64,144,280,425,439,518,526,576,773 'healthi':338,640 'highest':259 'highest-risk':258 'human':228,597 'human-read':227 'implement':347 'incid':810 'infer':633 'inspect':33,242,288,782 'instal':177 'instead':196 'intend':380 'invent':571 'json':100,318,422,431,589,778 'jsonl':102 'kimi':97 'known':367,755 'known-good':366,754 'langfus':791 'latenc':18,61,277,334,574,639 'latest':295,314,316,486 'lead':255 'learn':475 'lightweight':142 'limit':611 'llm':795 'local':6,34,75,128,480,586,620 'local-first':74 'log':80,130,221,537,616,678,711,731 'long':276,491 'look':158,337,370,736 'loop':60 'low':279 'lower':402 'luoyuctl/agenttrace':191 'markdown':232,249,594,780 'matter':266,331 'max':446 'max-tool-fail-r':445 'metric':335,601,642,759 'miss':382,512,566,762 'model':573,635 'monitor':807 'necessari':408 'next':500 'normal':667,783 'note':672 'o':250,432 'observ':801 'observability-engin':800 'often':769 'one':289,311 'opencod':94 'output':423,590,595,698,707 'overview':28,201,247,322,429,435,484,522 'overwrit':690 'pair':355 'pass':302 'path':162,185,306,348,510,699 'path/to/session-dir':324 'path/to/session-or-export.json':320 'pattern':166 'pitfal':713 'plain':568 'point':724 'practic':556 'prefer':175,588 'present':619 'previous':364 'print':701 'prior':751 'privat':585,676 'problem':714,733,765 'process':49,603 'produc':225,741 'product':794 'project':455 'prompt':501,579,705 'prove':645 'provid':310,622 'quick':299,479 'qwen':95 'rate':449 'read':78 'readabl':229 'reason':401 'refactor':744 'refer':390 'relat':789 'repeat':269,392,418 'report':207,239,254,466,565,692,781 'reporting-on':465 'repositori':189 'request':695 'reset':515 'retri':59,132,163 'review':127,481,598,607,655 'risk':260,351 'run':52,118,194,495,554,652,720,735 'safeti':671 'score':65,281 'secret':702 'secur':670 'semant':330,353,609,763 'servic':681,806 'session':3,11,26,39,68,70,79,151,174,204,218,261,285,290,296,536,561,582,677,716,748 'session-to-sess':67 'shallow':122,284 'share':244 'simpl':547 'skill':31,108,790 'skill-agenttrace-session-audit' 'skip':407 'slos':808 'slow':120 'solut':719,745,775 'source-sickn33' 'spike':56 'split':503 'start':557,660,776 'step':170,223,286,325,386,410 'still':651 'strict':457 'suspici':136,283 'take':344 'task':137,381,505 'team':419,473,544,665 'test':383,513,653 'threshold':426,452,787 'tighten':786 'token':53,272,332 'tool':16,57,82,161,270,447,509,706 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':103,357,600,641,797 'treat':578 'tune':451 'two':155 'uncertain':564 'understand':666 'unhealthi':553 'unless':682,693 'unreli':124 'upload':675 'use':29,106,109,125,138,152,192,231,293,421,460,487,532,599,637,792,803 'user':112,235,309,684,691 'variabl':709 'verif':385 'want':236,545 'wast':275 'whether':498 'without':398 'work':169 'workflow':420,463,811 'wrong':346,743","prices":[{"id":"6c48c02c-bbdc-4a22-8299-0de0a206515e","listingId":"afea6995-1f05-4637-91c3-9d9f5de839be","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-05-11T18:50:26.912Z"}],"sources":[{"listingId":"afea6995-1f05-4637-91c3-9d9f5de839be","source":"github","sourceId":"sickn33/antigravity-awesome-skills/agenttrace-session-audit","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/agenttrace-session-audit","isPrimary":false,"firstSeenAt":"2026-05-11T18:50:26.912Z","lastSeenAt":"2026-05-18T18:50:25.840Z"}],"details":{"listingId":"afea6995-1f05-4637-91c3-9d9f5de839be","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"agenttrace-session-audit","github":{"repo":"sickn33/antigravity-awesome-skills","stars":37911,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-05-18T08:24:49Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"8347be06f15dfb9abf25df205752d9cd2518be80","skill_md_path":"skills/agenttrace-session-audit/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/agenttrace-session-audit"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"agenttrace-session-audit","license":"MIT","description":"Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/agenttrace-session-audit"},"updatedAt":"2026-05-18T18:50:25.840Z"}}