llm-cost-guardlisted
Install: claude install-skill windchillscalanthes-ship-it/llm-cost-guard
# LLM Cost Guard
Catch the LLM call that quietly multiplies your bill — and rewrite it to cost a
fraction, before the invoice arrives.
A single innocent-looking pattern (re-sending an 8K-token system prompt on every
request without caching, calling a frontier model for a yes/no classification,
letting an agent loop with no token ceiling) can turn a $180/month feature into a
$2,400/month one. It passes review because it *works* — cost isn't in the diff.
This skill reads the code, finds the dominant cost driver, and produces the
cheaper rewrite with the spend before and after — while naming the latency and
quality trade-offs so the fix is honest.
## When to use this
- You are **writing** code that calls an LLM or embedding API and want it checked.
- You are **reviewing** a prompt, a RAG pipeline, an agent loop, or a batch job.
- The **bill went up** and you want to know which call is driving it.
- Someone asks "why is this so expensive?", "can we make this cheaper?", or "should
this use a smaller model?".
If the feature is low-volume (an internal tool run a few times a day), most of this
doesn't matter — say so and don't over-engineer. Cost optimization is worth effort
in proportion to **calls × tokens × price**; a prototype nobody hits is not the
place for a caching strategy.
## Workflow
1. **Establish context.** Identify the **provider and model(s)** (Anthropic/Claude,
OpenAI, Bedrock, Vertex, …), the **call site** (per-request endpoint, batch job,
agent loop,