Works with the AI Agents you already use
agent cost auditor
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
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
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
Trust & safety
Security scan
Security scan passed 1 day ago
- Free with an Agensi account
- Software
Python