/aws-cost-audit:audit [--profiles payer,member] [--region us-east-1] [--kube-context ctx]from AWS Cost Audit
Read-only AWS cost audit producing an HTML report with bill classification, top cost drivers, and a four-stage savings plan with monthly forecasts and production impact for each action.
Ships in AWS Cost Audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Take the account details from the plugin configuration, then from the arguments, then ask:
${user_config.payer_profile}${user_config.member_profiles}${user_config.region}${user_config.kube_context}${user_config.timezone_offset}Scripts live in ${CLAUDE_PLUGIN_ROOT}/scripts/. Run Python with python3 -I (Windows: py -3 -I
or python -I) and pass paths as arguments. They only call the AWS CLI through subprocess, with
the user's own credentials, and only read.
describe, get, list, Cost Explorer,
CloudWatch and, when there is a cluster, kubectl get/describe and port-forward. If a step
seems to need a write (enable Flow Logs, create a user, change a Service), it becomes a
recommendation in the plan, never an audit action. Production runs on top of this account.Order matters: each step changes how the next one reads.
Access and scope. Identify payer × member accounts (aws sts get-caller-identity per
profile), regions, and what the company runs: EKS, ECS, plain EC2, Lambda, RDS, serverless.
Run scripts/check_requirements.sh --profiles … (or .ps1) first if this is the first audit.
Where the money goes. scripts/ce_breakdown.py --profile <payer> map classifies the bill
into fixed categories and prints the arrays the report template uses:
| Category | What goes in | Varies with usage? |
|---|---|---|
| Compute | EC2 on-demand, Lambda, ECS/Fargate, EKS/ECS control planes, API Gateway | yes |
| Network | data transfer, NAT, ELB, CloudFront, VPC, public IPv4 | yes |
| Data & databases | RDS, DynamoDB, ElastiCache, OpenSearch, Redshift, managed Kafka | contract / instance |
| Storage | S3, EBS, EFS, snapshots, ECR, Backup | yes |
| SaaS & Marketplace | vendors billed through AWS (cache, queues, Kafka, SaaS databases) | contract |
| Commitments | Savings Plans and Reserved Instances fees | fixed |
| Observability, Security, Tax, Other | the rest | depends |
Then usage "<service>" on the 2–3 biggest lines: EC2 - Other hides data transfer, EBS and
NAT; RDS hides storage and backups; S3 hides requests and transfer.
Commitments before any conclusion about time of day. scripts/ce_breakdown.py sp (plus
aws ec2 describe-reserved-instances, rds describe-reserved-db-instances). If a Savings Plan
runs at 100% utilization every day, night-time usage already equals the commitment: shrinking
at night saves zero until usage grows above the plan. Only the on-demand overflow is cuttable
by time of day. The arithmetic is in references/method.md#savings-plan.
Hour-of-day profile of whatever dominates compute. scripts/cw_hod.py with the metrics of
that workload type (table in references/method.md#profiles): ASG/EC2, ECS, Lambda, RDS, ELB.
Local timezone, weekdays and weekends apart. This is where the real peak and the slack show up.
How the workload scales — pick the branch:
scripts/k8s_scaling_snapshot.sh + scripts/prom_hod.py (cores used ×
requested × allocatable, HPAs at their cap, pending pods).references/method.md#ecs).references/method.md#ec2).references/method.md#lambda).Network. scripts/ce_breakdown.py regional and regional-trend. The
DataTransfer-Regional-Bytes line is two problems: InterZone-* (inside the VPC) and
PublicIP-* (SaaS vendors in the same region reached by public IP). NAT by bytes, public
IPv4, CloudFront vs. direct origin. Recipe in references/method.md#regional-traffic.
Data and storage. Database instances with low CPU or Multi-AZ outside production, gp2
storage, orphan snapshots and volumes, S3 and ECR without lifecycle, CloudWatch log groups
without retention (references/method.md#data).
Proven idleness. scripts/nat_idle_check.py; available EBS volumes; loose EIPs; ELBs
without targets; instances under 10% CPU. Idleness only counts as proven with datapoints
present at zero, never with missing data.
Classify and size. For each lever: front (the same categories), nominal value, value realizable today (net of commitments), effort, risk, stage and impact on what is running. Compute levers under a saturated commitment share one ceiling: their sum never exceeds the on-demand overflow.
Report. Follow references/report.md. Publish with the Artifact tool when the environment
has it (load the artifact-design and dataviz skills first if available); otherwise write the
HTML file and tell the user where it is. Start from assets/plan-template.pt-BR.html (the
mould; its labels are in Portuguese, translate them to the user's language as you fill it).
Record. A technical note in the team's documentation with the method, numbers, limits and the report link, plus what is not derivable from the account (access recipes that worked, pitfalls), for the next audit.
| Stage | Criterion | Typical examples |
|---|---|---|
| 0 · Do now | 1–2 weeks, no architecture change, impact nil or reversible in seconds | ECR/S3 lifecycle, loose volumes and EIPs, oversized hosts, non-production off on weekends, log retention, gp2 → gp3 on EBS, raising a saturated autoscaling cap |
| 1 · Engineering work | weeks, normal rollouts per service | right-sizing (instances, tasks, requests, Lambda memory), cache read volume, private endpoint to a vendor |
| 2 · Architecture | months, touches topology or telemetry | zone-aware routing, one collector per AZ, CloudFront in front of the origin, removing idle network |
| 3 · Contracts and platform | executive decision, data migration | renegotiate or migrate SaaS, change database class, decommission legacy systems, buy or adjust commitments |
Each stage closes with a cumulative run-rate (conservative–optimistic range), effort, risk, prerequisite, who decides and the impact on what is running. Always include the Safe execution section (windows outside the measured peaks, one change at a time through IaC/GitOps, observe 30 minutes, export before deleting, measure before cutting, data and contracts only with a validated replacement) and the What not to do section with what looks obvious but does not pay (shutting production down at night under a saturated commitment, extra commitment for a short overflow, consolidating NAT across VPCs through peering, sampling traces before generating metrics).
aws ce JSON; call the CLI through subprocess, as the scripts do.MONTHLY over a range that crosses a month returns two rows per key; they are not duplicates.EC2 - Other is not compute: it is transfer, EBS, NAT and IPv4. map already splits it.hostNetwork report the whole node's traffic in container_network_* (6 copies per
node, ~19× inflation). Exclude them and use node_exporter eth*/ens*.AvailabilityZone dimension; discover
dimensions with list-metrics instead of assuming.README.md — requirements (tools, access, read-only IAM permissions), installation, layout;
scripts/check_requirements.sh / .ps1 checks all of it before you start.references/method.md — recipes per step (categories, SP, profiles per workload type,
EKS/ECS/EC2/Lambda, network, data, idleness, sizing) and how to read each result.references/report.md — mandatory report structure, tables, forecast chart, writing rules.assets/plan-template.pt-BR.html — report mould with example data marked as such.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/bill-mapWhere the AWS money goes, in two minutes and in the same shape for every company - the bill of the last 30 days classified into fixed categories (Compute, Network, Data & databases, Storage, SaaS & Marketplace, Commitments, Observability, Security, Tax, Other) with the biggest lines, read from Cost Explorer in the payer account. Use when the user asks "where does our AWS money go", "what is the biggest line", "how much is data transfer / NAT / marketplace", or wants the bill breakdown before deciding whether to run the full audit. Read-only./checkChecks what the AWS cost audit needs before it starts - AWS CLI v2, Python 3.8+, kubectl when there is EKS, valid credentials per profile, Cost Explorer enabled and readable in the payer, Savings Plans visibility, the read-only API families the scripts use, and the cluster metrics endpoint. Use right after installing the plugin, when an audit fails on access, or when the user asks what they need to set up. Read-only; changes nothing./idleFinds resources that cost money and do nothing, with proof - NAT gateways with zero bytes and zero connection attempts over 180 days, unattached EBS volumes, loose Elastic IPs, load balancers without healthy targets, instances under 10% CPU for 14 days, ECR repositories without lifecycle policy, CloudWatch log groups without retention. Use when the user asks "is this NAT idle", "what are we paying for that nothing uses", "orphan volumes", "unused IPs", or wants quick hygiene wins. Read-only; it recommends deletions, never performs them.npx claudepluginhub whitebeardit/claude-plugins --plugin aws-cost-auditOther plugins' skills for the same job