Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Coding Agent Spend Audit

    by CashonlyTian

    1

    Audit agent session logs to identify wasted token spend, tool loops, and retry storms with a graded report.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Coding Agent Spend Audit

    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

    PriorityIssueImpactRecommendation
    1Failed Runs-$4.14Investigate the root cause of the error in log_20261126_01.json before re-running.
    2Retry Storms-10 ptsCheck system prompt for ambiguity causing the agent to repeat the same 3 requests.
    3Context Bloat-15 ptsAgent 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

    1. Open scan-2026-11-26.png to view the visual grade and risk bars for your report.
    2. Review the full finding details in scan-report.md to see specific log filenames.
    3. Configure a budget cap in your agent settings to immediately recover 12 points.

    scan-2026-11-26.png

    PDF · document

    Generated

    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

    1. Target logs: Point the skill to your agent's local session directory (e.g., ~/.claude/projects/).
    2. Local audit: The script parses meta.json and session logs locally without network calls or API keys.
    3. Analyze findings: Review the scan-report.md for specific log lines that triggered point deductions.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    This skill is currently optimized for Claude Code and Codex session logs. It specifically parses JSON-formatted logs and metadata files common in these local agent environments.

    The audit is performed entirely locally on your machine without requiring network calls or external API keys. This ensures your proprietary session logs and sensitive code snippets never leave your local environment.

    You will receive the core Python audit script, a suite of 10 diagnostic check modules, and a report generator that outputs Markdown files and visual score-cards. Documentation for interpreting the efficiency grades is also included.

    The skill identifies three primary sources of waste: 'retry storms' where the same prompt repeats, 'tool loops' involving redundant function calls, and 'context bloat' where input tokens exceed efficient limits.

    The report includes a 'Prioritized Fix List' that points you to the specific log lines and session IDs causing the leaks. This allows you to adjust your agent's system prompt or tool-calling logic to prevent those specific patterns in future runs.

    The skill handles individual log files up to 2 MB in size. While it can scan entire directories of sessions, extremely large single-session files exceeding this limit are skipped to maintain local performance.

    New in LLM Ops