/tsh-stack-aws:auditing-aws-costfrom TSH Stack: AWS
Runs an evidence-based AWS cost and tagging audit: reads Terraform/CloudFormation, validates against live account, finds drift, shadow resources, waste, and tag compliance. Produces a presentation-ready report.
Ships in TSH Stack: AWS. 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.
Read when SKILL.md points to them.
Read the code, then check reality, then diff the two. The findings that matter most are usually the ones with no infrastructure code behind them at all.
The account's own tagging convention outranks the standard below — reconcile to its keys and report the difference rather than introducing a second scheme.
Verify current instance families, pricing tiers and regional availability against AWS documentation before recommending any specific size. This is mandatory: these change every few months, and a recommendation for an instance type unavailable in the customer's region wastes the whole finding.
| Severity | Rule |
|---|---|
| MUST | Run read-only. describe-*, list-*, get-* only. Produce remediation as code for the user to apply; never apply it. |
| MUST | Base right-sizing on utilization metrics or live API data. A recommendation with no observed utilization behind it is a guess and must be labelled as one. |
| MUST | Separate measured spend from estimate. Only Cost Explorer gives measured cost; anything derived from instance type and runtime hours is an estimate and the report says so. |
| MUST | Warn explicitly before proposing any change to a resource tagged as production. |
| MUST | Save the report file before presenting results, then state its path. |
| NEVER | Propose deleting a resource whose purpose you have not established. An unattached volume may be the only copy of something. |
| NEVER | Present a code-only audit as though it reflected the live account. If credentials do not resolve, say so in the executive summary. |
| Reference | Load when | Covers |
|---|---|---|
| Service inventory | Always — this is the checklist the audit walks | Every service family, what to check in each, AWS-specific waste patterns |
| Report format | Producing the report | The exact required structure and formatting rules |
aws CLI via Bash, read-only verbs. Confirm the account first with
aws sts get-caller-identity, and the region.aws ce get-cost-and-usage, grouped by service and by tag. The
only source of measured spend.aws compute-optimizer get-ec2-instance-recommendations for utilization-backed
right-sizing. Trusted Advisor where the support tier includes it.aws-documentation MCP server — current instance families, pricing tiers,
regional availability. Mandatory before recommending a specific type.context7 — Terraform AWS provider docs for any remediation code.| Workload | Purchase option | Saving |
|---|---|---|
| Steady-state, 24/7 | Reserved Instances or Savings Plans | 30–72% |
| Variable or bursty | On-Demand with auto-scaling | baseline |
| Fault-tolerant batch | Spot | up to 90% |
| Event-driven | Lambda | per-use |
Reserved or committed capacity pays off above roughly 70% sustained utilization; below that, on-demand plus auto-scaling usually wins.
| Access pattern | Class |
|---|---|
| Frequent | S3 Standard |
| Infrequent, 30+ days | S3 Standard-IA |
| Rare, 90+ days | S3 Glacier |
| Archive, 365+ days | S3 Deep Archive |
Always pair a class with a lifecycle policy that transitions automatically. A hand-picked class decays as soon as access patterns change.
Every resource carries all five, keys in PascalCase:
| Key | Example | Purpose |
|---|---|---|
CostCenter | cc-102 | Chargeback |
Environment | dev, staging, prod | Deployment stage |
Service | auth-api | The workload |
Owner | platform-team | Responsible team |
DataClass | public, confidential, pii | Security classification |
Also check: ModelID and TrainingJobId on GPU instances and SageMaker endpoints;
DataClass on every storage and database resource without exception; and Schedule on
anything tagged Environment: dev running 24/7 — a development resource with no
schedule is the most common cheap win.
Read tags with aws resourcegroupstaggingapi get-resources, which covers most services
in one call.
Audit progress:
- [ ] 1. Scope confirmed (account, region, service focus)
- [ ] 2. Infrastructure code analysed
- [ ] 3. Live state inventoried
- [ ] 4. Drift and shadow resources identified
- [ ] 5. Waste and right-sizing found
- [ ] 6. Tag compliance checked
- [ ] 7. Cost attributed, savings estimated
- [ ] 8. Report saved, then presented
*.tf, terragrunt.hcl) and
CloudFormation (AWSTemplateFormatVersion). Extract everything that drives cost:
instance_type, allocated_storage, volume_size, desired_count, engine,
multi_az. Note anti-patterns — hardcoded sizes, missing lifecycle policies,
over-provisioned module defaults, unused outputs.The audit is analysis-only. Generate remediation Terraform only after the user names which opportunities to implement, and show a diff before writing to any existing file.
Cloud-agnostic cost framework, tagging governance and provisioning checklists live in
optimizing-cloud-cost in the tsh-platform-engineering plugin. Provisioning patterns
are implementing AWS Terraform in this plugin.
What SKILL.md sets; muted values are Claude Code's defaults
Trigger on: 'audit our AWS costs', an AWS bill that jumped, a FinOps or cost-optimization review of an account or region, right-sizing EC2 or RDS, finding unattached EBS volumes, unassociated Elastic IPs, orphaned snapshots or idle load balancers, NAT gateway spend, AWS tag compliance, reserved instances or Savings Plans versus on-demand, S3 lifecycle and storage classes, or Cost Explorer analysis.
Three short reads, in order
2 skills in this plugin
npx claudepluginhub thesoftwarehouse/agentic-collections --plugin tsh-stack-awsOther plugins' skills for the same job