Guide · Agent skill
How to use the agenttrace Session Audit agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The agenttrace Session Audit skill gives an AI agent guidance for inspecting logs from local AI coding tools and explaining why a run was slow, expensive, unreliable or shallow. It works by calling the separate agenttrace command-line tool, which must be installed on your PATH. This guide covers what the skill does, how to install it, how to trigger it, and the safety points to check before you use it on private logs.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it so the agenttrace-session-audit folder contains SKILL.md.
- 2Place the skill folder. Copy the folder into ~/.claude/skills/ for personal use or into .claude/skills/ in a project, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Install agenttrace. Install the agenttrace command-line tool separately so it runs from your PATH, or use the agenttrace repository with go run.
- 4Check discovery. Run agenttrace --doctor to see whether sessions are detected and which directories were checked.
- 5Ask for an audit. Describe the run you care about in plain language, naming the task or session where possible.
- 6Review the report. Read the highest-risk findings first, then check the diff against a known-good attempt before trusting the code.
What the skill makes the agent do
Agent skills are folders of instructions that Claude loads when a request matches them. This one, agenttrace-session-audit, tells the agent how to use agenttrace to look at the process behind a coding run: token and cost spikes, repeated tool failures, retry loops, latency gaps, anomalies, health scores and differences between sessions.
The skill is guidance only. The bundle contains a SKILL.md file and does not include the agenttrace program itself, so you must install agenttrace separately.
- Reads local 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.
- Produces reports, leading with the highest-risk sessions.
- Can suggest comparing a run against a previous or known-good attempt.
Install the agenttrace Session Audit skill
Download the ZIP from this page and unzip it. The skill folder should contain SKILL.md. Then place it in one of these locations:
For Claude Code, put the unzipped skill folder in ~/.claude/skills/ for your user account, or in .claude/skills/ inside a project to share it with that project.
In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/
- Project: .claude/skills/ in the project folder
- Claude apps: Settings → Capabilities → Skills
Install agenttrace itself
The skill expects the agenttrace command-line tool to be available. Install it so that the agenttrace command runs from your PATH. If you are working inside the agenttrace repository, the skill can use go run ./cmd/agenttrace instead.
Before relying on the output, check the installed version and its --help, because adapter coverage and flags can change.
agenttrace --doctorTrigger the skill with natural requests
You do not need a special command. Ask in plain language about a coding run and the agent should pick the skill when the request matches its use cases. Good triggers name the run and the problem, for example asking why a session was expensive or whether a failed task is worth retrying.
Point the agent at the exact session or export when you can. The skill notes that --latest can select an unrelated run, so check the project, time and session ID first.
- Why was my last Claude Code run so expensive?
- Review the local agent logs before I retry this failed task.
- Check whether this session had repeated tool failures or long latency gaps.
- Compare this attempt with the earlier one that worked.
Run a basic audit and read the report
The skill starts by discovering sessions, then writes a report. The first step checks what agenttrace can see. If no sessions are detected, the agent should list the directories checked by --doctor and ask you for the exported session file or log directory.
For a shareable report, ask for Markdown. The agent should lead with critical anomalies, repeated tool failures, token or cost waste, long latency gaps, low health scores and suspiciously shallow sessions.
agenttrace --overview -f markdown -o agenttrace-overview.mdInspect one session and compare attempts
To audit a single run, point agenttrace at an export file or a session directory. Metrics can look healthy while the agent has taken the wrong implementation path, so the skill recommends pairing the trace audit with a diff against a known-good attempt.
When comparing, look for changed files or commands that diverge from the task, missing tests, repeated edits to the same files without a clear reason, and lower cost that came from skipping necessary exploration.
- 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
agenttrace path/to/session-or-export.jsonAdd a CI health gate
For CI or repeatable team workflows, the skill suggests JSON output and health thresholds. Tune thresholds to your project. A strict gate suits critical workflows, while a reporting-only command is better while the team learns its normal baseline. Start advisory, then tighten gradually.
Keep in mind that health thresholds are advisory process metrics, not merge-review authority.
- Write JSON output for automation.
- Use --fail-under-health, --fail-on-critical and --max-tool-fail-rate to set limits.
- Begin with reporting only if failures are frequent.
agenttrace --overview --fail-under-health 80 --fail-on-critical --max-tool-fail-rate 15What people use it for
- Explaining why a long Claude Code session cost more than expected.
- Deciding whether to split a task, add tests or reset context before the next prompt.
- Reviewing a failed run's logs to find repeated tool failures before retrying.
- Adding a reporting-only health check to CI for AI-assisted coding sessions.
- Comparing two attempts at the same task to spot changed files and missing verification.
Frequently asked questions
Is the agenttrace Session Audit skill free to use?
The skill is listed under the MIT licence, and its SKILL.md names that licence with a link to the agenttrace LICENSE file. The skill does not include the agenttrace program, which you install separately, so check that tool's own licence terms as well.
What do I need to use this skill?
You need the agenttrace command-line tool on your PATH, or the agenttrace repository if you use go run. You also need local AI coding-agent session logs or exported JSON or JSONL traces. The skill runs scripts but does not use the network.
How do I install the agenttrace skill in Claude Code?
Download the ZIP from this page and unzip it, then place the folder in ~/.claude/skills/ for personal use or in .claude/skills/ inside a project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Why does the agent say no sessions were found?
The skill tells the agent to run agenttrace --doctor and report the directories it checked. If nothing is detected, point agenttrace at the exported session file or the log directory with the path argument or the -d flag.
Does a healthy audit mean the code is correct?
No. The skill states that healthy trace metrics do not prove the final code is correct, so you still need to run tests and review the diff.
Should I use this instead of Langfuse?
Not for production LLM application monitoring. The skill itself points to @langfuse for production LLM application tracing and evaluation. This skill is for inspecting local coding-agent sessions.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you want an agent to explain why a local AI coding run was slow, costly or unreliable, and you are comfortable installing agenttrace separately. Skip it for production LLM monitoring, for judging whether code is correct, or where session logs contain sensitive data that must not leave your machine.
Download the skill