analyze-costs
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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-06-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- analyze-costs
- license
- Apache-2.0
- metadata
- { "author": "Harness", "version": "2.0.0", "mcp-server": "harness-mcp-v2" }
- description
- 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.
- compatibility
- Requires Harness MCP v2 server (harness-mcp-v2)
03 SKILL.md 正文
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_account_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: "report_feedback"
resource_id: "<anomaly_id>"
body: { feedback: "FALSE_ANOMALY" } # or TRUE_ANOMALY / NOT_RESPONDED
Step 7: Commitment Analysis
Call MCP tool: harness_get
Parameters:
resource_type: "cost_commitment"
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 volumes
Cost Resource Types Reference
| Resource Type | Operations | Description |
|---|---|---|
cost_account_overview |
get | Account-level total spend summary |
cost_summary |
get | Perspective-scoped 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_anomaly |
list, get, execute(report_feedback) | Cost spikes |
cost_anomaly_summary |
get | Anomaly aggregate summary |
cost_category |
list, get | Cost allocation |
cost_commitment |
get | Commitment coverage/utilisation/savings |
cost_filter_value |
get | Available filter values |
Examples
- "How much are we spending on cloud?" - Get cost_account_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
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
04 同仓库更多 Skills
verify-sign
Add an Artifact Verification (SscaArtifactVerification) step to an existing Harness pipeline to verify Cosign signatures on container or local-stage artifacts. Supports CI, Security, and CD Deploy (containerized step group). Supports Third-Party registries (Docker, ECR, GCR, GAR, ACR), Harness Artifact Registry (HAR), and Harness Local Stage artifacts. Only works with existing pipelines. Use when asked to verify signed artifacts, verify artifact signature, verify-sign, validate Cosign signature, or configure SscaArtifactVerification. Trigger phrases: verify sign, verify artifact, artifact verification, verify signature, verify-sign, SscaArtifactVerification, verify signed image, verify Cosign, HAR verification.
template-usage
Track Harness template dependencies, usage, and adoption via MCP v2 tools. Find which pipelines or other templates reference a given template, analyze update impact, identify unused templates, and compare version adoption. Use when asked about template usage, template references, template dependencies, impact analysis before updating a template, finding unused templates, or tracking template adoption across projects. Trigger phrases: template usage, who uses template, template references, template dependencies, template impact, unused templates, template adoption. Do NOT use for creating or updating templates (use create-template instead).
sign-artifact
Add an Artifact Signing (SscaArtifactSigning) step to an existing Harness pipeline to Cosign-sign container or local-stage artifacts with keyless, key-based, or Vault signing. Supports Third-Party registries (Docker, ECR, GCR, GAR, ACR), Harness Artifact Registry (HAR), and Harness Local Stage artifacts. Place after image build/push; optionally upload .sig to the registry. Only works with existing pipelines. Use when asked to sign artifacts, add artifact signing, Cosign sign image, attach signature to registry, or configure SscaArtifactSigning. Trigger phrases: sign artifact, artifact signing, sign image, Cosign sign, add signing step, SscaArtifactSigning, attach signature, sign container image, HAR signing.
sei-analytics
Advanced engineering analytics via Harness Software Engineering Insights (SEI) MCP. Configure sprint velocity and estimation accuracy tracking, engineering investment allocation breakdowns, sprint planning with capacity forecasts, and release readiness assessments. Use when asked about sprint analytics, investment allocation, sprint planning, capacity forecasting, or release readiness. Do NOT use for DORA metrics (use dora-metrics instead). Trigger phrases: sprint velocity, sprint analytics, investment allocation, capacity planning, sprint forecast, release readiness, engineering productivity, estimation accuracy, sprint planning, scope creep, code quality trends.
security-report
Generate security compliance reports using Harness SCS and STO via MCP. Analyze vulnerabilities, SBOMs, and manage exemptions. Use when user says "security report", "vulnerabilities", "SBOM", "security scan", "compliance check", or asks about application security.
scorecard-review
Review service maturity scorecards and compliance using Harness IDP via MCP. Check production readiness, security, and documentation scores. Use when user says "scorecard", "service maturity", "production readiness", "compliance score", or asks about service health scores.