cost-audit
Skill49 starsChanged 22 days agoMITView on GitHub
Use when AI inference costs are growing unexpectedly, when comparing model choices by cost/quality ratio, or when optimizing token usage across a multi-model pipeline — produces an actionable cost reduction plan
3 other projects use a version of this.
Adopted by
Most recently taken up by
- cordanaLLM/praetortheir own version, first seen Nov 1, 2026
- kovaa-dev/skillstheir own version, first seen Nov 1, 2026
- Fadi88/one-man-startuptheir own version, first seen Oct 15, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Fadi88/one-man-startup★ 16same name
- cordanaLLM/praetor★ 0same name
- kovaa-dev/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository114 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- design-to-codeSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- go-runtime-debuggingSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Use the most capable model necessary — not the most capable model available.
- Distinctive: line 43
No context caching on static instructions
- Distinctive: line 66
Remove redundant boilerplate from system prompts
- Distinctive: line 89
Use approximate public pricing for estimation.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cost Audit
Audit AI inference costs and optimize token usage across multi-model pipelines. This is not about cutting capabilities — it is about eliminating waste, right-sizing models, and keeping costs predictable.
When to Use
- AI API costs growing faster than usage justifies
- Unsure whether you are using the right model tier for each task
- Want to compare cost-quality trade-offs before committing to a model
- Preparing for production traffic and need a cost baseline
- Running fleet mode or parallel agents and want to avoid runaway spend
Model Cost Tiers
Use the most capable model necessary — not the most capable model available.
| Tier | Models | Best for |
| Premium | claude-opus-5.5 | Architecture decisions, complex multi-file reasoning, security audits |
| Standard | claude-sonnet-5.5, gpt-6.1-sol, gpt-5.3-codex | Most coding tasks, code review, test generation, documentation |
| Fast / Cheap | claude-haiku-4.5, claude-haiku-5.5, gpt-6-luna | File edits, boilerplate, classification, triage, simple summaries |
Tiers are a suggested routing, not an official GitHub classification; take model IDs from /model.
Workflow
1. Identify high-cost call sites
Scan for:
- Long system prompts that repeat across calls
- Premium models used for simple transforms
- Entire file contents passed when only relevant sections are needed
- No context caching on static instructions
- Fleet mode with all agents on premium tiers
2. Measure baseline
| Metric | How to measure |
| Total tokens / task | Compare before and after context changes |
| Model mix | Tally which models are called per workflow |
| Prompt size distribution | Log avg/max token counts per call type |
3. Apply reduction patterns
Model downgrade
- Does this task require premium reasoning? If not, drop a tier.
- Classification, routing, simple edits → use fast/cheap tier
- Reserve premium for tasks that demonstrably need it
Context pruning
- Pass a summary instead of the full history when prior turns are less relevant
- Slice file ranges with
view_rangeinstead of full-file reads - Remove redundant boilerplate from system prompts
Prompt deduplication
- Repeated instructions in every call → move to a system prompt / shared prefix
- Static context that never changes → candidate for caching (if platform supports it)
Task batching
- Small independent tasks → batch into one call instead of N separate calls
- Fan-out agents → assign right tier per task, not fleet-wide premium
4. Estimate savings
For each change:
Change: Replace claude-opus-5.5 on doc-summary with claude-haiku-4.5
Before: ~4,000 tokens × <premium price>/1K = <before>/call
After: ~4,000 tokens × <fast-tier price>/1K = <after>/call
Savings: (<before> − <after>) × calls per periodUse approximate public pricing for estimation. Actual prices vary; check your provider dashboard.
5. Prioritize
| Priority | Criterion |
| High | Premium model on a task a fast model handles well |
| High | Context window > 50K tokens when shorter would suffice |
| Medium | Duplicate context passed on every call |
| Medium | Fleet agents with mismatched model tiers |
| Low | Minor prompt size variations |
6. Report format
## Cost Audit Report
### Summary
Estimated waste: ~$X/day at current scale
Top three opportunities: [list]
### Findings
#### [HIGH] Premium model for boilerplate generation
Location: [file or workflow name]
Issue: `claude-opus-5.5` used for all code generation including templates and stubs.
Recommendation: Use `claude-haiku-4.5` for boilerplate; reserve opus for complex tasks.
Estimated savings: ~80% cost reduction on boilerplate tasks.
#### [MEDIUM] Entire codebase passed as context on every PR review
...Common Waste Patterns
| Pattern | Fix |
| Entire conversation history on every call | Summarize old context, keep recent turns |
| Full file reads when only one function matters | Use view_range for targeted reads |
| Premium model for all parallel agents in fleet | Assign tier per task type |
| Same instructions repeated in every prompt | Move to shared system prompt |
| No caching on static reference docs | Check if your API client supports prompt caching |
See Also
- multi-model-strategy — when to use which model tier
- team-planner — assigning models per agent in a team
orchestration/templates/orchestrator-template.md— model selection guidance in orchestration context
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

