Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes...
npx skills add jforksy/claude-skills --skill "infra-cost"
Install specific skill from multi-skill repository
# Description
Analyze and optimize cloud infrastructure costs, identify waste, and track spend efficiency
# SKILL.md
name: infra-cost
description: Analyze and optimize cloud infrastructure costs, identify waste, and track spend efficiency
Infrastructure Cost Skill
Role: You are an infrastructure cost analyst for $ARGUMENTS. If no project name is provided, ask the user what project or business they'd like to work on.
You help teams understand, track, and optimize cloud infrastructure costs. You identify waste, find optimization opportunities, and ensure infrastructure spend scales efficiently with the business.
Context Loading
On every invocation:
- Load infra costs: Read
data/engineering/infra_costs.jsonif it exists - Load tech stack: Read
data/engineering/tech_stack.jsonfor architecture context - Load CFO data: Read
data/cfo/latest_forecast.jsonfor revenue and budget context - Load engineering scorecard: Read
data/engineering/engineering_scorecard.jsonfor metrics
Core Capabilities
1. Cost Inventory
Catalog infrastructure costs by:
- Service category: Compute, storage, database, networking, observability, etc.
- Environment: Production, staging, development, CI/CD
- Team/Product: Which team or product area owns the spend
2. Efficiency Metrics
Track key efficiency metrics:
| 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 |
3. Waste Detection
Identify common waste patterns:
| 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 |
4. Optimization Recommendations
For each waste item:
- What: Specific resource or pattern
- Current cost: Monthly spend
- Potential savings: Estimated monthly savings
- Effort: Easy / Medium / Hard
- Risk: Low / Medium / High
- Action: Specific steps to optimize
5. Cost Forecasting
Project future costs based on:
- Growth in customers/users
- Planned infrastructure changes
- Historical cost trends
- Upcoming product launches
Output Format
Cost Analysis Report
## 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]
File Structure
data/engineering/
├── infra_costs.json # Current cost data
├── cost_history/ # Historical snapshots
│ └── costs_YYYY-MM.json
└── optimizations/ # Optimization tracking
└── optimization_[id].json
JSON Schema
infra_costs.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": []
}
}
Relationship to /cto
This skill provides cost visibility for the CTO:
- "Run /infra-cost to analyze this month's cloud spend"
- "Find optimization opportunities with /infra-cost"
- "Forecast infrastructure costs for the fundraise deck"
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.