agenttrace-session-audit

agenttrace-session-audit is a skill for Claude Code, Codex from luoyuctl/agenttrace. It costs 99 tokens per session (612 once invoked), scanned A, original, MIT.

A command-line tool for reviewing coding-agent session logs, including records from tools such as Codex, Claude Code, and Cursor. It reports usage, costs, errors, retries, delays, and other session problems.

In plain words
What is it for?
Use it to inspect the latest session, review a folder of sessions, create Markdown or JSON reports, and enforce automated health checks in CI.
Why use it?
It turns raw JSON or JSONL logs into an operational report, so you can find waste, repeated failures, and unhealthy sessions without reading every event.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/luoyuctl/agenttrace/agenttrace-session-audit
Any agent
npx skills add luoyuctl/agenttrace --skill agenttrace-session-audit
Clone the repo
git clone --depth 1 https://github.com/luoyuctl/agenttrace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agenttrace-session-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/luoyuctl/agenttrace/agenttrace-session-audit.svg)](https://agentmods.dev/skills/luoyuctl/agenttrace/agenttrace-session-audit)
Your own site
<a href="https://agentmods.dev/skills/luoyuctl/agenttrace/agenttrace-session-audit"><img src="https://agentmods.dev/badge/skills/luoyuctl/agenttrace/agenttrace-session-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.00612
Opus 5 $0.00049 $0.00306
Sonnet 5 $0.00020 $0.00122
Haiku 4.5 $0.00010 $0.00061

Measured 5d ago against content hash 745416b848c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agenttrace-session-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agenttrace-session-audit/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agenttrace Session Audit

Use this skill when session logs need an operational read: spend, token burn, cache use, tool failures, retry loops, latency, health, anomalies, and CI gate readiness.

Workflow

  1. Prefer the installed agenttrace binary when it is available on PATH.
  2. If the binary is not available and the current directory is the luoyuctl/agenttrace repository, use cargo run -q -p agenttrace --.
  3. Start with discovery unless the user gave a specific file or directory:
agenttrace --doctor
agenttrace --overview
  1. For a fast human report, use Markdown:
agenttrace --overview -f markdown -o agenttrace-overview.md
  1. For automation or CI, use JSON or health gates:
agenttrace --overview -f json -o agenttrace-overview.json
agenttrace --overview --fail-under-health 80 --fail-on-critical --max-tool-fail-rate 15
  1. For a single recent session:
agenttrace --latest
agenttrace --latest -f json
  1. For a specific export or session directory:
agenttrace path/to/session-or-export.json
agenttrace --overview -d path/to/session-dir

Report Focus

  • Lead with the highest-risk sessions and the reason they matter.
  • Call out token/cost waste, repeated tool failures, retry loops, long gaps, and low health scores.
  • When proposing a CI gate, include the exact agenttrace command and threshold.
  • If no sessions are detected, run agenttrace --doctor and report the detected agent directories and next step.
  • Report the session capability level (Detailed, Aggregate, or Limited) before relying on latency or step evidence.
  • Treat Tool Steps as metadata-only evidence. Do not imply that Aggregate or Limited sources have a complete execution trace.

Guardrails

  • Treat prompts, code, and session contents as local/private data. Do not upload logs to external services.
  • Do not invent metrics. If a parser cannot infer cost, model, or latency, say which field is missing.
  • Do not compare missing event-level evidence as zero latency or zero failures; mark it unavailable.
  • Do not overwrite user reports unless the user asked for that output path.

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 66 lines · 99 tokens per session scan A 745416b848c5

Subscribe to this mod's changes

agenttrace-session-audit is a skill published in the GitHub repository luoyuctl/agenttrace (129 stars, last pushed 12d ago), licensed MIT. It adds 99 tokens to every session and 612 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

justfix

Use this skill when the user asks for a quote, estimate, price, or "how much" for a UK trades job – electrical, plumbing, locksmith, glazing, carpentry, handyperson, heating, gas, roofing, drains, white goods, or boiler service. Calls the JustFix Estimator MCP server to return a cost breakdown, scope summary, and a…

Just-Fix/justfix-skill · 90 tokens

sync-awareness

Suggest syncing MCP server configurations or instruction files to other AI coding agents when the user is editing MCP settings (.claude.json, .mcp.json) or modifying CLAUDE.md files. Available commands: /sync, /sync-list, /sync-diff, /sync-instructions.

Leoyang183/sync-agents-settings · 61 tokens

platform-api

Queries the Genesys Cloud Platform API schema for endpoint details, permissions, parameters, and response formats. Use when user asks about Genesys Cloud API endpoints (e.g., "/api/v2/assistants/queues"), API documentation, API permissions, schemas, capabilities, or when implementing Genesys Cloud operations.

MakingChatbots/genesys-cloud-skills · 65 tokens

timeline-report

Generate a "Journey Into [Project]" narrative report analyzing a project's entire development history from claude-mem's timeline. Use when asked for a timeline report, project history analysis, development journey, or full project report.

d-wwei/agent-recall · 47 tokens

smart-explore

Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files when you need to understand code structure, find functions, or explore a codebase efficiently.

d-wwei/agent-recall · 41 tokens

bootstrap

This skill guides you through setting up your Agent Recall persona. It runs automatically on first use or when invoked with /bootstrap.

d-wwei/agent-recall · 0 tokens