/ai-toolkit:spartan:spartan:tf-cost [optional: resource-type]from ai-toolkit
Reviews Terraform infrastructure and provides cost estimates with sizing recommendations, common patterns, and optimization tips for AWS resources.
Ships in ai-toolkit. Installing the plugin adds it to Claude Code.
@rules/infrastructure/STRUCTURE.md @rules/infrastructure/MODULES.md
Review infrastructure costs and provide sizing recommendations.
# List all resource types in the current config
grep -r "^resource " *.tf modules/ 2>/dev/null | awk '{print $2}' | sort | uniq -c | sort -rn
| Environment | Instance | Storage | Multi-AZ | Est. Monthly |
|---|---|---|---|---|
| dev | db.t3.micro | 20 GB gp3 | No | ~$15 |
| staging | db.t3.small | 50 GB gp3 | No | ~$30 |
| prod | db.r6g.large | 100 GB gp3 | Yes | ~$400 |
Optimization:
db.t3.* for dev/staging — burstable is fine for low traffic| Environment | Instance | Replicas | Est. Monthly |
|---|---|---|---|
| dev | cache.t3.micro | 0 | ~$12 |
| staging | cache.t3.small | 0 | ~$25 |
| prod | cache.r6g.large | 1 | ~$300 |
Cost trap: NAT gateways charge per hour AND per GB processed.
| Setup | Est. Monthly |
|---|---|
| 1 NAT per AZ (3 AZs) | ~$100 + data |
| 1 shared NAT | ~$33 + data |
| NAT instance (t3.micro) | ~$8 |
Optimization:
| Size | vCPU | Memory | Est. Monthly (24/7) |
|---|---|---|---|
| Micro | 0.25 | 0.5 GB | ~$9 |
| Small | 0.5 | 1 GB | ~$18 |
| Medium | 1 | 2 GB | ~$36 |
| Large | 2 | 4 GB | ~$73 |
Optimization:
| Environment | Instance | Nodes | Est. Monthly |
|---|---|---|---|
| dev | t3.medium | 2 | ~$60 + $75 (control plane) |
| prod | m6i.xlarge | 3-6 | ~$300-600 + $75 |
Note: EKS control plane is $75/month regardless of size.
| Resource | Dev | Prod | Savings |
|---|---|---|---|
| RDS | t3.micro, no Multi-AZ | r6g.large, Multi-AZ | 95% |
| Redis | t3.micro, no replica | r6g.large, 1 replica | 95% |
| NAT | 1 shared or NAT instance | 1 per AZ | 70% |
| Fargate | Spot, min replicas | On-demand, auto-scale | 60% |
| EKS | Spot nodes, smaller | On-demand, right-sized | 50% |
Review the Terraform config and produce:
## Cost Estimate: {env}
| Resource | Type | Size | Est. Monthly |
|----------|------|------|-------------|
| RDS | PostgreSQL | db.t3.small | $30 |
| ... | ... | ... | ... |
**Total estimated:** $X/month
**Potential savings:** $Y/month with [recommendations]
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub c0x12c/ai-toolkit --plugin ai-toolkit71 commands in this plugin
/spartanSmart entry point for the Spartan AI Toolkit. Detects project context, routes to the right workflow or command. Use this when you're not sure where to start./spartan:spartan:brainstormspartan:brainstormStructured brainstorming — generate ideas, filter fast, rank the top 3/spartan:spartan:brownfieldspartan:brownfieldAnalyze an existing codebase and generate a structured context map + onboarding spec before making any changes. Use when joining a legacy project or unfamiliar service./spartan:spartan:buildspartan:buildBuild a new feature end-to-end — backend, frontend, or full-stack with auto-detection/spartan:spartan:carefulspartan:carefulActivate destructive operation warnings. Claude will detect and require explicit confirmation before running dangerous commands like rm -rf, DROP TABLE, force-push, git reset --hard, overwriting migrations, or deleting production resources./spartan:spartan:codexspartan:codexRun Codex CLI as a second-opinion reviewer. Subcommands mirror Spartan workflow — review, pr, ship (multi-round), security, uncommitted, commit, setup, yolo. Use when you want a different model to review Claude's output before requesting human review.Other plugins' commands for the same job