Works with the AI Agents you already use
Coding Agent Spend Audit
by CashonlyTian
Audit agent session logs to identify wasted token spend, tool loops, and retry storms with a graded report.
$29
Coding Agent Spend Audit
Example session with this skill installed
Audit my VibeShop project logs at reference/demo-project. Today's date is 2026-11-26. Use SpendCheck Demo as the brand.
- Read your context and instructions
- Compiled the coding agent spend
- Generated the document
I have completed the audit of your agent session logs for the VibeShop project. The scan analyzed the local logs to identify wasted inference spend and efficiency bottlenecks.
Summary of Results:
- Score: 21/100 (Grade: F)
- Risk Level: CRITICAL
- Findings: 16 total (2 critical, 7 high, 7 medium)
- Estimated Spend: $5.13 total ($4.14 / 81% wasted on failed runs)
- Model Usage: 40% Opus-class (expensive-tier)
Audit Deliverables
Priority Fix Report
| Priority | Issue | Impact | Recommendation |
|---|---|---|---|
| 1 | Failed Runs | -$4.14 | Investigate the root cause of the error in log_20261126_01.json before re-running. |
| 2 | Retry Storms | -10 pts | Check system prompt for ambiguity causing the agent to repeat the same 3 requests. |
| 3 | Context Bloat | -15 pts | Agent consumed > 100k tokens in a single run; prune irrelevant files from context. |
Diagnostic Data
### 10-Check Scorecard
- failed_runs: 0/15 (Critical failure rate)
- retry_storms: 0/10 (Identified in 3 sessions)
- tool_loops: 5/12 (Identical tool args detected)
- repeated_reads: 2/8 (Files read 5+ times without edits)
- oversized_output: 5/5 (Pass)
- context_bloat: 0/15 (Input tokens exceeded 100k)
- long_runs: 2/5 (Runs > 60m without checkpoints)
- model_routing: 2/5 (High Opus usage)
- budget_cap: 0/12 (No budget cap found in config)
- spend_tracking: 5/13 (Missing usage data in 30% of logs)
Next steps
- Open
scan-2026-11-26.pngto view the visual grade and risk bars for your report. - Review the full finding details in
scan-report.mdto see specific log filenames. - Configure a budget cap in your agent settings to immediately recover 12 points.
scan-2026-11-26.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Agent session logs are often a black box of wasted tokens. Developers lose money on tool loops, retry storms, and context bloat without realizing it. This skill audits your local agent logs to find exactly where inference spend is leaking.
What it does
- Detects retry storms by identifying identical prompts sent 3+ times in a row.
- Identifies tool loops where agents call the same tool with identical arguments repeatedly.
- Flags context bloat for runs consuming over 100,000 input tokens.
- Scores efficiency across 10 distinct checks to provide a grade (0-100) and risk level.
- Estimates wasted spend based on public model pricing and failed run logs.
- Generates visual reports including a shareable score-card PNG and a prioritized Markdown fix list.
How it works
- Target logs: Point the skill to your agent's local session directory (e.g.,
~/.claude/projects/). - Local audit: The script parses
meta.jsonand session logs locally without network calls or API keys. - Analyze findings: Review the
scan-report.mdfor specific log lines that triggered point deductions. - Fix and re-run: Implement the prioritized fixes and run the audit again to verify the improved score.
Frameworks & tools
The audit tool is built with Python, using a local scripts/run.py to process JSON session data. It is compatible with logs from Claude Code and Codex.
Why this beats prompting it yourself
Manual log analysis for thousands of tokens is impossible. This skill automates the detection of non-obvious patterns like repeated file reads and sub-optimal model routing that a general prompt would miss without full log context.
Use cases
- Auditing local dev agent spend to justify costs to management.
- Debugging why an agent is stuck in an expensive tool-call loop.
- Identifying runs that fail and waste 80% of their token budget.
- Generating a score-card for client-facing project health reports.
Known limitations
Cost figures are estimates based on public list prices and may not match exact provider bills. Runs without error markers or timestamps skip certain checks. Files over 2 MB are skipped.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Estimates use public prices, not exact bills. Runs without timestamps skip duration checks. Logs without error markers aren't flagged as failed. 2MB file limit.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
- Software
Python 3Pillow