LLM cost audit: a free AI skill that finds wasted tokens
Point Claude (or any agent that supports Agent Skills) at your project and ask "why is our LLM bill so high?". It scans your code's API calls, flags the waste and tells you in dollars what each fix would save.
Version 1.3, MIT license. Needs Python 3.8 or later and no packages. Prices inside checked 26 November 2026.
What it does
- Scans the codebase for Anthropic, OpenAI, Gemini, LiteLLM and Vercel AI SDK calls, and for calls made through LangChain, Pydantic AI, LlamaIndex, CrewAI, DSPy, AutoGen, Haystack, Semantic Kernel, the OpenAI Agents SDK, smolagents and Mastra. It warns when caching is switched on for direct Anthropic only, the gap we found in browser-use.
- Flags likely waste: no caching, timestamps that break the cache, unbounded chat history, frontier models on simple tasks, missing output limits, per-item loops that could be batch jobs.
- Estimates the monthly saving of each fix from real per-token prices.
- Writes a report ordered by dollars saved, with before and after code, and applies the fixes if you ask.
It covers the six techniques from How to cut your LLM API bill: caching, routing to a smaller model, shorter outputs, batch APIs, trimming context and where you buy the tokens.
Install
- Claude apps: download the file above and upload it under Skills in Claude's settings.
- Claude Code: the .skill file is a zip. Unzip it and copy the
llm-cost-auditfolder into~/.claude/skills/(all projects) or.claude/skills/in one project. - Other agents: any agent that reads
SKILL.mdskills can use the unzipped folder as is.
Then ask: "audit our LLM costs".
Example
A coding agent on Claude Sonnet 5.5 with 50M input and 2M output tokens a month. The scan found a timestamp at the top of the system prompt that broke caching on every call.
| Step | Monthly cost |
|---|---|
| Bill today, list price | $120.00 |
| Buy the same tokens via SayGM | $61.80 |
| Shorter outputs | $58.71 |
| Caching fixed (85% of input from cache) | $17.12 −86% |
Prices from the snapshot inside the skill, checked 26 November 2026. Gateway prices change often, and on some open models OpenRouter is currently cheaper; the estimator says so when that's the case.
Disclosure
LessPerToken earns a reward when people sign up to SayGM through its links. The skill reports gateway prices neutrally next to list prices and recommends direct or sealed routes for secrets and client data. Every other technique saves money wherever you buy your tokens.
Found the waste? Pay less for the tokens you keep
One URL change. Keep OpenRouter as your backup.