aws-cost-optimizer
Skill12 starsChanged 5 months agoMITView on GitHub
Systematically reduces AWS cloud spend by right-sizing over-provisioned compute, finding and eliminating idle or orphaned resources, committing to Savings Plans and Reserved Instances, and enforcing cost-allocation tagging. Use this skill when the user asks to "reduce AWS bill", "optimize cloud costs", "find idle EC2/RDS/EBS", "right-size instances", "should I buy a Savings Plan or Reserved Instance", "set up cost allocation tags", "why is my AWS bill so high", or wants a structured FinOps cost-reduction plan.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use the bundled assets:
- Very specific: line 37
Quantify, rank, and report: Run scripts/cost_analysis.py over an inventory JSON to score and rank findings by monthly savings and …
- Distinctive: line 51
Never commit (SP/RI) before eliminating and right-sizing.
- Distinctive: line 58
Run through these and record each as a finding (service, resource id, monthly $, action, risk):
- Distinctive: line 80
Reason in amortized cost: when commitments exist; unblended hides the smoothing of upfront payments.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AWS Cost Optimizer
Overview
Keywords: AWS cost, FinOps, right-sizing, idle resources, orphaned resources, Savings Plans, Reserved Instances, RI, Spot, cost allocation tags, Cost Explorer, CUR, unblended cost, amortized cost, NAT gateway, gp2 to gp3, S3 lifecycle, Graviton, Compute Optimizer, anomaly detection.
This skill drives a repeatable cost-reduction workflow across the five highest-leverage levers: eliminate (idle/orphaned), right-size (over-provisioned), commit (Savings Plans / RIs), modernize (newer/cheaper SKUs and storage tiers), and attribute (tagging + showback). Always quantify monthly savings, rank by effort-vs-impact, and never recommend a change without stating its risk and rollback.
Use the bundled assets:
references/cost-levers.md— the full catalog of cost-reduction levers per service with detection signals and typical savings.references/savings-plans-vs-ri.md— decision framework and break-even math for commitment purchases.references/tagging-strategy.md— cost-allocation tag taxonomy and enforcement patterns.scripts/cost_analysis.py— stdlib-only analyzer that scores resources for waste and ranks recommendations from JSON inventory.templates/cost-optimization-report.md— fill-in deliverable for stakeholders.examples/right-sizing-walkthrough.md— a concrete end-to-end example.
Workflow
- Establish the baseline. Pull the last 1–3 months from Cost Explorer or the Cost & Usage Report (CUR). Always reason in amortized cost (commitments spread over their term), not unblended, so commitments aren't double-counted. Break spend down by service, by linked account, and by tag. Record the top 10 cost drivers — typically EC2, RDS, S3, data transfer, and NAT gateways.
- Eliminate waste first (zero risk, fast). Idle and orphaned resources are pure savings with no performance trade-off. Scan for: unattached EBS volumes, unassociated Elastic IPs, idle/empty load balancers, stopped instances still holding EBS, old EBS/RDS snapshots, idle NAT gateways, dev/test resources running 24/7, and forgotten dev environments. See
references/cost-levers.md"Eliminate" section. - Right-size over-provisioned resources. Use CloudWatch / Compute Optimizer signals (p95 CPU, memory if the agent is installed, network, IOPS). Flag instances with sustained low utilization (e.g., p95 CPU < 40% and max < 60% over 14 days). Recommend the smallest instance that keeps headroom. Prefer downsizing one family step at a time. See
references/cost-levers.md"Right-size". - Modernize SKUs and storage. Migrate gp2→gp3 EBS (≈20% cheaper + tunable IOPS), x86→Graviton (≈20% better price/performance), older instance generations→current (m5→m6/m7), and apply S3 lifecycle / Intelligent-Tiering. These are recurring savings with low risk after testing.
- Commit to what's left (after steps 2–4). Only buy Savings Plans / RIs for the stable baseline that remains after eliminating and right-sizing — never commit to waste. Use
references/savings-plans-vs-ri.mdto choose Compute SP vs EC2 Instance SP vs RIs, term (1yr vs 3yr), and payment option. Target coverage of the bottom 60–80% of steady-state usage; leave the variable top on on-demand or Spot. - Attribute costs with tags. Implement the tag taxonomy in
references/tagging-strategy.md, activate cost-allocation tags in Billing, enforce with tag policies / SCPs, and set up showback per team/product. Untagged spend above a threshold is itself a finding. - Quantify, rank, and report. Run
scripts/cost_analysis.pyover an inventory JSON to score and rank findings by monthly savings and implementation effort. Produce the deliverable fromtemplates/cost-optimization-report.mdwith prioritized recommendations, total addressable savings, and a rollout order. - Institutionalize. Turn on AWS Cost Anomaly Detection and budgets with alerts, schedule a monthly review, and set a coverage/utilization target for commitments. Cost optimization is continuous, not a one-time project.
Prioritization framework (effort vs. impact)
Rank every finding into one of these buckets. Do the top-left first.
| High savings | Low savings | |
| Low effort | DO NOW — delete orphaned EBS/EIP, gp2→gp3, stop idle, schedule dev | QUICK WIN — small snapshot cleanup, tag fixes |
| High effort | PLAN — right-size fleets, Graviton migration, 3yr commitments | DEFER — marginal refactors |
Decision rules:
- Never commit (SP/RI) before eliminating and right-sizing; you'd lock in waste.
- Idle/orphaned deletions are reversible-by-recreation but verify ownership first (a 7-day tag-then-wait beats immediate deletion).
- Right-sizing needs ≥14 days of metrics; a quiet week (holiday) invalidates the sample.
- For commitments, prefer 1-year No Upfront unless cash flow allows 3-year for max discount on truly stable workloads.
Worked detection checklist
Run through these and record each as a finding (service, resource id, monthly $, action, risk):
- Unattached EBS volumes (
state == available) - Unassociated Elastic IPs (charged when not attached to running instance)
- Load balancers with zero healthy targets / near-zero traffic
- Idle NAT gateways (hourly + per-GB; consolidate or use VPC endpoints)
- EBS snapshots older than retention policy / orphaned (source volume gone)
- Old AMIs and their backing snapshots
- Stopped EC2 instances older than N days (still paying for EBS)
- gp2 volumes that should be gp3
- EC2/RDS with p95 CPU < 40% over 14 days (right-size candidate)
- RDS instances with no connections / idle
- Provisioned IOPS far above actual usage
- S3 buckets with no lifecycle policy and old/cold objects
- On-demand steady-state usage with no Savings Plan coverage
- x86 workloads that could run on Graviton
- Untagged resources above cost threshold
- Previous-generation instance families (m4/m5, c4/c5, r4/r5)
- Over-provisioned commitments (low SP/RI utilization)
Best Practices
- Reason in amortized cost when commitments exist; unblended hides the smoothing of upfront payments.
- Quantify everything in $/month. "This volume is idle" is weak; "this 500 GB gp2 volume costs $50/mo and is unattached" drives action.
- Tag before you delete. Apply a
cost-review: candidate-deletetag, wait a defined window, then remove. Prevents deleting something load-bearing. - Commit only to baseline. Coverage target 60–80% of steady-state; never 100% — variable usage stays on-demand/Spot.
- Right-size on p95/p99, not average. Averages hide spikes; use percentiles plus max.
- Validate with ≥14 days of metrics and exclude anomalous low-traffic periods.
- Use Spot for fault-tolerant, stateless, interruptible workloads (batch, CI, stateless web behind ASG) — up to ~90% off.
- Storage class transitions need lifecycle math: retrieval costs and minimum storage durations can erase savings for frequently accessed data.
- Data transfer is a silent driver: cross-AZ, NAT egress, and inter-region transfer add up; prefer VPC endpoints and same-AZ placement.
- Make it continuous: budgets, anomaly detection, monthly reviews, and commitment-utilization dashboards.
Common Pitfalls
- Buying a Savings Plan before right-sizing — locks in money on instances you were about to shrink. Always eliminate + right-size first.
- Optimizing on unblended cost with active RIs — distorts which service is "expensive"; switch to amortized.
- Deleting "idle" resources without checking ownership — that "unused" volume may be a quarterly batch job's data. Tag-and-wait.
- Right-sizing from a single day or average CPU — leads to under-provisioning and incidents. Use 14+ days and percentiles.
- 100% commitment coverage — over-committing on variable workloads costs more than on-demand on the unused portion.
- Ignoring data-transfer and NAT charges — they don't show as a "compute" line but can be 10–20% of the bill.
- gp3 blind migration without IOPS/throughput tuning — gp3 baseline is 3000 IOPS/125 MB/s; high-throughput gp2 volumes may need explicit provisioning.
- No tagging governance — without enforced tags, you can't attribute or show back, so optimization stalls organizationally.
- Treating it as one-off — savings erode within months as new resources spin up; institutionalize the review.
Other versions4 projects use a version of this.
Word for word · 2
- jaskirat1616/grok-skills★ 22100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 2
- Ghosteken/agent-harness★ 2same name
- Ryanb58/agentskills★ 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 repository75 other files it gives its agents.
- 0-templateSkill
- ab-test-analyzerSkill
- adr-authorSkill
- api-designerSkill
- api-docs-writerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- changelog-keeperSkill
- chart-chooserSkill
- code-reviewerSkill
- competitive-analysisSkill
- concept-explainerSkill
- cover-letter-writerSkill
- cron-schedulerSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- decision-matrixSkill
- dependency-upgraderSkill
- dockerfile-proSkill
- email-composerSkill
- error-handling-patternsSkill
- event-plannerSkill
- flashcard-generatorSkill
- gdpr-data-mapperSkill
- gift-advisorSkill
- github-actions-builderSkill
- git-workflowSkill
- habit-builderSkill
- incident-postmortemSkill
- interview-prepSkill
- job-description-writerSkill
- json-schema-authorSkill
- kubernetes-manifest-authorSkill
- language-tutorSkill
- meal-plan-builderSkill
- meeting-summarizerSkill
- mermaid-diagram-builderSkill
- nginx-config-proSkill
- observability-setupSkill
- okr-writerSkill
- pandas-data-cleaningSkill
- people-dataSkill
- performance-profilerSkill
- personal-budget-plannerSkill
- presentation-builderSkill
- project-plannerSkill
- prompt-engineerSkill
- proofreaderSkill
- public-speaking-coachSkill
- rag-pipeline-designerSkill
- readme-generatorSkill
- refactoring-guideSkill
- regex-architectSkill
- release-notes-writerSkill
- resume-writerSkill
- salary-negotiatorSkill
- secrets-managerSkill
- secure-code-reviewSkill
- secure-password-policySkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

