burnlens
Audit Claude Code token usage, identify high-cost MCP servers, and apply automated fixes to lower API bills.
$10
Works with the AI Agents you already use
burnlens
Example session with this skill installed
Show me where my tokens went in the last few sessions and help me cut the costs.
- Read your context and instructions
- Compiled the burnlens
I have analyzed your Claude Code transcripts. Total usage reached 1.2M tokens ($18.40 equivalent) with a 42% cache hit rate. The primary cost driver is the `postgres-mcp` server, which accounts for 60% of context overhead due to large schema fetches. ## Token Usage Analysis | Category | Tokens | Cost (Est) | Primary Driver | | :--- | :--- | :--- | :--- | | **MCP Servers** | 720,000 | $10.80 | `postgres-mcp` (schema introspection) | | **Subagents** | 240,000 | $3.60 | `research-agent` (duplicate searches) | | **Tool Calls** | 150,000 | $2.25 | `ls -R` calls in large directories | | **System/Base** | 90,000 | $1.75 | Baseline context | ### Recommended Optimizations 1. **Restrict MCP Scope**: The `postgres-mcp` server is fetching full table schemas on every query. I can update your `.claude/settings.local.json` to include a `table_filter`. 2. **Ignore Directories**: 15% of your tokens are spent indexing `node_modules`. I can add this to your `.claudeignore`. 3. **Subagent Throttling**: The `research-agent` is recursing too deeply. I can modify the `CLAUDE.md` instructions to limit search depth. **Next steps** - Run `python3 "burnlens/scripts/run.py" fixes` to apply the MCP filtering. - Open the full dashboard at `~/.burnlens/dashboard.html` for a per-session breakdown. - Check `savings` in 3 sessions to see the cost reduction impact.
Connects securely to your tools. The creator never sees your data.
About this skill
Claude Code token consumption can spiral when MCP servers, subagents, and heavy context accumulation go unchecked. Burnlens parses local session transcripts to pinpoint exactly where your budget is going and provides actionable fixes to reduce overhead.
What it does
- Cost breakdown by work type, specific tools, MCP servers, and subagents.
- Cache analysis to identify hit rates and optimization opportunities.
- Usage dashboard generation in HTML and plain-text formats for local review.
- Automated fixes that modify project settings or documentation to trim context.
- Savings tracking to measure the impact of applied optimizations over time.
How it works
- Analyze usage by running the dashboard command to parse
~/.claude/projectstranscripts. - Review insights to identify high-cost tools or subagents via the summary and HTML report.
- Execute fixes to generate a list of recommendations for project-level token reduction.
- Track savings to compare before and after metrics once new sessions have been processed.
Frameworks & tools
This skill requires Python 3.8 or newer. It processes local Claude Code transcripts stored in the standard configuration directories and operates entirely offline.
Why this beats prompting it yourself
Raw transcripts are massive and unstructured. Burnlens automates the parsing, categorization, and cost-calculation logic that a manual prompt cannot handle without hitting context limits itself.
Use cases
- Identify which MCP server is inflating context windows.
- Generate a visual breakdown of project spend for cost management.
- Apply automated rules to
.claude/settings.local.jsonto cap token usage. - Validate if recent workflow changes actually lowered your API bill.
Known limitations
Requires local access to Claude Code transcript directories. Savings metrics require a few sessions of post-fix usage to calculate accurately.
Requires Python 3.8+. Only analyzes local Claude Code transcripts. Savings tracking requires multiple sessions to establish a post-fix baseline.
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 any payment.
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 1 month ago
Requires
Permissions
Allowed Hosts