analyze-costs
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
Analyze cloud costs, find optimization opportunities, and track anomalies using Harness CCM via MCP. Use when user says "cloud costs", "analyze costs", "cost optimization", "reduce spending", "cost report", or asks about cloud bills.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 178
Check cloud connectors are configured and syncing
- Distinctive: line 180
Verify billing access permissions (Cost Explorer, Billing API)
- Distinctive: line 185
Check minimum running time requirements
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analyze Costs
Analyze cloud costs and identify savings using Harness Cloud Cost Management (CCM) via MCP.
Instructions
Step 1: Get Cost Overview
Call MCP tool: harness_get
Parameters:
resource_type: "cost_overview"Returns total spend, provider breakdown, and trend vs previous period.
Step 2: Get Cost Breakdown
Call MCP tool: harness_get
Parameters:
resource_type: "cost_breakdown"Multi-dimensional breakdown by service, environment, team, region.
Step 3: Explore Perspectives
Call MCP tool: harness_list
Parameters:
resource_type: "cost_perspective"Then get detailed data for a specific perspective:
Call MCP tool: harness_get
Parameters:
resource_type: "cost_perspective"
resource_id: "<perspective_id>"Step 4: Get Cost Trends
Call MCP tool: harness_get
Parameters:
resource_type: "cost_timeseries"Step 5: Get Optimization Recommendations
Call MCP tool: harness_list
Parameters:
resource_type: "cost_recommendation"For detailed recommendation info:
Call MCP tool: harness_get
Parameters:
resource_type: "cost_recommendation_detail"
resource_id: "<recommendation_id>"Summary statistics:
Call MCP tool: harness_get
Parameters:
resource_type: "cost_recommendation_stats"Step 6: Check for Anomalies
Call MCP tool: harness_list
Parameters:
resource_type: "cost_anomaly"To dismiss a known anomaly:
Call MCP tool: harness_execute
Parameters:
resource_type: "cost_anomaly"
action: "ignore"
resource_id: "<anomaly_id>"Step 7: Commitment Analysis
Call MCP tool: harness_get
Parameters:
resource_type: "cost_commitment_analysis"Also: cost_commitment_coverage, cost_commitment_utilisation, cost_commitment_savings
Report Format
## Cloud Cost Analysis
**Period:** Last 30 Days
### Summary
| Provider | Spend | vs Previous |
|----------|-------|-------------|
| AWS | $X | +X% |
| GCP | $X | +X% |
| Azure | $X | -X% |
### Top Recommendations
1. **Rightsize <resource>** - Save $X/month (95% confidence)
2. **Convert to Reserved** - Save $X/month
3. **Delete unused resources** - Save $X/month
### Anomalies
- <date>: <service> spiked $X above expected
### Actions
- [ ] Rightsize instance X
- [ ] Purchase reserved capacity
- [ ] Clean up unused volumesCost Resource Types Reference
| Resource Type | Operations | Description |
cost_overview | get | Total spend summary |
cost_summary | get | Filtered cost summary |
cost_timeseries | get | Cost trends over time |
cost_breakdown | get | Multi-dimensional breakdown |
cost_perspective | list, get | Custom cost views |
cost_recommendation | list | Optimization suggestions |
cost_recommendation_detail | get | Detailed recommendation |
cost_recommendation_stats | get | Summary statistics |
cost_estimated_savings | get | Savings projections |
cost_anomaly | list, get | Cost spikes |
cost_category | list, get | Cost allocation |
cost_filter_value | get | Available filter values |
Examples
- "How much are we spending on cloud?" - Get cost_overview
- "Find $5,000 in monthly savings" - List cost_recommendations, prioritize by savings
- "Why did our bill spike last week?" - List cost_anomaly
- "Break down costs by team" - Get cost_breakdown or cost_perspective
- "Are we using our reserved instances?" - Get cost_commitment_utilisation
Performance Notes
- Gather data from all relevant perspectives before drawing cost conclusions. Partial data leads to incorrect recommendations.
- Cross-reference recommendations with anomaly data to distinguish trends from spikes.
- Quality of cost analysis is more important than speed. Verify savings estimates before presenting.
Troubleshooting
No Cost Data
- Check cloud connectors are configured and syncing
- Initial sync takes 24-48 hours
- Verify billing access permissions (Cost Explorer, Billing API)
No Recommendations
- Resources need sufficient usage history for analysis
- Small savings may be filtered out
- Check minimum running time requirements
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12783% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- audit-reportSkill
- chaos-experimentSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- debug-pipelineSkill
- dora-metricsSkill
- gitops-statusSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-rolesSkill
- manage-usersSkill
- migrate-pipelineSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
- template-usageSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

