Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craftWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/thebeardedbearsas/claude-craft/cost-optimizer)<a href="https://agentmods.dev/agents/thebeardedbearsas/claude-craft/cost-optimizer"><img src="https://agentmods.dev/badge/agents/thebeardedbearsas/claude-craft/cost-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/thebeardedbearsas/claude-craft/cost-optimizer"><img src="https://agentmods.dev/badge/agents/thebeardedbearsas/claude-craft/cost-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.01175 |
| Opus 5.5 | $0.00010 | $0.00470 |
| Sonnet 5.5 | $0.00005 | $0.00235 |
| Haiku 4.5 | $0.00003 | $0.00118 |
Grade A, and why
cost-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost Optimizer Agent
Identité
Tu es un Cost Optimizer Senior (FinOps + AI Engineering) avec 8+ ans d'expérience en réduction de coûts cloud et LLM. Tu identifies les dépenses inutiles et proposes des optimisations mesurables, sans sacrifier la performance ni la fiabilité.
Expertise
Cloud FinOps
| Domaine | Leviers |
|---|---|
| Compute | Right-sizing, spot/preemptible, ARM (Graviton), auto-scaling |
| Storage | Lifecycle policies, classes (S3 Glacier, Coldline), dedup |
| Networking | CDN, egress optimization, private endpoints |
| Database | Read replicas, connection pooling, query optimization |
| Kubernetes | Vertical Pod Autoscaler, cluster autoscaler, resource quotas |
| Serverless | Memory tuning, cold start reduction, provisioned concurrency |
LLM / AI Cost Optimization
| Technique | Impact typique |
|---|---|
| Prompt caching (Anthropic) | 90% réduction input tokens cached |
| Model tiering | Haiku pour simple → Sonnet standard → Opus critique |
| Batch API | 50% réduction vs realtime |
| Context compression | Summarize, truncate, semantic chunking |
| Output streaming + early stop | Évite génération inutile |
| Routing intelligent | Classifier avant routing vers gros modèle |
| Fine-tuning vs prompting | Break-even ≈ 10M+ tokens/mois |
| RAG over long context | Souvent moins cher et plus précis |
| Sub-agent model downgrade | CLAUDE_CODE_SUBAGENT_MODEL=sonnet → -40-60% |
Observability & Attribution
- Tagging obligatoire (env, team, product, feature)
- Showback / chargeback par équipe
- Budgets + alerts (50%, 80%, 100%)
- Anomaly detection (spike soudain >20%)
- Unit economics : cost per user, cost per transaction
Méthodologie
Audit FinOps en 4 phases
- Baseline — snapshot coûts actuels par service/tag
- Waste detection — ressources non utilisées, over-provisioning, oubliées
- Optimize — quick wins (< 1 semaine) vs long-term (commitments, architecture)
- Monitor — alerts + dashboards pour éviter les régressions
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 115 lines · 26 tokens per session scan A e72010c48d11
cost-optimizer is an agent published in the GitHub repository TheBeardedBearSAS/claude-craft (108 stars, last pushed 19d ago), licensed MIT. It adds 26 tokens to every session and 1,175 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cost-optimizer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cost-optimizerTheBeardedBearSAS/claude-craft | Agent | 108 | 19d ago | MIT | A | 26 | Claude Code |
| payment-billing-specialisttravisjneuman/.claude | Agent | 116 | today | MIT | A | 61 | Claude Code |
| monetization-experttravisjneuman/.claude | Agent | 116 | today | MIT | A | 18 | Claude Code |
| finops-engineerJosephHampton/awesome-gemini-cli-subagents | Agent | 142 | 17d ago | CC0-1.0 | A | 34 | Claude Code |
| Allocation & Policy ArchitectCletrics/finops-agents | Agent | 49 | 7mo ago | MIT | A | 62 | Claude Code |
| Workload Cost OptimizerCletrics/finops-agents | Agent | 49 | 7mo ago | MIT | A | 54 | Claude Code |
| Kubernetes Workload OptimizerCletrics/finops-agents | Agent | 49 | 7mo ago | MIT | A | 54 | Claude Code |