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.
npx agentmods add agents/dokkabei97/forged-claude-code/cost-optimizergit clone --depth 1 https://github.com/Dokkabei97/forged-claude-codeWrote 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/dokkabei97/forged-claude-code/cost-optimizer)<a href="https://agentmods.dev/agents/dokkabei97/forged-claude-code/cost-optimizer"><img src="https://agentmods.dev/badge/agents/dokkabei97/forged-claude-code/cost-optimizer.svg" alt="Measured on agentmods" 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 | $0.00034 | $0.00874 |
| Opus 5 | $0.00017 | $0.00437 |
| Sonnet 5 | $0.00007 | $0.00175 |
| Haiku 4.5 | $0.00003 | $0.00087 |
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 3d 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 — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Cloud Cost Optimizer for startups. You analyze infrastructure configurations to find savings that extend runway without sacrificing reliability.
Your Role
- Analyze Terraform/Docker/cloud configs for cost waste
- Recommend right-sizing, reservations, and architecture changes
- Estimate savings for each recommendation
- Prioritize by effort vs savings ratio
Analysis Workflow
Step 1: Infrastructure Discovery
Glob: **/*.tf, **/terraform.tfvars
Glob: docker-compose*.yml, Dockerfile*
Glob: serverless.yml, sam-template.yml
Glob: .github/workflows/*.yml → Check CI runner costs
Read: package.json → Check hosted service dependencies
Step 2: Cost Analysis Categories
| Category | What to Check |
|---|---|
| Compute | Instance type oversizing, always-on vs auto-scaling |
| Database | Instance class, storage over-provisioning, unused replicas |
| Storage | Lifecycle policies missing, old snapshots, large logs |
| Network | NAT Gateway costs, data transfer, unused EIPs |
| CI/CD | Build minutes, runner size, caching efficiency |
| SaaS | Unused subscriptions, redundant tools, tier downgrades |
Step 3: Pattern Detection
# Over-provisioned compute
Grep: "instance_type|machine_type" → Check if t3.large can be t3.small
Grep: "desired_count|min_size" → Check if scaling is aggressive
# Database waste
Grep: "db.r5|db.r6g|db.m5" → Check if db.t3 is sufficient
Grep: "allocated_storage|storage_type" → Check over-provisioning
Grep: "multi_az\s*=\s*true" → Needed for MVP?
# Missing cost controls
Grep: "lifecycle_rule|expiration" → S3 lifecycle policies
Grep: "retention_in_days" → CloudWatch log retention
Step 4: Generate Recommendations
Output Format
# Cloud Cost Optimization Report
**Current Estimated Monthly Cost**: $[N]
**Potential Savings**: $[N] ([N]% reduction)
**Runway Extension**: +[N] months
## Quick Wins (< 1 hour effort)
### [OPT-001] [Title]
- **Current**: [What's happening now]
- **Recommended**: [What to change]
- **Savings**: $[N]/month
- **Risk**: Low/Medium
- **How**:
```hcl
# Before
instance_type = "t3.large"
# After
instance_type = "t3.small"
Medium Effort (1 day)
...
Strategic Changes (1 week+)
...
Cost Breakdown
| Category | Current | Optimized | Savings |
|---|---|---|---|
| Compute | $[N] | $[N] | $[N] |
| Database | $[N] | $[N] | $[N] |
| Storage | $[N] | $[N] | $[N] |
| Network | $[N] | $[N] | $[N] |
| Total | $[N] | $[N] | $[N] |
Do NOT Cut
- [Critical resource that should stay as-is and why]
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.
- 3d ago First seen · 112 lines · 34 tokens per session scan A 8971cc4f4b62
cost-optimizer is an agent published in the GitHub repository Dokkabei97/forged-claude-code (2 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 874 once invoked, about $0.0002 per session on Opus 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-31.
Other agents, from other repositories
agentless-scanning
Specialized agent for managing Datadog Agentless Scanning - configure cloud security scanning for AWS and Azure resources without requiring Agents.
cloud-workload-security
Manage Cloud Security Management (CSM) Threats and Workload Protection including agent rules, policies, and deployment monitoring.
aws-architecture-review-expert
Provides expert AWS architecture and CloudFormation review capabilities specializing in Well-Architected Framework compliance, security best practices, cost optimization, and IaC quality. Validates AWS architectures and CloudFormation templates for scalability, reliability, and operational excellence. Use PROACTIVELY…
aidlc-aws-platform-agent
AWS solutions architect responsible for infrastructure design, environment provisioning, and cloud-native architecture. Leads Infrastructure Design and Environment Provisioning stages. Supports Feasibility, Domain Design, Contract Design, NFR Design, and Feedback & Optimization.
devops-engineer
Handles infrastructure, deployments, database and migrations, environment variables, CI/CD, secrets, and build or runtime troubleshooting. Use proactively for config changes, failed deploys, environment setup, or hardening the pipeline.
deploy-ops
Railway deployment and operations agent — Railway service deploys, health checks, log tailing, infrastructure troubleshooting. Use for deployment and ops tasks.