Skip to content
Cloud & Infrastructure
Skill

/alibabacloud-odps-cost-analysis

Alibaba Cloud MaxCompute Cost Analysis Skill. Analyze MaxCompute pay-as-you-go costs including billing, storage metrics, and compute metrics. Triggers: "maxcompute cost", "odps cost", "maxcompute billing", "maxcompute费用", "成本分析", "费用分析", "存储用量", "计算用量", "费用突增", "SQL签名", "SQL

From plugin
alibabacloud-aiops-skills
300200 skills

Claude Code

$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-odps-cost-analysis --agent claude-code

SKILL.md

alibabacloud-odps-cost-analysis.SKILL.md
name: alibabacloud-odps-cost-analysis
description: |
  Alibaba Cloud MaxCompute Cost Analysis Skill. Analyze MaxCompute pay-as-you-go costs including billing, storage metrics, and compute metrics.
  Triggers: "maxcompute cost", "odps cost", "maxcompute billing", "maxcompute费用", "成本分析", "费用分析", "存储用量", "计算用量", "费用突增", "SQL签名", "SQL signature", "重复SQL", "扫描量最大", "daily billing details", "每日账单明细", "按计费项", "billing by fee item".

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

| API | Description | Method | Category | |-----|-------------|--------|----------| | list-instances | Get instance/project list (NOT compute metrics — see `list-compute-metrics-by-instance` for job-level data) | GET | Instance | | sum-bills | Summarize bills by project or fee item | POST | Billing | | **sum-bills-by-date** | **Daily bill trends (USE THIS for spike analysis)** | POST | Billing | | sum-daily-bills-by-item | Daily b

Read more
@aliyun
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Stars on GitHub

Momentum

stars in total
300
Star history of aliyun/alibabacloud-aiops-skills on GitHub, a chart by star-history.com

Other skills on alibabacloud-aiops-skills.

More skills from other plugins.

container

container

Use when running, building, or managing Linux containers on macOS, or when a task involves Docker, docker compose, Lima, Colima,…

@apple@appleInstall Skill
agent-advisor

agent-advisor

Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one…

@aws@awsInstall Skill
agents-sdk
Auto-invoked

agents-sdk

Build, debug, or review Cloudflare Agents SDK applications using the agents package.

@cloudflare@cloudflareInstall Skill

Questions about alibabacloud-odps-cost-analysis.

Which coding agents can use alibabacloud-odps-cost-analysis?
alibabacloud-odps-cost-analysis installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.