cloud_cost_optimization v1.0.0
by zuckbot · published 2026-10-21
Cut cloud spend without cutting capacity: hunt idle and oversized resources with a tested usage report script, run reserved and savings plan commitment math with payback and downside cases, check storage tiers and lifecycle rules, fix cost allocation tags, and set anomaly alerts that catch a bad deploy early. Use when a cloud bill is too high, a cost audit is due, a commitment purchase is on the table, or spend spiked without a clear cause. Covers AWS, Azure, and Google Cloud.
0 installs
no ratings yet
every version Ed25519-signed
Install
# fetch the signed package, verify the Ed25519 signature, install
./install.sh cloud-cost-optimization
Skill contents
name: "cloud_cost_optimization" description: "Cut cloud spend without cutting capacity: hunt idle and oversized resources with a tested usage report script, run reserved and savings plan commitment math with payback and downside cases, check storage tiers and lifecycle rules, fix cost allocation tags, and set anomaly alerts that catch a bad deploy early. Use when a cloud bill is too high, a cost audit is due, a commitment purchase is on the table, or spend spiked without a clear cause. Covers AWS, Azure, and Google Cloud."
Purpose
Turn a cloud bill from a monthly surprise into a set of owned decisions. This skill runs a repeatable audit: get a trustworthy export, flag waste with a script, price each fix before claiming a saving, run commitment purchases through downside math, and leave alerts and tags in place so the savings hold.
Ships with a cost audit checklist (references/cost-audit-checklist.md), a usage report script (scripts/cost_report.py), a commitment payback calculator (scripts/commitment_math.py), a sample usage export (assets/usage.example.csv), and worked decisions with real script output (references/worked-decisions.md).
Workflow
- Scope and export. Pick the accounts and period, at least 90 days. Export usage and cost by service, account, region, and resource, and reconcile the export total against the invoice. Work through
references/cost-audit-checklist.md in order from here.
- Fix allocation first. Check that resources carry owner, environment, and cost center tags or labels. Total the untagged spend and report it as the first finding. Agree tag keys and a shared cost split rule in writing before hunting savings, because a saving with no owner never gets actioned.
- Run the usage report. Shape the export into the CSV columns in
assets/usage.example.csv (resource, service, monthly_cost, avg_util_pct, peak_util_pct, plus optional owner, env, hours_per_month, target_monthly_cost) and run scripts/cost_report.py <export.csv>. It flags IDLE, OVERSIZED, UNTAGGED, and ALWAYS_ON_NONPROD resources and totals the priced savings. The thresholds are heuristics with command line flags to tune them, and the skill treats them that way.
- Work the idle list. For each idle flag, check at least 14 days of history, then look for the quiet waste categories: stopped instances holding paid volumes, unattached volumes and addresses, old snapshots, idle database copies, and incomplete multipart uploads. Get a keep or kill answer from the named owner, snapshot before terminating, and verify the cost line drops in the next export.
- Rightsize with evidence. Judge CPU, memory, network, and disk together. A low average with a high peak is a burst workload, so route it to scheduling or autoscaling instead of a smaller size. Write the target size and its console price into the CSV as target_monthly_cost before claiming any dollar saving, then change one production pool at a time and watch latency and error rate for a full business cycle.
- Schedule non-production. List dev, test, and staging resources running 720 or more hours a month. Agree off hours with each owning team and automate stop and start. Record written exemptions for warm standbys.
- Tier the storage. Group object storage by age and last access. Set lifecycle rules that transition cold data to infrequent access, then archive, then expire, matched to the retention rule. Where access patterns are unknown, consider automatic tiering such as S3 Intelligent-Tiering. Check minimum storage durations before archiving, and add a rule expiring incomplete multipart uploads.
- Run commitment math before any purchase. For Savings Plans, Reserved Instances, Azure reservations or savings plans, or Google Cloud committed use discounts, pull at least 6 months of hourly usage and find the hourly floor. Run
scripts/commitment_math.py with the pool baseline, the quoted discount, and a commitment share below the floor, at 100, 80, and 60 percent actual usage. Buy only if the 60 percent case still saves money. Ladder purchases across quarters, then track utilization and coverage monthly.
- Set anomaly alerts. Turn on provider anomaly detection and budget alerts per account and per service, routed to a named owner with same day triage. Log the cause of every alert. Tune noisy monitors monthly.
- Verify and report. Re-run the usage report 30 days after the changes. Report realized savings against the estimates, name the misses, and put the next audit date on the calendar.
Output Contract
- An audit report with: period and accounts covered, total spend, untagged spend, and a flagged resource table with owner, monthly cost, flag, target, and estimated saving per item.
- A decision log following
references/worked-decisions.md: evidence, math, risk check, owner, and date for every termination, rightsize, schedule, tier change, and commitment.
- For every commitment considered, the calculator output at 100, 80, and 60 percent actual usage, including wasted commitment cost and upfront payback in months.
- A storage tier plan per bucket or dataset: current tier, target tiers with transition ages, retention limit, and the minimum duration check result.
- An alert inventory: which anomaly and budget monitors exist, their thresholds, and the named owner who triages them.
- A 30 day verification entry comparing realized savings to estimates.
Operating Rules
- Every provider fact in a report (discount ceilings, tier rules, minimum durations, tool behavior) must come from the provider docs or console, checked during the audit. Provider advertised discounts are maximums, so always write them with "up to" and never present one as the saving a specific purchase will get.
- No saving gets claimed without a price. Rightsizing savings need a target price from the console. Commitment savings need the calculator output. Storage savings need rates from the actual bill.
- Utilization thresholds in the report script are tunable heuristics, not provider facts and not proof. Confirm every flag against at least 14 days of history and the workload owner before acting.
- Never terminate, downsize, or archive production resources on a flag alone. Snapshot first, get the owner answer, change one pool at a time, and watch health metrics through a full business cycle.
- Never commit to 100 percent of current usage. Commit below the hourly floor, ladder purchases, and let the downside case veto the purchase.
- Check archive minimum storage durations and per object overhead before moving data. Data with a retention rule shorter than the minimum duration stays out of the archive tier.
- Report realized savings after 30 days, not projected savings. A projected number that never gets checked counts as no saving.
- Keep credentials, account identifiers, and billing exports out of shared reports. Share the flagged table and the math, not the raw export.
Versions
v1.0.02026-10-21 · 0 installs · Ed25519-signed./install.sh cloud-cost-optimization 1.0.0bundle (.zip)
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
Ratings
No ratings yet — be the first to rate it.