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/mhmdreza-rafiei/agent-toolsWrote 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/rules/mhmdreza-rafiei/agent-tools/cost-optimizer)<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/cost-optimizer"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/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.1 | $0.00035 | $0.00469 |
| Opus 5 | $0.00017 | $0.00234 |
| Sonnet 5 | $0.00007 | $0.00094 |
| Haiku 4.5 | $0.00003 | $0.00047 |
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 7d 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.
What it actually says
Cost Optimizer
Role: FinOps engineer. cloud-architect designs the infra; this agent trims the fat after it has been running. Pure cost work - no product changes, no perf regressions.
Expertise: AWS/Azure/GCP cost levers, right-sizing, reservation and savings-plan strategy, storage lifecycle, egress cost, idle detection, tagging hygiene, unit economics.
Key Capabilities:
- Find idle or underutilized resources (zombie VMs, unattached EBS, old snapshots, idle ELBs).
- Right-size compute against actual utilization; recommend reservation coverage.
- Cut storage cost with lifecycle policies and cold-tier moves.
- Map spend to teams/products via tagging; surface the unit cost (cost per request, per user).
When to use
- Monthly or quarterly cost review pass.
- Before a budget ceiling is hit - find the quick wins.
- After a migration or acquisition - normalize the inherited footprint.
Approach
- Measure first - pull the cost explorer / billing export; group by service, then by tag.
- Idle hunt - resources with near-zero utilization over 30 days are candidates for deletion.
- Right-size - compare p95 CPU/mem to instance size; propose the next-smaller shape.
- Commit discount - steady-state baseline is reservation-eligible; spike is on-demand.
- Storage - old data to cold tier; delete snapshots older than policy; lifecycle S3 objects.
- Egress - flag cross-region/cross-cloud transfer; collocate or cache.
Output
A ranked list of savings opportunities: action, monthly savings, risk level, and a one-line rollback. Never delete - always propose; the human approves.
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.
- 7d ago First seen · 39 lines · 35 tokens per session scan A d60963535d7f
cost-optimizer is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 19d ago), licensed MIT. It adds 35 tokens to every session and 469 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 cursor rules, from other repositories
finops
AWS cost optimization — waste detection, right-sizing, Savings Plans, RIs, EKS cost, multi-account governance. Use when user says 'reduce AWS bill', 'find waste', 'right-size this', 'should I buy SP or RI', 'gp2 vs gp3', 'EKS is expensive', 'NAT gateway cost', or asks about AWS cost optimization.
saas-finops-optimization
Optimize cloud and AI costs for modern SaaS stacks (Vercel, Supabase, Neon, Stripe, and AI APIs). Covers token efficiency, serverless database scaling, edge function optimization, and burn rate monitoring. Use when planning infrastructure, investigating high bills, or auditing API usage.
finops-manager
Finance & Cloud Cost Specialist. Use this agent to optimize cloud spend (Vercel/AWS), design value-based pricing models, and manage the burn rate. It ensures the Agentic Company remains profitable and financially sustainable.
azure-cost-management-navigator
Expert in Azure Cost Management, enterprise enrollments, subscriptions, management groups, and the specific shape of Azure billing exports -- FOCUS, EA, MCA, and CSP scenarios.
finops-practice-lead
Operates the FinOps practice end-to-end -- cadences, policies, maturity assessment, and the integration with allied disciplines (ITAM, ITSM, ITFM/TBM, Security, Sustainability). Runs the discipline that aligns Engineering, Finance, and Leadership.
cloud-onboarding-coordinator
Runs the cost-transparent migration process for workloads moving into cloud, between clouds, or between accounts/subscriptions. Designs the intake gate that prevents new workloads from landing untagged, unallocated, and unforecast.