/ai-cost-audit

Cost per action, user and plan from real usage, with savings ranked by risk.

Grow·Usage → Costs·MIT
$npx skills add tushaarmehtaa/tushar-skills --skill ai-cost-audit -g -a claude-code -y

Then type /ai-cost-audit in Claude Code, or describe the task and let it pick the skill.

What you get back recorded run · 9 Oct 2026

claude · tallyroom

Using /ai-cost-audit
The free tier is eating the margin, not model choice.
Claude Code 2.1.295·1m 54s·1 file changed
  • September AI spend comes to $13,819. That's $0.29 per monthly active user, or $4.46 per Pro subscriber if the whole bill is charged to paying users. Revenue is $24,800, so AI cost is 56% of it.
  • Where the margin goes: mostly the free tier. Features free users get account for $10,511 (76% of spend).
  • Batch the weekly digest: about $627/month. Nobody reads it before Monday 9am, so slower processing changes nothing for users.
  • The search-rerank caching idea doesn't hold up yet. The export's note says every call sends the same 2,400-token prompt, but the logged average input is only 1,600 tokens per call. Both can't be true.
CaveatPrices come from the provided context and were not checked against official pricing.

Input → output from the run

September usage
feature,model,calls,input_tokens,output_tokens,cached_input_tokens,notes
note_summary,claude-sonnet-4-5,412000,1236000000,82400000,0,"runs on every note save, even unchanged notes"
auto_tag,claude-sonnet-4-5,655000,393000000,6550000,0,"returns 1-3 tags from a fixed list of 40"
search_rerank,claude-haiku-4-5,1840000,2944000000,18400000,0,"same 2,400-token system prompt on every call"
weekly_digest,claude-sonnet-4-5,38000,304000000,22800000,0,"sent Sunday night, nobody reads it before Monday 9am"
ask_your_notes,claude-opus-4-1,21000,168000000,10500000,0,"chat over notes, Pro only"
Cost review
I've written `cost-review.md`. September AI spend comes to $13,819. That's $0.29 per monthly active user, or $4.46 per Pro subscriber if the whole bill is charged to paying users. Revenue is $24,800, so AI cost is 56% of it.

Where the margin goes: mostly the free tier. Features free users get account for $10,511 (76% of spend). An average Pro user costs about $1.29/month against $8 of revenue, so Pro is profitable. The ~44,900 free users cost about $9,800/month with no revenue behind them. If free users double while Pro stays flat, AI cost reaches about 95% of revenue. That growth risk matters more than any model choice.

When to use it

Use when

Use when AI cost, margin, pricing, model choice or savings must be measured or verified.

Skip it when

Skip it if you want a cheaper model picked from a price table; it needs eval data and current official prices.

The thinking behind it

AI costs hide inside every call. Price each action, user and plan from real usage, and you see what to cut without hurting quality.

Output contract from the skill's Output contract section

Return only sections supported by the selected mode:

  • scope and evidence ledger;
  • model/media call inventory with file paths and ownership;
  • assumptions and data gaps;
  • formulas with units and a scenario table;
  • highest-cost paths and invoice reconciliation;
  • prioritized changes with savings ranges and quality gates;
  • verification results or an explicit measurement plan.

Cite every time-sensitive price with an official source and retrieval date.

How it checks its own work from the instructions

  • Inventory covers retries, fallbacks, background jobs, and non-text operations
  • Measured and estimated inputs stay distinguishable
  • Bottom-up totals reconcile to billed totals when billing exists
  • Every recommendation has a quality gate and rollback path

Requirements what it needs

Works in
Codex, Claude Code, Cursor, Claude app
Needs
network access, files you provide

The instructions SKILL.md · 74 lines

Instructions & references

Back to overview ↑
On this page 7 sections
SKILL.md · MIT

AI cost audit

Build a cost model from observed usage and current primary-source prices. Treat repository intent, measured usage, invoices, and projections as different evidence classes.

Choose a mode

  • Inventory: map model/media calls, routing, retries, and ownership.
  • Economics: calculate cost per action, user, plan, and month.
  • Simulation: compare pricing, volume, model, cache, batch, or abuse scenarios.
  • Optimization: rank changes after measuring quality and operational risk.
  • Reconciliation: explain the gap between bottom-up estimates and provider invoices.
  • Verification: confirm that a completed change reduced spend without unacceptable quality or latency regressions.

Use the narrowest mode that answers the request. Combine modes only when the user asks for a full audit or the dependency is necessary.

Workflow

  1. Inspect the repository, existing telemetry, billing exports, pricing configuration, and prior analyses before asking questions.
  2. State the audit boundary: environments, date range, providers, features, currencies, taxes, credits, and whether non-model infrastructure is included.
  3. Inventory direct and indirect calls: generation, reasoning, embeddings, reranking, tools, image/audio/video, moderation, retries, fallbacks, agents, queues, evaluations, and batches.
  4. Prefer provider-metered tokens or media units. Keep measured values, code-derived estimates, generic estimates, and assumptions visibly separate. Use p50, p95, and worst-case where available.
  5. Fetch current prices only from official provider sources when pricing affects the answer. Record URL, retrieval date, region/tier/currency, and special terms such as cached input, reasoning tokens, batch, storage, or minimum charges. Do not rely on bundled price tables or memory.
  6. Model each cost path, including failed calls, retry amplification, tool loops, cache writes/reads, storage, egress, gateway fees, payment fees, free allowances, and shared fixed costs when relevant.
  7. Reconcile the modeled total against invoices or billing dashboards. Quantify unexplained variance instead of forcing agreement.
  8. Run normal, high-usage, abuse, and sensitivity scenarios. Do not apply universal margin or traffic thresholds without the product's business constraints.
  9. Rank recommendations by expected savings range, evidence confidence, quality risk, latency effect, engineering effort, reversibility, and measurement plan.
  10. Require an evaluation and canary before changing models, prompts, routing, or output limits. Verify spend, quality, latency, error rate, and user outcomes afterward.

Ask only for inputs that cannot be recovered from the scoped artifacts and materially change the result.

Safety and evidence rules

  • Never invent usage, conversion, revenue, invoice, cache-hit, or quality inputs.
  • Never expose secrets found in environment files or billing exports.
  • Do not recommend a cheaper model solely from task labels; require representative evaluation data.
  • Label projections as projections and show formulas with units.
  • Treat prices and model availability as time-sensitive.

Load conditional references

  • Read model inventory for discovery patterns, call-path fields, and routing analysis.
  • Read unit economics for formulas, reconciliation, scenario design, and recommendation ranking.

These references provide specialist detail only. This file controls mode, interaction, safety, output, and verification.

Output contract

Return only sections supported by the selected mode:

  • scope and evidence ledger;
  • model/media call inventory with file paths and ownership;
  • assumptions and data gaps;
  • formulas with units and a scenario table;
  • highest-cost paths and invoice reconciliation;
  • prioritized changes with savings ranges and quality gates;
  • verification results or an explicit measurement plan.

Cite every time-sensitive price with an official source and retrieval date.

Verify

  • Inventory covers wrappers, retries, fallbacks, background jobs, and non-text operations.
  • Totals preserve units, currencies, date ranges, and environment boundaries.
  • Measured and estimated inputs are distinguishable.
  • Bottom-up totals are reconciled to billed totals when billing is available.
  • Recommendations include a quality gate, rollback path, and owner or next action.
  • Completed optimizations are verified with before/after spend, quality, latency, and error data.
View on GitHub ↗
Claude app, ChatGPT and ZIP download

Claude app

This workflow can run in chat using the files and context you provide. Download its complete ZIP, then upload it from Claude's Skills settings.

ChatGPT Skills

This workflow is suitable for ChatGPT Skills. ChatGPT does not document the same upload archive format as Claude, so follow its uploader instead of reusing the Claude ZIP.

Package details
Package
ai-cost-audit/SKILL.md
Author
@tushaarmehtaa
Added
7 Aug 2026
Tags
aimodelscostroutingmarginscachingbatch