{"id":"0057acb8-669a-465d-937a-a974f55e239f","shortId":"ZMR4ph","kind":"skill","title":"analyze-costs","tagline":"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.","description":"# Analyze Costs\n\nAnalyze cloud costs and identify savings using Harness Cloud Cost Management (CCM) via MCP.\n\n## Instructions\n\n### Step 1: Get Cost Overview\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_account_overview\"\n```\n\nReturns total spend, provider breakdown, and trend vs previous period.\n\n### Step 2: Get Cost Breakdown\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_breakdown\"\n```\n\nMulti-dimensional breakdown by service, environment, team, region.\n\n### Step 3: Explore Perspectives\n\n```\nCall MCP tool: harness_list\nParameters:\n  resource_type: \"cost_perspective\"\n```\n\nThen get detailed data for a specific perspective:\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_perspective\"\n  resource_id: \"<perspective_id>\"\n```\n\n### Step 4: Get Cost Trends\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_timeseries\"\n```\n\n### Step 5: Get Optimization Recommendations\n\n```\nCall MCP tool: harness_list\nParameters:\n  resource_type: \"cost_recommendation\"\n```\n\nFor detailed recommendation info:\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_recommendation_detail\"\n  resource_id: \"<recommendation_id>\"\n```\n\nSummary statistics:\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_recommendation_stats\"\n```\n\n### Step 6: Check for Anomalies\n\n```\nCall MCP tool: harness_list\nParameters:\n  resource_type: \"cost_anomaly\"\n```\n\nTo dismiss a known anomaly:\n\n```\nCall MCP tool: harness_execute\nParameters:\n  resource_type: \"cost_anomaly\"\n  action: \"report_feedback\"\n  resource_id: \"<anomaly_id>\"\n  body: { feedback: \"FALSE_ANOMALY\" }  # or TRUE_ANOMALY / NOT_RESPONDED\n```\n\n### Step 7: Commitment Analysis\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"cost_commitment\"\n```\n\n## Report Format\n\n```\n## Cloud Cost Analysis\n\n**Period:** Last 30 Days\n\n### Summary\n| Provider | Spend | vs Previous |\n|----------|-------|-------------|\n| AWS      | $X    | +X%         |\n| GCP      | $X    | +X%         |\n| Azure    | $X    | -X%         |\n\n### Top Recommendations\n1. **Rightsize <resource>** - Save $X/month (95% confidence)\n2. **Convert to Reserved** - Save $X/month\n3. **Delete unused resources** - Save $X/month\n\n### Anomalies\n- <date>: <service> spiked $X above expected\n\n### Actions\n- [ ] Rightsize instance X\n- [ ] Purchase reserved capacity\n- [ ] Clean up unused volumes\n```\n\n## Cost Resource Types Reference\n\n| Resource Type | Operations | Description |\n|--------------|-----------|-------------|\n| `cost_account_overview` | get | Account-level total spend summary |\n| `cost_summary` | get | Perspective-scoped cost summary |\n| `cost_timeseries` | get | Cost trends over time |\n| `cost_breakdown` | get | Multi-dimensional breakdown |\n| `cost_perspective` | list, get | Custom cost views |\n| `cost_recommendation` | list | Optimization suggestions |\n| `cost_recommendation_detail` | get | Detailed recommendation |\n| `cost_recommendation_stats` | get | Summary statistics |\n| `cost_anomaly` | list, get, execute(report_feedback) | Cost spikes |\n| `cost_anomaly_summary` | get | Anomaly aggregate summary |\n| `cost_category` | list, get | Cost allocation |\n| `cost_commitment` | get | Commitment coverage/utilisation/savings |\n| `cost_filter_value` | get | Available filter values |\n\n## Examples\n\n- \"How much are we spending on cloud?\" - Get cost_account_overview\n- \"Find $5,000 in monthly savings\" - List cost_recommendations, prioritize by savings\n- \"Why did our bill spike last week?\" - List cost_anomaly\n- \"Break down costs by team\" - Get cost_breakdown or cost_perspective\n- \"Are we using our reserved instances?\" - Get cost_commitment\n\n## Performance Notes\n\n- Gather data from all relevant perspectives before drawing cost conclusions. Partial data leads to incorrect recommendations.\n- Cross-reference recommendations with anomaly data to distinguish trends from spikes.\n- Quality of cost analysis is more important than speed. Verify savings estimates before presenting.\n\n## Troubleshooting\n\n### No Cost Data\n- Check cloud connectors are configured and syncing\n- Initial sync takes 24-48 hours\n- Verify billing access permissions (Cost Explorer, Billing API)\n\n### No Recommendations\n- Resources need sufficient usage history for analysis\n- Small savings may be filtered out\n- Check minimum running time requirements","tags":["analyze","costs","harness","skills","agent-skills","agents"],"capabilities":["skill","source-harness","skill-analyze-costs","topic-agent-skills","topic-agents"],"categories":["harness-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/harness/harness-skills/analyze-costs","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add harness/harness-skills","source_repo":"https://github.com/harness/harness-skills","install_from":"skills.sh"}},"qualityScore":"0.457","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (4,340 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:28.485Z","embedding":null,"createdAt":"2026-05-09T01:05:27.022Z","updatedAt":"2026-05-18T19:06:28.485Z","lastSeenAt":"2026-05-18T19:06:28.485Z","tsv":"'-48':526 '000':427 '1':55,281 '2':81,287 '24':525 '3':105,293 '30':263 '4':139 '5':154,426 '6':199 '7':243 '95':285 'access':530 'account':68,324,328,423 'account-level':327 'action':228,304 'aggreg':393 'alloc':400 'analysi':245,260,500,544 'analyz':2,4,24,37,39 'analyze-cost':1 'anomali':12,202,212,217,227,236,239,299,380,389,392,446,490 'api':535 'ask':33 'avail':410 'aw':270 'azur':276 'bill':36,440,529,534 'bodi':233 'break':447 'breakdown':74,84,94,98,349,354,454 'call':59,85,108,126,143,158,172,187,203,218,246 'capac':310 'categori':396 'ccm':15,50 'check':200,515,551 'clean':311 'cloud':5,22,35,40,47,258,420,516 'commit':244,255,402,404,466 'conclus':478 'confid':286 'configur':519 'connector':517 'convert':288 'cost':3,6,23,25,26,30,38,41,48,57,67,83,93,116,134,141,151,166,180,195,211,226,254,259,315,323,333,339,341,344,348,355,360,362,367,373,379,386,388,395,399,401,406,422,432,445,449,453,456,465,477,499,513,532 'coverage/utilisation/savings':405 'cross':486 'cross-refer':485 'custom':359 'data':121,470,480,491,514 'day':264 'delet':294 'descript':322 'detail':120,169,182,369,371 'dimension':97,353 'dismiss':214 'distinguish':493 'draw':476 'environ':101 'estim':508 'exampl':413 'execut':222,383 'expect':303 'explor':106,533 'fals':235 'feedback':230,234,385 'filter':407,411,549 'find':7,425 'format':257 'gather':469 'gcp':273 'get':56,63,82,89,119,130,140,147,155,176,191,250,326,335,343,350,358,370,376,382,391,398,403,409,421,452,464 'har':14,46,62,88,111,129,146,161,175,190,206,221,249 'histori':542 'hour':527 'id':137,184,232 'identifi':43 'import':503 'incorrect':483 'info':171 'initi':522 'instanc':306,463 'instruct':53 'known':216 'last':262,442 'lead':481 'level':329 'list':112,162,207,357,364,381,397,431,444 'manag':49 'may':547 'mcp':17,52,60,86,109,127,144,159,173,188,204,219,247 'minimum':552 'month':429 'much':415 'multi':96,352 'multi-dimension':95,351 'need':539 'note':468 'oper':321 'opportun':9 'optim':8,27,156,365 'overview':58,69,325,424 'paramet':64,90,113,131,148,163,177,192,208,223,251 'partial':479 'perform':467 'period':79,261 'permiss':531 'perspect':107,117,125,135,337,356,457,474 'perspective-scop':336 'present':510 'previous':78,269 'priorit':434 'provid':73,266 'purchas':308 'qualiti':497 'recommend':157,167,170,181,196,280,363,368,372,374,433,484,488,537 'reduc':28 'refer':318,487 'region':103 'relev':473 'report':31,229,256,384 'requir':555 'reserv':290,309,462 'resourc':65,91,114,132,136,149,164,178,183,193,209,224,231,252,296,316,319,538 'respond':241 'return':70 'rightsiz':282,305 'run':553 'save':44,283,291,297,430,436,507,546 'say':21 'scope':338 'servic':100 'skill' 'skill-analyze-costs' 'small':545 'source-harness' 'specif':124 'speed':505 'spend':29,72,267,331,418 'spike':300,387,441,496 'stat':197,375 'statist':186,378 'step':54,80,104,138,153,198,242 'suffici':540 'suggest':366 'summari':185,265,332,334,340,377,390,394 'sync':521,523 'take':524 'team':102,451 'time':347,554 'timeseri':152,342 'tool':61,87,110,128,145,160,174,189,205,220,248 'top':279 'topic-agent-skills' 'topic-agents' 'total':71,330 'track':11 'trend':76,142,345,494 'troubleshoot':511 'true':238 'type':66,92,115,133,150,165,179,194,210,225,253,317,320 'unus':295,313 'usag':541 'use':13,18,45,460 'user':20 'valu':408,412 'verifi':506,528 'via':16,51 'view':361 'volum':314 'vs':77,268 'week':443 'x':271,272,274,275,277,278,301,307 'x/month':284,292,298","prices":[{"id":"b8b2c54b-b5b9-49d0-8646-f2fe17c5f9a6","listingId":"0057acb8-669a-465d-937a-a974f55e239f","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"harness","category":"harness-skills","install_from":"skills.sh"},"createdAt":"2026-05-09T01:05:27.022Z"}],"sources":[{"listingId":"0057acb8-669a-465d-937a-a974f55e239f","source":"github","sourceId":"harness/harness-skills/analyze-costs","sourceUrl":"https://github.com/harness/harness-skills/tree/main/skills/analyze-costs","isPrimary":false,"firstSeenAt":"2026-05-09T01:05:27.022Z","lastSeenAt":"2026-05-18T19:06:28.485Z"}],"details":{"listingId":"0057acb8-669a-465d-937a-a974f55e239f","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"harness","slug":"analyze-costs","github":{"repo":"harness/harness-skills","stars":15,"topics":["agent-skills","agents"],"license":"apache-2.0","html_url":"https://github.com/harness/harness-skills","pushed_at":"2026-05-13T01:28:28Z","description":"A collection of structured AI agent skills that   enable Claude Code, Cursor, GitHub Copilot, and   other AI coding assistants to create, operate,   debug, and govern Harness CI/CD workflows through   natural language.","skill_md_sha":"863114df7e3750f2cebbe69043e87dc1f7f2a95b","skill_md_path":"skills/analyze-costs/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/harness/harness-skills/tree/main/skills/analyze-costs"},"layout":"multi","source":"github","category":"harness-skills","frontmatter":{"name":"analyze-costs","license":"Apache-2.0","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)"},"skills_sh_url":"https://skills.sh/harness/harness-skills/analyze-costs"},"updatedAt":"2026-05-18T19:06:28.485Z"}}