Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    agent cost auditor

    2

    Audit your AI agent's logs for wasted tokens and get a dollar estimate of what you'd save. Works with ghost-tracer and ghost-reason logs.

    Free

    5.0 (1 review)
    agent cost auditor

    agent cost auditor

    Example session with this skill installed

    Analyze my agent logs in logs/ghost_tracer.db and tell me why my costs are spiking.

    • Read your context and instructions
    • Compiled the agent cost auditor

    I have audited the tool-call logs in `logs/ghost_tracer.db`. The analysis identified significant token waste in the `search_docs` tool due to redundant calls with identical arguments. ## Agent Cost Audit Report | Metric | Value | | :--- | :--- | | **Total Tool Calls** | 1,240 | | **Redundant Calls** | 215 | | **Retry Loops Detected** | 42 | | **Most Expensive Tool** | `search_docs` | | **Error Rate (Global)** | 12.4% | | **Est. Tokens Wasted** | 458,200 | | **Est. Savings Opportunity** | $6.87 | ### Per-Tool Breakdown - **search_docs**: 850 calls, 180 redundant. High waste due to lack of local caching for identical queries. - **file_write**: 120 calls, 15 retries. Multiple failures on `PermissionError` suggest a logic flaw in path handling. - **web_scrape**: 270 calls, 20 redundant. Generally efficient, but 5% of calls repeat on timeout. **Next steps** 1. Implement a simple cache for `search_docs` to skip identical API calls within the same session. 2. Debug the `file_write` tool to handle file locks or permissions before attempting the call. 3. Use the `--json` flag to export these metrics into your CI pipeline for regression testing.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Your agent isn't slow — it's redundant. Agent Cost Auditor reads your agent's local log and finds the three patterns that waste the most context: • Redundant calls — the same tool called with identical arguments, over and over. Usually a missing memoization layer. • Retry loops — the same tool called again immediately after an error. Usually a retry policy with no backoff and no cap. • Duplicate thoughts — the agent re-reasoning the same step because the context window dropped it. For each pattern it prints a count and a quantified savings estimate in tokens and dollars, so you can rank fixes by ROI instead of guessing. WHAT YOU GET • SKILL.md — the skill definition your agent reads • scripts/run.py — the auditor itself, stdlib-only, no pip install required • reference/setup.md — how to point it at your log and act on the report WORKS WITH • ghost-tracer logs (tool calls) • ghost-reason logs (reasoning steps) WHAT IT DOES NOT DO • No network calls. Your logs never leave your machine. • No environment variables to configure. • No dependencies — it runs on a clean Python 3.9+ install. Built by the author of ghost-tracer, ghost-reason, and context-bridge-mcp (Official MCP Registry).

    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.

    Requires logs in SQLite format from ghost-tracer or ghost-reason. Financial savings are estimates for relative ranking.

    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

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Listed1 day ago
    Updatedtoday

    What's inside

    Frequently Asked Questions

    The skill specifically parses SQLite databases generated by the ghost-tracer or ghost-reason libraries. It can audit any agent—regardless of its framework—as long as it uses these tools for logging its tool calls and reasoning steps.

    No, the auditor operates entirely on your local machine using your existing log files. It does not require your API keys or access to your live LLM provider, ensuring your sensitive operational data remains secure.

    The cost quantification uses customizable metadata to estimate token and dollar waste. While it provides highly accurate redundancy counts, the financial impact is an estimate based on current standard model pricing rather than a real-time link to your billing dashboard.

    You receive the core Python auditing script, the necessary configuration templates for cost analysis, and documentation on how to interpret the redundancy and loop-detection reports.

    Yes, you can export findings into structured JSON, which is ideal for integration into CI/CD pipelines or automated dashboards to monitor agent efficiency over time.

    New in LLM Ops

    Free