agenttrace-session-audit skill
Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.
Is the agenttrace-session-audit skill safe?
Clean: nothing in its files matched our rules. We read 1 file in the folder on 2026-09-28.
No findings.
Install the agenttrace-session-audit skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git /tmp/agentic-awesome-skills mkdir -p ~/.claude/skills cp -r /tmp/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/agenttrace-session-audit ~/.claude/skills/agenttrace-session-audit
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
agenttrace Session Audit
Overview
Use this skill to inspect local AI coding-agent sessions with agenttrace. It focuses on the process behind a run: token and cost spikes, tool failures, retry loops, latency gaps, anomalies, health scores, and session-to-session diffs.
agenttrace is local-first and reads session logs from tools such as Claude Code, Codex CLI, Gemini CLI, Aider, Cursor exports, OpenCode, Qwen Code, Kimi, and generic JSON or JSONL traces.
When to Use This Skill
- Use when a user asks why an AI coding run was slow, expensive, shallow, or unreliable.
- Use when reviewing local agent logs before retrying a failed or suspicious task.
- Use when building a lightweight CI health gate for AI-assisted coding sessions.
- Use when comparing two attempts and looking for changed tool paths, retries, or cost patterns.
How It Works
Step 1: Discover Available Sessions
Prefer an installed agenttrace binary when it is available on PATH. If the current repository is luoyuctl/agenttrace, use go run ./cmd/agenttrace instead.
agenttrace --doctor
agenttrace --overviewIf no sessions are detected, report the directories checked by --doctor and ask for the exported session file or log directory.
Step 2: Produce a Human-Readable Audit
Use Markdown when the user wants a concise report they can inspect or share.
agenttrace --overview -f markdown -o agenttrace-overview.mdIn the report, lead with the highest-risk sessions and explain why they matter: critical anomalies, repeated tool failures, token or cost waste, long latency gaps, low health scores, and suspiciously shallow sessions.
Step 3: Inspect One Session or Directory
Use the latest session for a quick check, or pass an explicit export path when the user provides one.
agenttrace --latest
agenttrace --latest -f json
agenttrace path/to/session-or-export.json
agenttrace --overview -d path/to/session-dirStep 4: Compare Attempts When Semantics Matter
Token and latency metrics can look healthy even when an agent confidently takes the wrong implementation path. When the risk is semantic drift, pair the trace audit with a diff against a previous or known-good attempt.
Look for:
- changed files or commands that diverge from the intended task
- missing tests or verification steps compared with the reference attempt
- repeated edits around the same files without a clear reason
- lower cost that came from skipping necessary exploration
Step 5: Add Automation Gates
For CI or repeatable team workflows, use JSON output or health thresholds.
agenttrace --overview -f json -o agenttrace-overview.json
agenttrace --overview --fail-under-health 80 --fail-on-critical --max-tool-fail-rate 15Tune thresholds to the project. A strict gate is useful for critical workflows; a reporting-only command is better while the team is learning its baseline.
Examples
Quick Local Review
agenttrace --overview
agenttrace --latestUse this after a long coding-agent run to decide whether the next prompt should split the task, avoid a failing tool path, add missing tests, or reset context.
CI Health Check
agenttrace --overview --fail-under-health 80 --fail-on-criticalUse this when agent session logs are available in CI and the team wants a simple guard against critical anomalies or unhealthy runs.
Best Practices
- Start with --doctor when session discovery is uncertain.
- Report missing fields plainly; do not invent cost, model, latency, or health data.
- Treat prompts, code, and session contents as private local data.
- Prefer JSON output for automation and Markdown output for human review.
- Use trace metrics for process failures and diff/reference review for semantic drift.
Limitations
- agenttrace can only analyze logs that are present locally or provided as exports.
- Some agents do not expose enough fields to infer cost, model, cache use, or latency.
- Healthy trace metrics do not prove the final code is correct; still run tests and review diffs.
- CI gates should start as advisory until the team understands normal baseline behavior.
Security & Safety Notes
- Do not upload private session logs to external services unless the user explicitly approves it.
- Do not overwrite user reports unless they requested that exact output path.
- Avoid printing secrets found in prompts, tool output, environment variables, or logs.
Common Pitfalls
Solution: Run agenttrace --doctor, then point agenttrace at the exported file or log directory.
- Problem: No sessions are found.
Solution: Compare the session against a prior attempt or known-good diff; cost metrics alone will miss semantic drift.
- Problem: A run looks cheap and fast but produced the wrong refactor.
Solution: Start with JSON or Markdown reporting, inspect normal baselines, then tighten thresholds gradually.
- Problem: CI fails too often after adding a health gate.
Related Skills
- @langfuse - Use for production LLM application tracing and evaluation.
- @observability-engineer - Use for broader service monitoring, SLOs, and incident workflows.
More skills from sickn33/agentic-awesome-skills
- A00-andruia-consultantArquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
- F007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
- A10-andruia-skill-smithIngeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
- A20-andruia-niche-intelligenceEstratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.
- A2slides-ppt-generatorAI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use for any \"make slides\", \"create a deck\", or \"slides from this document\" request.
- A3d-web-experienceExpert in building 3D experiences for the web - Three.js, React
- Aab-test-setupUse when designing an A/B or split test: define the hypothesis, control and variants, estimate sample size, verify tracking, and predeclare metrics and stopping rules.
- Aab-testingWhen the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program.
- Aacceptance-orchestratorUse when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.
- Aaccess-reviewConduct periodic access reviews and certifications. Implement access
- Aaccessibility-compliance-accessibility-auditYou are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.
- Aaccesslint-auditFind and fix WCAG 2.2 accessibility issues. Two modes — report (sweep a codebase or page, produce a prioritized written report, no edits) and fix (audit→edit→verify loop on a target). Prefers direct-CDP live-DOM auditing; falls back to a browser-MCP composition or HTML-string audits.