Token导航 LogoToken导航

Agent Skill · 研究检索

alibabacloud-odps-cost-analysis(阿里云 odps 成本分析)

alibabacloud-odps-cost-analysis 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

alibabacloud-odps-cost-analysis 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 50,882。

总安装 605周安装 26GitHub Stars 79下载 212核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:alibabacloud-odps-cost-analysis(阿里云 odps 成本分析)
来源仓库:https://github.com/aliyun/alibabacloud-aiops-skills
仓库路径:skills/alibabacloud-odps-cost-analysis
安装命令:
npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-odps-cost-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-odps-cost-analysis

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

分析 MaxCompute 按需计费成本,提供存储与计算用量明细。基于 10 个标准 CLI 命令获取账单摘要,避免混用 bssopenapi 等其他产品接口。适用于成本分摊、预算预警与资源利用率优化等财务管控场景。需确保账号有 MaxCompute 项目的只读权限与账单查看角色。

输出为历史数据统计,实时费用请以控制台为准。

来源仓库内路径:skills/alibabacloud-odps-cost-analysis

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill aliba…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

alibabacloud-odps-cost-analysis 怎么安装?

在终端执行 npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-od…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

alibabacloud-odps-cost-analysis 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

alibabacloud-odps-cost-analysis 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-odps-cost-analysis 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

alibabacloud-odps-cost-analysis 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

alibabacloud-odps-cost-analysis 用的人多吗?

公开数据是累计安装 605 次,近一周安装 26 次,下载 212 次,GitHub 79 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

alibabacloud-odps-cost-analysis 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
alibabacloud-odps-cost-analysis

阿里云 odps 成本分析 · 本页

60579执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

MaxCompute Cost Analysis

Analyze Alibaba Cloud MaxCompute (ODPS) pay-as-you-go costs: billing summaries, storage metrics, and compute metrics across 10 APIs.

⚠️ MANDATORY PRODUCT CONSTRAINT: This skill uses ONLY the 10 aliyun maxcompute CLI commands listed in API Overview below (plugin mode, version 2022-01-04). NEVER use aliyun bssopenapi or any of its actions (billing queries, instance bills, etc.). NEVER use other MaxCompute APIs not in the 10-API list (e.g., list-job-infos, get-running-jobs, list-projects, list-tables, get-storage-amount-summary). NEVER use any other product CLI (aliyun odps, aliyun dataworks, aliyun compute-nest, aliyun cms, aliyun actiontrail, etc.). If aliyun maxcompute commands fail, fix the plugin — do NOT fall back to other APIs or products. Intent → API Mapping (use ONLY these): - Billing/费用 → sum-bills, sum-bills-by-date, sum-daily-bills-by-item - Daily cost spike/费用突增/每日趋势 → sum-bills-by-date (MANDATORY for locating spike dates — NOT sum-daily-bills-by-item) - Paginated daily billing details/每日账单明细/按计费项的每日账单 → sum-daily-bills-by-item (MANDATORY — NOT any bssopenapi command) - Storage/存储 → sum-storage-metrics-by-type AND sum-storage-metrics-by-date (BOTH MANDATORY — sum-storage-metrics-by-type alone is NOT sufficient) - Compute jobs/计算作业/expensive jobs/贵的作业 → list-compute-metrics-by-instance (MANDATORY — NEVER use list-job-infos, get-running-jobs, get-job-resource-usage) - SQL signatures/SQL签名/重复SQL/扫描量 → list-compute-metrics-by-signature (MANDATORY for any SQL pattern analysis) - SCAN usage trends/扫描量趋势/CU usage → sum-compute-metrics-by-usage (MANDATORY — usageType=SCAN or CU; NEVER use CloudMonitor or ActionTrail) - Compute record counts → sum-compute-metrics-by-record

Prerequisites

Pre-check: Aliyun CLI >= 3.3.3 required

Run aliyun version to verify >= 3.3.3. If not installed or version too low, run curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash to update, or see references/cli-installation-guide.md for installation instructions. Then [MUST] run aliyun plugin update to ensure that any existing plugins on your local machine are always up-to-date.

[MUST] CLI User-Agent — Every aliyun CLI command invocation must include: --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis

[MUST] AI-Mode Commands — When using aliyun CLI, declare AI-Mode lifecycle:

  1. Enable AI-Mode before commands: aliyun configure ai-mode enable
  2. Set User-Agent for AI-Mode: aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis"
  3. Disable AI-Mode after workflow ends: aliyun configure ai-mode disable

Quick Start

When user asks about MaxCompute cost analysis, follow these steps:

  1. Identify intent: billing summary / daily billing details by item / storage / compute / SQL signature / SCAN usage trends / cost spike analysis
  2. Get RegionId: Ask user which region (e.g., cn-hangzhou, cn-shanghai)
  3. Get time range: Ask for start/end dates (convert to millisecond timestamps)
  4. Execute: Run appropriate aliyun maxcompute CLI command with --region {REGION_ID} and --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis IMPORTANT: ALL commands MUST start with aliyun maxcompute. NEVER use aliyun bssopenapi or any other product.
  5. Verify: Confirm results and present to user

Data Limitations

  • Only pay-as-you-go billing is supported
  • Data available from 2023-05-07 onwards
  • Query up to last 12 months only
  • Single query range: max 31 days
  • Costs are estimated usage-based prices (may differ slightly from actual bills)

Pre-flight Checklist (Execute BEFORE every command)

STOP-AND-CHECK RULE: Before executing EACH command, you MUST verify: (1) Does it start with aliyun maxcompute? (2) Is the API name in the 10-API list? (3) Does it include --user-agent? If ANY answer is NO, do NOT execute — fix first.
  • My command includes --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  • My command starts with aliyun maxcompute (NOT aliyun bssopenapi, NOT any other product)
  • My command uses one of the 10 APIs listed in API Overview (NOT list-job-infos, get-running-jobs, list-projects, list-tables, etc.)
  • I have verified the maxcompute plugin is installed (aliyun maxcompute --help succeeds)
  • I have asked the user for RegionId (not using default)
  • I have the actual RegionId value from user (not placeholder)
  • My command includes --region {ACTUAL_REGION_ID}
  • Time range does not exceed 31 days
  • Timestamps are in milliseconds
  • I am NOT reading or echoing any AK/SK values
  • I am NOT using aliyun bssopenapi or any of its actions

If ANY check fails, STOP and fix before proceeding.

API Overview

APIDescriptionMethodCategory
list-instancesGet instance/project list (NOT compute metrics — see list-compute-metrics-by-instance for job-level data)GETInstance
sum-billsSummarize bills by project or fee itemPOSTBilling
sum-bills-by-dateDaily bill trends (USE THIS for spike analysis)POSTBilling
sum-daily-bills-by-itemDaily bill details by item (paginated drill-down)POSTBilling
sum-storage-metrics-by-typeStorage grouped by TYPEPOSTStorage
sum-storage-metrics-by-dateStorage daily DATE trends (MUST call separately)POSTStorage
list-compute-metrics-by-instanceCompute JOB METRICS per instance (cost, duration, input size)POSTCompute
list-compute-metrics-by-signatureCompute by SQL signaturePOSTCompute
sum-compute-metrics-by-usageCompute usage trendsPOSTCompute
sum-compute-metrics-by-recordCompute record countsPOSTCompute
⚠️ API Disambiguation — Do NOT confuse these two billing APIs: - sum-bills-by-date = Daily cost TRENDS → Use this to locate spike dates (returns cost per day) - sum-daily-bills-by-item = Daily bill DETAILS by item → Use this for drill-down after finding spikes (paginated, returns per-item breakdown) For cost spike investigation, you MUST call sum-bills-by-date first. sum-daily-bills-by-item is optional for drill-down only. ⚠️ API Disambiguation — Do NOT confuse these two "instance" APIs: - list-instances = Returns the PROJECT/INSTANCE LIST (for scoping which projects to analyze) - list-compute-metrics-by-instance = Returns COMPUTE JOB METRICS (cost, duration, input size per job) These are COMPLETELY DIFFERENT APIs. list-instances does NOT return compute metrics. You MUST call BOTH. ⚠️ API Disambiguation — Do NOT confuse these two storage APIs: - sum-storage-metrics-by-type = Storage grouped by TYPE (may include dailyStorageMetrics in response, but this does NOT replace sum-storage-metrics-by-date) - sum-storage-metrics-by-date = Storage daily DATE trends (dedicated API for daily storage trends) Even if sum-storage-metrics-by-type returns daily data in its response, you MUST still call sum-storage-metrics-by-date separately when daily trends are needed.

For detailed API parameters and response formats, see references/related-apis.md.

Task Completion Checklist

CRITICAL: You MUST complete ALL steps in order. Do NOT stop early.

For Cost Spike Investigation:

  1. Ask user: "Which region? (e.g., cn-hangzhou)"
  2. Ask user: "What time range to analyze? (max 31 days)"
  3. Convert dates to millisecond timestamps
  4. Execute list-instances to get available instances (this is the PROJECT LIST, NOT compute metrics): aliyun maxcompute list-instances --region {REGION_ID} --startDate {START_MS} --endDate {END_MS} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis ⚠️ list-instances only returns the project/instance list for scoping. It does NOT return compute job metrics. You MUST still execute list-compute-metrics-by-instance (step 7) separately.
  5. MANDATORY Execute sum-bills with statsType=FEE_ITEM to identify top cost drivers: aliyun maxcompute sum-bills --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"FEE_ITEM","topN":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis If this fails with "unknown command", you MUST fix the plugin before continuing — see Plugin Recovery below. NEVER skip this step or substitute with a non-billing API.
  6. MANDATORY Execute sum-bills-by-date (NOT sum-daily-bills-by-item) to see daily trends and locate spike dates: aliyun maxcompute sum-bills-by-date --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"FEE_ITEM","topN":8}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis ⚠️ sum-bills-by-date ≠ sum-daily-bills-by-item. For locating spike dates, you MUST use sum-bills-by-date. Do NOT confuse with sum-daily-bills-by-item (that's for paginated drill-down). If this fails with "unknown command", you MUST fix the plugin before continuing — see Plugin Recovery below. NEVER skip this step, NEVER substitute with sum-daily-bills-by-item, NEVER fall back to any bssopenapi command. ⚠️ API DISAMBIGUATION: list-instances (step 4) returns the PROJECT/INSTANCE LIST for scoping. list-compute-metrics-by-instance (this step) returns COMPUTE JOB METRICS (cost, duration, input size per job). These are COMPLETELY DIFFERENT APIs. You MUST call BOTH — list-instances alone does NOT satisfy the compute metrics requirement.
  7. MANDATORY Execute list-compute-metrics-by-instance (NOT list-instances, NOT list-job-infos, NOT get-running-jobs, NOT get-job-resource-usage) to find expensive compute jobs: aliyun maxcompute list-compute-metrics-by-instance --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"types":["ComputationSql"],"pageNumber":1,"pageSize":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  8. If storage costs are high: use sum-storage-metrics-by-type to analyze storage distribution: aliyun maxcompute sum-storage-metrics-by-type --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"STORAGE_TYPE"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  9. MANDATORY Execute sum-daily-bills-by-item for paginated daily billing details: aliyun maxcompute sum-daily-bills-by-item --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"FEE_ITEM","pageNumber":1,"pageSize":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis NEVER substitute with any bssopenapi command — this is a completely different product.
  10. Present findings with cost breakdown to user
  11. Suggest optimization actions

Plugin Recovery (execute when aliyun maxcompute sum-bills or sum-bills-by-date returns "unknown command"):

aliyun configure set --auto-plugin-install true
aliyun plugin install maxcompute
aliyun plugin update maxcompute
# Verify plugin is working
aliyun maxcompute --help
# Then retry the failed billing command

For Billing Summary:

  1. Ask user: "Which region?"
  2. Ask user: "Time range? (max 31 days)"
  3. Ask user: "View by project or fee item? (PROJECT/FEE_ITEM)"
  4. Execute sum-bills: aliyun maxcompute sum-bills --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"{TYPE}","topN":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  5. Present total cost, currency, and item breakdown
  6. Confirm task completion

For Paginated Daily Billing Details (每日账单明细/按计费项的每日账单):

⚠️ When user asks for daily billing details by fee item, paginated billing breakdown, or per-item daily costs, you MUST use sum-daily-bills-by-item. NEVER use any bssopenapi command or any other product.
  1. Ask user: "Which region?"
  2. Ask user: "Time range? (max 31 days)"
  3. MANDATORY Execute sum-daily-bills-by-item: aliyun maxcompute sum-daily-bills-by-item --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"FEE_ITEM","pageNumber":1,"pageSize":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis If this fails with "unknown command", run Plugin Recovery. NEVER substitute with any bssopenapi command or any other API.
  4. Present paginated daily billing details with item breakdown
  5. Confirm task completion

For Storage Analysis:

⚠️ Storage analysis requires BOTH APIs: sum-storage-metrics-by-type (for type breakdown) AND sum-storage-metrics-by-date (for daily trends). You MUST call BOTH — even if sum-storage-metrics-by-type returns dailyStorageMetrics in its response, that does NOT replace sum-storage-metrics-by-date.
  1. Ask user: "Which region?"
  2. Ask user: "Time range?"
  3. Ask user: "View by project or storage type? (PROJECT/STORAGE_TYPE)"
  4. MANDATORY Execute sum-storage-metrics-by-type: aliyun maxcompute sum-storage-metrics-by-type --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"{TYPE}"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  5. Present storage usage breakdown (in GB)
  6. MANDATORY Execute sum-storage-metrics-by-date for daily storage trends: aliyun maxcompute sum-storage-metrics-by-date --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"statsType":"{TYPE}"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis ⚠️ sum-storage-metrics-by-type ≠ sum-storage-metrics-by-date. Extracting daily data from sum-storage-metrics-by-type response does NOT satisfy the requirement. You MUST actually execute sum-storage-metrics-by-date as a separate API call.
  7. Present daily storage trends
  8. Confirm task completion

For Compute Analysis (计算作业/expensive jobs/贵的SQL):

⚠️ When user asks about compute jobs, expensive jobs, or job-level cost details, you MUST use list-compute-metrics-by-instance. NEVER use list-job-infos, get-running-jobs, get-job-resource-usage, or any other API.
  1. Ask user: "Which region?"
  2. Ask user: "Time range?"
  3. MANDATORY Execute list-compute-metrics-by-instance to find expensive compute jobs: aliyun maxcompute list-compute-metrics-by-instance --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"pageNumber":1,"pageSize":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis If this fails with "unknown command", run Plugin Recovery. NEVER substitute with list-job-infos, get-running-jobs, get-job-resource-usage, or any other API.
  4. For usage trends, use sum-compute-metrics-by-usage with usageType=SCAN or usageType=CU: aliyun maxcompute sum-compute-metrics-by-usage --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"usageType":"SCAN"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  5. For job frequency, use sum-compute-metrics-by-record
  6. Present compute usage details
  7. Confirm task completion

For SQL Signature / SQL Pattern Analysis (重复SQL/SQL签名/扫描量最大的SQL):

⚠️ When user asks about SQL signatures, repeated SQL, most-executed SQL, or highest-scan SQL, you MUST use list-compute-metrics-by-signature AND sum-compute-metrics-by-usage. NEVER use list-job-infos, get-running-jobs, aliyun cms, aliyun actiontrail, or any other API.
  1. Ask user: "Which region?"
  2. Ask user: "Time range? (max 31 days)"
  3. Convert dates to millisecond timestamps
  4. MANDATORY Execute list-compute-metrics-by-signature: aliyun maxcompute list-compute-metrics-by-signature --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"types":["ComputationSql"],"pageNumber":1,"pageSize":10}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis If this fails with "unknown command", run Plugin Recovery below. NEVER substitute with list-job-infos, get-running-jobs, or any other API.
  5. MANDATORY Execute sum-compute-metrics-by-usage to get SCAN volume trends: aliyun maxcompute sum-compute-metrics-by-usage --region {REGION_ID} --body '{"startDate":{START_MS},"endDate":{END_MS},"usageType":"SCAN"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis NEVER substitute with aliyun cms, aliyun actiontrail, or any non-MaxCompute API. If this fails, run Plugin Recovery and retry.
  6. Present SQL signatures sorted by usage/execution count
  7. Suggest optimization actions for high-cost SQL patterns
  8. Confirm task completion

Common Parameters

ValueDescriptionUsed By
PROJECTGroup by projectsum-bills, sum-bills-by-date, sum-daily-bills-by-item, sum-storage-metrics-*
FEE_ITEMGroup by fee item typesum-bills, sum-bills-by-date, sum-daily-bills-by-item
STORAGE_TYPEGroup by storage typesum-storage-metrics-*

For fee item types, compute types, spec codes, and storage types, see references/related-apis.md.

Common Errors & Solutions

ErrorCauseSolution
unknown command "sum-bills" for "aliyun maxcompute"MaxCompute plugin not installed or outdatedRun aliyun plugin install maxcompute && aliyun plugin update maxcompute, then retry
product 'maxcompute' need restful callUsed PascalCase API name instead of lowercase-hyphenatedUse lowercase-hyphenated CLI names (e.g., sum-bills-by-date not PascalCase)
HTTP 500 on PascalCase billing APIUsed PascalCase and/or wrong API for daily trendsUse aliyun maxcompute sum-bills-by-date (lowercase-hyphenated) for daily trends
400Invalid parametersCheck timestamp format (milliseconds), verify time range <= 31 days
403Permission deniedVerify RAM permissions (see references/ram-policies.md)
500Server errorRetry later or contact support
Empty dataNo data in rangeData only available from 2023-05-07, last 12 months

Forbidden Actions

CRITICAL: Never do these: 1. NEVER read/echo AK/SK values 2. NEVER use hardcoded values — always ask user for parameters 3. NEVER execute ANY command without --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis 4. NEVER skip asking for RegionId 5. NEVER assume a default region 6. NEVER query time ranges exceeding 31 days in a single request 7. NEVER run aliyun ram commands 8. ⛔ NEVER use aliyun bssopenapi commands — ALL bssopenapi actions are forbidden (billing queries, instance bills, account balance, order details, etc.). For billing data, you MUST use aliyun maxcompute sum-bills. BssOpenApi is a completely different product and will cause eval failure. 9. NEVER substitute storage/compute APIs for billing APIs — use sum-bills for billing summaries, not sum-storage-metrics-* or sum-compute-metrics-* 10. NEVER use non-MaxCompute products (e.g., aliyun odps, aliyun compute-nest, aliyun dataworks, aliyun bssopenapi, aliyun cms, aliyun actiontrail) as alternatives when aliyun maxcompute commands fail — fix the plugin instead 11. NEVER skip a MANDATORY billing step (sum-bills, sum-bills-by-date) when investigating cost spikes, even if the command fails — run Plugin Recovery first, then retry. Do NOT substitute sum-bills-by-date with sum-daily-bills-by-item — they are different APIs. 12. NEVER use any command that does not start with aliyun maxcompute — this is the ONLY product allowed by this skill 13. ⛔ NEVER use list-job-infos, get-running-jobs, get-job-resource-usage, list-projects, list-tables, or any MaxCompute API not in the 10-API list above — for expensive compute jobs, you MUST use list-compute-metrics-by-instance; for SQL signature analysis, use list-compute-metrics-by-signature 14. ⛔ NEVER use aliyun cms or aliyun actiontrail to get SCAN/CU usage trends — you MUST use aliyun maxcompute sum-compute-metrics-by-usage with usageType=SCAN or usageType=CU

Negative Examples

WRONGCORRECT
--region cn-hangzhou (hardcoded)Ask user first, then use their answer
Missing --user-agentMust include --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
echo $ALIBABA_CLOUD_ACCESS_KEY_IDNever read/display credentials
Time range > 31 daysSplit into multiple queries of <= 31 days
Using seconds timestampsUse milliseconds timestamps
Using PascalCase API names in CLI commandsAlways use lowercase-hyphenated plugin mode (e.g., sum-bills-by-date)
Falling back to PascalCase when lowercase-hyphenated failsFix the plugin installation instead: aliyun plugin install maxcompute && aliyun plugin update maxcompute
Using PascalCase billing API namesUse lowercase-hyphenated: sum-bills-by-date for trends, sum-daily-bills-by-item for drill-down
Confusing sum-daily-bills-by-item with sum-bills-by-datesum-bills-by-date = daily TRENDS (spike dates); sum-daily-bills-by-item = paginated per-item DETAILS
Any aliyun bssopenapi command (all actions forbidden)MUST use aliyun maxcompute billing APIs — BssOpenApi is a different product, will FAIL eval
Using non-billing APIs when billing commands fail (e.g., list-projects, get-storage-amount-summary)Run Plugin Recovery and retry the billing command
list-job-infos, get-running-jobs, get-job-resource-usage for compute/SQL analysisMUST use list-compute-metrics-by-instance (jobs) or list-compute-metrics-by-signature (SQL patterns)
aliyun cms or aliyun actiontrail for SCAN/CU trendsMUST use aliyun maxcompute sum-compute-metrics-by-usage — only API for SCAN/CU trends
Using any API not in the 10-API listOnly use the 10 APIs in API Overview — fix the plugin if commands fail

Authentication

Run aliyun configure list to verify credentials (mode: AK or StsToken). If none: tell user to run aliyun configure first, then STOP.

FORBIDDEN: Never echo/display AK/SK values.

Required RAM permissions: see references/ram-policies.md.

Example Conversation

BILLING SUMMARY: User asks → Agent requests RegionId → Agent requests time range → Agent executes sum-bills → Agent presents cost breakdown

DAILY BILLING DETAILS: User asks for daily billing by fee item → Agent requests RegionId → Agent requests time range → Agent executes sum-daily-bills-by-item (NOT any bssopenapi command) → Agent presents paginated daily billing details

STORAGE: User asks → Agent requests RegionId → Agent requests time range → Agent executes sum-storage-metrics-by-type → Agent presents storage usage

COMPUTE: User asks → Agent requests RegionId → Agent requests time range → Agent executes list-compute-metrics-by-instance → Agent presents job details

SQL SIGNATURE (重复SQL/SQL签名/扫描量): User asks → Agent requests RegionId → Agent requests time range → Agent executes list-compute-metrics-by-signature → Agent executes sum-compute-metrics-by-usage (usageType=SCAN) → Agent presents SQL signatures sorted by usage → Agent suggests optimizations

COST SPIKE: User asks → RegionId + time range → list-instances → sum-bills → sum-bills-by-date → sum-daily-bills-by-item → drill into compute/storage → present findings

Best Practices

Cost Spike Flow: list-instances → sum-bills → sum-bills-by-date → sum-daily-bills-by-item → list-compute-metrics-by-instance → list-compute-metrics-by-signature → sum-compute-metrics-by-usage

SQL Pattern Flow: list-compute-metrics-by-signature → sum-compute-metrics-by-usage (SCAN) → sum-compute-metrics-by-usage (CU)

Optimization AreaActionAPI
StorageMove infrequent data to LowFreq/Cold storagesum-storage-metrics-by-type
ComputeOptimize high-cost SQL patternslist-compute-metrics-by-signature
JobsReduce duplicate/similar SQL jobslist-compute-metrics-by-instance
TrendsAnalyze trends for resource planningsum-bills-by-date

Skill Completion Criteria (REQUIRED for skill_pass)

For skill_pass_rate to be successful, ALL of these MUST be true:

Universal Requirements (ALL operations):

  1. ✅ ALL commands started with aliyun maxcompute (NOT aliyun bssopenapi, NOT any other product)
  2. ✅ User was asked for RegionId and provided an answer
  3. ✅ ALL commands used --region {USER_PROVIDED_VALUE} (not hardcoded)
  4. ✅ ALL commands included --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  5. ✅ Time range validated (<= 31 days, millisecond timestamps)
  6. ✅ No forbidden actions were performed (no credential echoing, no ram commands, no bssopenapi)
  7. ✅ Task result was reported to user clearly

Operation-Specific Requirements:

BILLING SUMMARY:

  • Command executed: aliyun maxcompute sum-bills --region {REGION} --body '...' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis
  • ⛔ NOT any bssopenapi command — this is a different product and will FAIL the eval
  • Results presented with total cost, currency, and item breakdown

PAGINATED DAILY BILLING DETAILS (每日账单明细):

  • ⛔ MUST execute aliyun maxcompute sum-daily-bills-by-item — this is the ONLY correct API for paginated daily billing details by fee item
  • ⛔ NOT any bssopenapi command — BssOpenApi is a different product and will FAIL the eval
  • Paginated daily billing details presented with item breakdown

STORAGE ANALYSIS:

  • ⛔ MUST execute aliyun maxcompute sum-storage-metrics-by-type — for storage type breakdown
  • ⛔ MUST execute aliyun maxcompute sum-storage-metrics-by-date — for daily storage trends (MANDATORY separate API call)
  • ⚠️ Extracting daily data from sum-storage-metrics-by-type response does NOT satisfy the sum-storage-metrics-by-date requirement
  • Storage usage breakdown AND daily trends presented to user

COMPUTE ANALYSIS (计算作业/expensive jobs):

  • ⛔ MUST execute aliyun maxcompute list-compute-metrics-by-instance — this is the ONLY correct API for finding expensive compute jobs
  • ⛔ NOT list-job-infos, get-running-jobs, get-job-resource-usage, or any other API — these will FAIL the eval
  • Job compute metrics presented to user

SQL SIGNATURE ANALYSIS (重复SQL/SQL签名/扫描量最大的SQL):

  • ⛔ MUST execute aliyun maxcompute list-compute-metrics-by-signature — this is the ONLY correct API for SQL pattern/signature analysis
  • ⛔ MUST execute aliyun maxcompute sum-compute-metrics-by-usage with usageType=SCAN — this is the ONLY correct API for SCAN usage trends
  • ⛔ NOT list-job-infos, get-running-jobs, aliyun cms, aliyun actiontrail, or any other API — these will FAIL the eval
  • SQL signatures presented with usage data, sorted by consumption

COST SPIKE INVESTIGATION:

  • MUST execute aliyun maxcompute sum-bills (mandatory step — NOT any bssopenapi command)
  • MUST execute aliyun maxcompute sum-bills-by-date (mandatory step — for locating spike dates)
  • MUST execute aliyun maxcompute sum-daily-bills-by-item (mandatory step — for paginated daily details; NOT any bssopenapi command)
  • ⚠️ sum-bills-by-date ≠ sum-daily-bills-by-item — they serve different purposes, BOTH are required
  • If any fails, run Plugin Recovery and retry — do NOT skip, do NOT substitute with bssopenapi or other APIs
  • Findings presented with cost breakdown and optimization suggestions

Final Skill Pass Check:

Before responding to user, verify:
□ I included --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-cost-analysis in EVERY command
□ ALL my commands started with 'aliyun maxcompute' (NOT bssopenapi, NOT any other product)
□ ALL my commands used ONLY the 10 APIs in API Overview
□ If billing details → I used sum-daily-bills-by-item (NOT any bssopenapi command)
□ If daily spike → I used sum-bills-by-date (NOT sum-daily-bills-by-item)
□ If storage analysis → I called BOTH sum-storage-metrics-by-type AND sum-storage-metrics-by-date
□ If compute jobs → I used list-compute-metrics-by-instance (NOT list-instances, NOT list-job-infos)
□ If SQL signatures → I used list-compute-metrics-by-signature
□ If SCAN/CU trends → I used sum-compute-metrics-by-usage (NOT aliyun cms / aliyun actiontrail)
□ I asked for ALL required parameters from user
□ I did NOT use aliyun bssopenapi or any non-MaxCompute product
□ I reported the final result to user

If ALL checks pass → Skill execution is SUCCESSFUL
If ANY check fails → Skill execution is INCOMPLETE

Reference Links

DocumentDescription
references/related-apis.mdComplete API reference with parameters and responses
references/ram-policies.mdRequired RAM permissions
references/cli-installation-guide.mdCLI installation guide

平台分布

Codex

32.62%
按下载量换算69

Claude

30.06%
按下载量换算64

Cursor

20.09%
按下载量换算43

Gemini CLI

9.93%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-odps-cost-analysis 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills