Loading...
Loading...
Analyze and optimize cloud infrastructure costs, identify waste, and track spend efficiency
npx skill4agent add jforksy/claude-skills infra-costdata/engineering/infra_costs.jsondata/engineering/tech_stack.jsondata/cfo/latest_forecast.jsondata/engineering/engineering_scorecard.json| Metric | Formula | Target |
|---|---|---|
| Infra as % of revenue | Monthly spend / MRR | <20% early stage, <10% at scale |
| Cost per customer | Infra spend / active customers | Should decrease over time |
| Compute utilization | Actual usage / provisioned | >40% average |
| Cost per request | Infra spend / total requests | Should be stable or decreasing |
| Waste Type | What to Look For |
|---|---|
| Idle resources | VMs, databases running but unused |
| Over-provisioned | Resources sized larger than needed |
| Dev/staging bloat | Non-prod environments at prod scale |
| Zombie resources | Old resources no longer needed |
| Data hoarding | Storing data that's never accessed |
| Unoptimized data transfer | Excessive cross-region or egress traffic |
## Infrastructure Cost Analysis: [Project]
### Period: [Month/Quarter]
### Summary
| Metric | Value | Trend | Target |
|--------|-------|-------|--------|
| Total Monthly Spend | $X | ↑/↓/→ | $X |
| Infra as % of Revenue | X% | ↑/↓/→ | <X% |
| Cost per Customer | $X | ↑/↓/→ | <$X |
### Spend by Category
| Category | Monthly | % of Total | MoM Change |
|----------|---------|------------|------------|
| Compute | $X | X% | +X% |
| Database | $X | X% | +X% |
| Storage | $X | X% | +X% |
| Other | $X | X% | +X% |
### Top 5 Cost Drivers
1. [Service/Resource] — $X/mo — [Why it's expensive]
2. ...
### Optimization Opportunities
| Opportunity | Current | Savings | Effort | Risk |
|-------------|---------|---------|--------|------|
| [Action] | $X/mo | $X/mo | Easy | Low |
| [Action] | $X/mo | $X/mo | Medium | Medium |
**Total Potential Monthly Savings:** $X
### Forecast
| Period | Projected Spend | Key Drivers |
|--------|-----------------|-------------|
| Next Month | $X | [What's changing] |
| Next Quarter | $X | [What's changing] |
### Recommendations
1. **Immediate:** [Quick wins with low effort]
2. **This Quarter:** [Medium-term optimizations]
3. **Consider:** [Larger architectural changes]data/engineering/
├── infra_costs.json # Current cost data
├── cost_history/ # Historical snapshots
│ └── costs_YYYY-MM.json
└── optimizations/ # Optimization tracking
└── optimization_[id].json{
"version": "1.0",
"lastUpdated": "YYYY-MM-DD",
"period": "YYYY-MM",
"totalMonthlySpend": 0,
"currency": "USD",
"byCategory": {
"compute": { "spend": 0, "items": [] },
"database": { "spend": 0, "items": [] },
"storage": { "spend": 0, "items": [] },
"networking": { "spend": 0, "items": [] },
"observability": { "spend": 0, "items": [] },
"other": { "spend": 0, "items": [] }
},
"byEnvironment": {
"production": 0,
"staging": 0,
"development": 0,
"cicd": 0
},
"metrics": {
"infraAsPercentOfRevenue": null,
"costPerCustomer": null,
"computeUtilization": null
},
"optimizations": [
{
"id": "",
"description": "",
"currentCost": 0,
"potentialSavings": 0,
"effort": "easy | medium | hard",
"risk": "low | medium | high",
"status": "identified | in_progress | completed | rejected"
}
],
"forecast": {
"nextMonth": 0,
"nextQuarter": 0,
"assumptions": []
}
}/infra-cost/infra-cost