/release-ops:llm-cost-auditfrom release-ops
Measure and reduce what a product pays for LLM calls - reconcile tracked cost with the provider's bill, check each call site's model tier, find prompt-caching and batch candidates, check that bring-your-own-key paths stay user-paid, and set budget alerts. Ends in a savings table with the cost-per-call arithmetic shown. Use for "audit our AI spend", "why is our model API bill high", "reduce LLM costs", or as a periodic cost-hygiene pass.
Ships in release-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Audit spend where the product actually pays the bill, and end with a savings table, not observations. Every price in the audit comes from the provider's pricing page on the day of the audit. Prices, cache multipliers, and discounts change, and they differ between models from the same provider; a number remembered from an earlier audit or a blog post is not evidence.
If the repository defines its own llm-cost-audit skill or a model-routing policy, follow that instead.
Pricing pages to read (open them; do not quote from memory):
Prices are quoted per million tokens (MTok). For one call:
cost = (uncached_input_tokens × input_price
+ cache_write_tokens × cache_write_price
+ cache_read_tokens × cache_read_price
+ output_tokens × output_price) / 1,000,000
Take token counts from the API response's usage fields, not from estimates. Multiply cost per call by calls per month (from logs or analytics) to get monthly cost per call site. Some models charge a higher rate per token once a prompt passes a length threshold; check the pricing page for length-based tiers and use the rate that matches each call's prompt length. Apply any discount that applies (batch, regional pricing) as a multiplier stated on the pricing page, and write the page URL and the date read beside every price you use.
Pull current spend from two sources and reconcile them:
$ai_generation events; see PostHog, Calculating LLM costs), Langfuse, Helicone, or the project's own usage table. This shows which feature drives spend, not just which model.Check each call site's model tier against the work. Find every place a model is chosen (search for the provider SDK calls and the model parameter). For each:
Find prompt-caching candidates: call sites that send the same long, stable prefix (a system prompt, reference material, a long set of examples) on every request with only the tail changing.
Find batch candidates. Work that needs no synchronous response (nightly generation, bulk classification, backfills, evaluations) can use a batch API. As of this writing both Anthropic and OpenAI document a 50% discount for batch requests, and OpenAI's batches complete within a 24-hour window; confirm the current terms on Anthropic, Batch processing and OpenAI, Batch API. Structure it as submit, poll or receive a webhook on completion, and write results idempotently.
If users bring their own API keys, check the boundary. Per-user generation is supposed to run on the user's key and bill to their provider account. If the company's own key shows non-trivial spend for that product, either a feature was built without going through the user-key path, or an internal tool uses the shared key for user-scoped work. Flag it; aggregate dollar totals hide this.
Set budget alerts. If none exist, set a provider-side spend limit or usage alert and an observability alert below the point where spend becomes an urgent conversation (for example at 70% of the monthly budget, not 100%). Pair any feature that can run away (a generation loop with no cap) with a kill switch; a feature-flags skill, if installed, covers that. The alert says there is a problem; the switch stops it without a deploy.
Produce the savings table. This is the deliverable:
| Finding | Current monthly cost | Action | Estimated savings per month | Price source |
|---|---|---|---|---|
| ... | ... | ... | ... | URL, date read |
End with a total row, and mark which changes are safe to ship now (routing, caching) and which need a test pass first (moving a job to batch changes its structure).
A document app's "summarize" endpoint runs on a provider's top tier.
The savings table, plus the per-call-site routing findings (file:line) for anything flagged for re-routing.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/customer-support-triageSupport inbox workflow for a small team - classify each request (bug, feature request, billing, how-to), attempt reproduction, assign severity, file a standard GitHub issue with no customer PII, check refund requests against the written policy, and draft the reply for a human to send. Use when triaging support email or tickets, or when asked to "handle this support request", "file this bug", or "draft a reply to this customer"./dependency-upgradeSafe batch dependency upgrades across a codebase — inventory outdated packages (npm outdated / uv lock --upgrade), group by risk (patch/minor/major), upgrade in waves with tsc/test/Playwright gates, read changelogs for majors, run `exposure-scan` for supply-chain checks, and land one PR per wave. Use when asked to "upgrade dependencies," "bump packages," "clear npm outdated," or on a periodic maintenance pass./incident-responseProduction incident runbook for a small team - severity call, fixed triage order, rollback-first decision, user comms, and a one-page blameless postmortem. Use when a service is down, erroring, or degraded in production, e.g. "site is down", "we're getting 500s", "uptime alert fired", "users report errors", "was it the last deploy?", "roll back", or "write the postmortem".npx claudepluginhub stylusnexus/agent-plugins --plugin release-ops