Claude Code: save it as .claude/skills/cost-optimization/SKILL.md
Cursor: save it as .cursor/rules/cost-optimization.md
Codex: save it as .agents/skills/cost-optimization/SKILL.md
ChatGPT, Gemini and other assistants: paste it into custom or project instructions
Skill file
Cost Optimization
When to use
Analyzing cloud spend and identifying top cost drivers
Purchasing or reviewing reserved instances and savings plan commitments
Configuring spot/preemptible instances for fault-tolerant workloads
Establishing tagging strategy and cost allocation across teams
Setting up FinOps practices, monthly review cadence, and unit economics
Configuring storage lifecycle policies or running unused resource cleanup
Setting up budget alerts and cost anomaly detection
Core principles
Measure before committing — 14-30 days of utilization data before sizing or reserving
Commit to baseline, spot the rest — on-demand and spot handle variable load above commitments
Tags are mandatory — untagged resources are unowned resources, unowned resources waste money
Showback before chargeback — visibility first, then accountability
Cost is a non-functional requirement — treat it alongside performance and reliability
Reference Files
references/rightsizing-commitments-spot.md — Instance right-sizing with cloud Recommender tools, 40% utilization threshold, VPA-based K8s right-sizing, Compute Savings Plans vs Reserved Instances vs CUDs per cloud, baseline commitment strategy, spot/preemptible diversification and SIGTERM graceful shutdown, Kubernetes mixed node pool taint/toleration pattern, auto-scaling metric selection and cooldown design
references/tagging-finops-cleanup.md — Mandatory tag taxonomy, tag policy enforcement via Organizations/Azure Policy/OPA, cost allocation showback model, anomaly detection at 20% trailing-average threshold, FinOps lifecycle (Inform/Optimize/Operate), unit economics benchmarking, S3/GCS storage lifecycle transitions, orphaned snapshot and volume cleanup, Cloud Custodian and Komiser tooling, expiry-tag automation pattern, budget alerts at 50/80/100%
Best Practices Checklist
All resources tagged with mandatory cost allocation tags
Baseline workloads covered by reservations or savings plans
Spot instances used for fault-tolerant workloads
Auto-scaling configured with appropriate metrics and limits
Storage lifecycle policies active on all buckets
Weekly unused resource scan and cleanup
Monthly cost review with engineering stakeholders
Cost anomaly alerts configured and tested
Use this skill with your AI agent:Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.