analyze-costs

通过 MCP 使用 Harness CCM 分析云成本、发现优化机会并跟踪异常。当用户提及“云成本”、“成本分析”、“成本优化”、“降低支出”、“成本报告”或询问云账单相关问题时使用。

仓库最近推送
GitHub Stars
138
Forks
30
Issues / PRs
4

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "analyze-costs":https://skillpi.com/zh/skills/deepskill-93fbe1d45f197eec28e5670ac651c32bfaf565d2161c06233f12c2f1bacb5a88。安装前核对上游来源和版本:https://github.com/harness/harness-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

通过 MCP 使用 Harness CCM 分析云成本、发现优化机会并跟踪异常。当用户提及“云成本”、“成本分析”、“成本优化”、“降低支出”、“成本报告”或询问云账单相关问题时使用。

0 下载

介绍来源: third_party · harness · 2.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: analyze-costs
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.
metadata:
  author: Harness
  version: 2.0.0
  mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)

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

当前收录版本

2.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

待提升项

  • 缺少 When to Use 显式章节 原报告严重程度:轻微

    文档未设置独立 When to Use 章节说明典型使用场景

    改进建议:建议在 Instructions 前增加 When to Use 章节,列举3-5个典型用户提问示例

亮点

  • 企业级云成本分析刚需场景
  • 覆盖多云厂商(AWS/GCP/Azure)完整分析链路
  • 提供从数据获取到优化建议的端到端闭环
触发精准95/100

待提升项

  • 触发词未覆盖中文长尾变体 原报告严重程度:轻微

    未包含"账单异常"、"支出优化"等中文常见表述

    改进建议:建议在 description 中补充更多中文长尾触发词如"账单异常"、"支出优化"、"费用分析"

亮点

  • 中英文触发词覆盖完整
  • 边界清晰不易误触
  • frontmatter description 位置规范
结构规范93/100

待提升项

  • Report Format 示例数据未脱敏 原报告严重程度:轻微

    示例中使用 $X 占位符但部分字段如日期未统一格式

    改进建议:建议统一示例数据格式,如使用具体示例日期"2024-03-15"增强可读性

亮点

  • 7步式清晰执行流程
  • 包含 Troubleshooting 和 Performance Notes
  • Resource Types 参考表完整
执行可靠91/100

待提升项

  • 未说明 MCP 服务器连接失败处理 原报告严重程度:轻微

    Troubleshooting 未覆盖 MCP 服务器不可用场景

    改进建议:建议在 Troubleshooting 增加 MCP 连接失败的处理建议,如检查服务器状态、重试机制等

亮点

  • 所有工具调用参数完整明确
  • 异常场景覆盖全面(数据缺失/无推荐)
  • 不可逆操作有反馈确认机制
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。