/alibabacloud-finops-inspect
Alibaba Cloud FinOps Resource Inspection Skill. Performs cost-oriented health inspection across all regions of an Alibaba Cloud account. Scans ECS, RDS, EIP, Cloud Disks, Load Balancers (CLB/ALB/NLB), and NAT Gateways to identify underutilized and idle resources. Triggers:
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-finops-inspect --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/alibabacloud-finops-inspect
Context preview
The summary Claude sees to decide when to auto-load this skill.
Alibaba Cloud FinOps Resource Inspection Skill. Performs cost-oriented health inspection across all regions of an Alibaba Cloud account. Scans ECS, RDS, EIP, Cloud Disks, Load Balancers (CLB/ALB/NLB), and NAT Gateways to identify underutilized and idle resources. Triggers:
SKILL.md
alibabacloud-finops-inspect.SKILL.mdname: alibabacloud-finops-inspect
description: |
Alibaba Cloud FinOps Resource Inspection Skill. Performs cost-oriented health inspection
across all regions of an Alibaba Cloud account. Scans ECS, RDS, EIP, Cloud Disks,
Load Balancers (CLB/ALB/NLB), and NAT Gateways to identify underutilized and idle resources.
Triggers: "FinOps巡检", "成本巡检", "资源利用率检查", "idle resource detection",
"cost optimization", "finops inspection", "资源浪费检查", "闲置资源检测".
Alibaba Cloud FinOps Resource Inspection Skill
> **⚠️ MANDATORY EXECUTION PROTOCOL ⚠️** > > This skill MUST be executed EXCLUSIVELY by running: > ``` > python3 scripts/main.py [parameters] > ``` > **FORBIDDEN actions** (violation = invalid execution): > - ❌ Running `aliyun` CLI commands directly > - ❌ Writing custom bash/python scripts > - ❌ Calling SDK APIs directly in code > - ❌ Any execution method other than `python3 scripts/main.py` > > The Agent MUST first confirm parameters with user, then run `python3 scripts/main.py` with appropriate flags. No exceptions.
Overview
This skill provides a **pre-built Python script** (`scripts/main.py`) that performs cost-oriented health inspection across all regions of an Alibaba Cloud account. The Agent's role is ONLY to: 1. Parse user intent into CLI parameters 2. Confirm parameters with user (HITL) 3. Run `python3 scripts/main.py [parameters]` 4. Present the script output as the final report
The script internally handles: credential initialization, region discovery, multi-product resource collection, CloudMonitor metric aggregation, judgment & recommendation generation, and structured report output. **The Agent MUST NOT replicate any of this logic** — just run the script.
> **Note**: The Workflow section below describes the script's INTERNAL implementation for documentation purposes only. The Agent MUST NOT use this information to write custom code or call APIs directly. The ONLY action required is running `python3 scripts/main.py`.
Features
This skill implements the following features:
1. **Credentials and Region Preparation**
- Load AK/SK in priority order: environment variables → Alibaba Cloud CLI config → runtime prompt
- Call the ECS API to automatically discover all enabled regions under the account
- Allow users to explicitly specify regions via the `--regions` parameter
2. **Core Resource Utilization Inspection**
- Inspect 7-day average CPU, memory, IOPS, and intranet bandwidth for ECS instances
- Inspect CPU, memory, IOPS, connection usage, and disk usage for RDS instances
- Tag results with three severity levels: Critical Idle / Low Utilization / Normal
- Separately identify "stopped but still billed" prepaid ECS instances
- Identify long-running (>30 days) PostPaid instances and recommend switching to PrePaid (subscription) billing for cost savings
3. **Idle Resource Detection**
- Detect unbound or zero-traffic Elastic IPs (EIPs)
- Detect unmounted data disks, with priority escalation based on creation age
- Detect Load Balancers (CLB/ALB/NLB) with no listeners or no backend servers
- Detect public NAT Gateways without bound EIPs or without any SNAT/DNAT rules
4. **Optimization Recommendation Engine**
- Categorize recommendations into P0 (Act Now) / P1 (Recommended) / P2 (Observe)
- Apply differentiated recommendation templates per resource scenario (downsize / release / switch billing / convert to Serverless, etc.)
- Optionally display estimated monthly cost of each resource
5. **Report Output**
- Structured text report: inspection summary + per-resource detail tables + recommendation summary + error summary
Important Notes
- **Read-Only Guarantee**:
- The skill calls only `Describe*` / `List*` read-only APIs. It **never** performs Delete / Stop / Modify operations. All recommendations include a "please confirm before acting" warning.
- **Operation Costs**:
- The skill itself creates no live resources, but it does invoke a large number of read-only OpenAPI calls. In large-account scenarios (thousands of instances × multiple regions × multiple metrics), CloudMonitor call volume is significant — built-in throttling is required to avoid triggering API Throttling.
- **Credential Security**:
- AK/SK are used only in memory; they are never persisted, written to logs, or included in the report. Running with a least-privilege RAM sub-account is recommended.
- **Memory Metric Dependency**:
- ECS memory utilization requires the CloudMonitor agent (`cloudmonitor-agent`) installed on the instance. Instances without the agent are flagged as "memory data missing" and judged on CPU metrics only.
- **Observation Window Handling**:
- Resources created within the last 7 days are flagged as "observation window" and excluded from idle / low-utilization judgment to avoid false positives.
Prerequisites
- **Environment**: Python 3.10+
- **Alibaba Cloud Account**: An Alibaba Cloud account with the relevant services activated (ECS / RDS / VPC / SLB / ALB / NLB / CMS, etc.)
- **Access Credentials**: Configure access credentials properly. This skill uses the `alibabacloud-credentials` credential chain to automatically read credentials from environment variables or the CLI config. For configuration details, see [Manage Access Credentials in Python](https://help.aliyun.com/zh/sdk/developer-reference/manage-access-credentials).
- **RAM Permissions**: A least-privilege RAM policy with read-only actions is recommended. Key actions include:
- `ecs:DescribeRegions` / `ecs:DescribeInstances` / `ecs:DescribeDisks`
- `rds:DescribeDBInstances`
- `vpc:DescribeEipAddresses` / `vpc:DescribeNatGateways` / `vpc:DescribeSnatTableEntries` / `vpc:DescribeForwardTableEntries`
- `slb:DescribeLoadBalancers` / `slb:DescribeLoadBalancerListeners`
- `alb:ListLoadBalancers` / `alb:ListListeners` / `alb:ListServerGroups` / `alb:ListServerGroupServers`
- `nlb:ListLoadBalancers` / `nlb:ListListeners` / `nlb:ListServerGroups`
- `cms:Des
Read more
name: alibabacloud-finops-inspect description: | Alibaba Cloud FinOps Resource Inspection Skill. Performs cost-oriented health inspection across all regions of an Alibaba Cloud account. Scans ECS, RDS, EIP, Cloud Disks, Load Balancers (CLB/ALB/NLB), and NAT Gateways to identify underutilized and idle resources. Triggers: "FinOps巡检", "成本巡检", "资源利用率检查", "idle resource detection", "cost optimization", "finops inspection", "资源浪费检查", "闲置资源检测".
Alibaba Cloud FinOps Resource Inspection Skill
> **⚠️ MANDATORY EXECUTION PROTOCOL ⚠️** > > This skill MUST be executed EXCLUSIVELY by running: > ``` > python3 scripts/main.py [parameters] > ``` > **FORBIDDEN actions** (violation = invalid execution): > - ❌ Running `aliyun` CLI commands directly > - ❌ Writing custom bash/python scripts > - ❌ Calling SDK APIs directly in code > - ❌ Any execution method other than `python3 scripts/main.py` > > The Agent MUST first confirm parameters with user, then run `python3 scripts/main.py` with appropriate flags. No exceptions.
Overview
This skill provides a **pre-built Python script** (`scripts/main.py`) that performs cost-oriented health inspection across all regions of an Alibaba Cloud account. The Agent's role is ONLY to: 1. Parse user intent into CLI parameters 2. Confirm parameters with user (HITL) 3. Run `python3 scripts/main.py [parameters]` 4. Present the script output as the final report
The script internally handles: credential initialization, region discovery, multi-product resource collection, CloudMonitor metric aggregation, judgment & recommendation generation, and structured report output. **The Agent MUST NOT replicate any of this logic** — just run the script.
> **Note**: The Workflow section below describes the script's INTERNAL implementation for documentation purposes only. The Agent MUST NOT use this information to write custom code or call APIs directly. The ONLY action required is running `python3 scripts/main.py`.
Features
This skill implements the following features:
1. **Credentials and Region Preparation**
- Load AK/SK in priority order: environment variables → Alibaba Cloud CLI config → runtime prompt
- Call the ECS API to automatically discover all enabled regions under the account
- Allow users to explicitly specify regions via the `--regions` parameter
2. **Core Resource Utilization Inspection**
- Inspect 7-day average CPU, memory, IOPS, and intranet bandwidth for ECS instances
- Inspect CPU, memory, IOPS, connection usage, and disk usage for RDS instances
- Tag results with three severity levels: Critical Idle / Low Utilization / Normal
- Separately identify "stopped but still billed" prepaid ECS instances
- Identify long-running (>30 days) PostPaid instances and recommend switching to PrePaid (subscription) billing for cost savings
3. **Idle Resource Detection**
- Detect unbound or zero-traffic Elastic IPs (EIPs)
- Detect unmounted data disks, with priority escalation based on creation age
- Detect Load Balancers (CLB/ALB/NLB) with no listeners or no backend servers
- Detect public NAT Gateways without bound EIPs or without any SNAT/DNAT rules
4. **Optimization Recommendation Engine**
- Categorize recommendations into P0 (Act Now) / P1 (Recommended) / P2 (Observe)
- Apply differentiated recommendation templates per resource scenario (downsize / release / switch billing / convert to Serverless, etc.)
- Optionally display estimated monthly cost of each resource
5. **Report Output**
- Structured text report: inspection summary + per-resource detail tables + recommendation summary + error summary
Important Notes
- **Read-Only Guarantee**:
- The skill calls only `Describe*` / `List*` read-only APIs. It **never** performs Delete / Stop / Modify operations. All recommendations include a "please confirm before acting" warning.
- **Operation Costs**:
- The skill itself creates no live resources, but it does invoke a large number of read-only OpenAPI calls. In large-account scenarios (thousands of instances × multiple regions × multiple metrics), CloudMonitor call volume is significant — built-in throttling is required to avoid triggering API Throttling.
- **Credential Security**:
- AK/SK are used only in memory; they are never persisted, written to logs, or included in the report. Running with a least-privilege RAM sub-account is recommended.
- **Memory Metric Dependency**:
- ECS memory utilization requires the CloudMonitor agent (`cloudmonitor-agent`) installed on the instance. Instances without the agent are flagged as "memory data missing" and judged on CPU metrics only.
- **Observation Window Handling**:
- Resources created within the last 7 days are flagged as "observation window" and excluded from idle / low-utilization judgment to avoid false positives.
Prerequisites
- **Environment**: Python 3.10+
- **Alibaba Cloud Account**: An Alibaba Cloud account with the relevant services activated (ECS / RDS / VPC / SLB / ALB / NLB / CMS, etc.)
- **Access Credentials**: Configure access credentials properly. This skill uses the `alibabacloud-credentials` credential chain to automatically read credentials from environment variables or the CLI config. For configuration details, see [Manage Access Credentials in Python](https://help.aliyun.com/zh/sdk/developer-reference/manage-access-credentials).
- **RAM Permissions**: A least-privilege RAM policy with read-only actions is recommended. Key actions include:
- `ecs:DescribeRegions` / `ecs:DescribeInstances` / `ecs:DescribeDisks`
- `rds:DescribeDBInstances`
- `vpc:DescribeEipAddresses` / `vpc:DescribeNatGateways` / `vpc:DescribeSnatTableEntries` / `vpc:DescribeForwardTableEntries`
- `slb:DescribeLoadBalancers` / `slb:DescribeLoadBalancerListeners`
- `alb:ListLoadBalancers` / `alb:ListListeners` / `alb:ListServerGroups` / `alb:ListServerGroupServers`
- `nlb:ListLoadBalancers` / `nlb:ListListeners` / `nlb:ListServerGroups`
- `cms:Des
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Other skills on alibabacloud-aiops-skills.
- /alibabacloud-agentbay-aio-skills
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users request to run, execute, or evaluate code (Python, JavaScript, R, Java), including plotting charts, running scripts, or viewing code output. Covers requests like "run this code", "execute
Open skill - /alibabacloud-agentloop-dataset
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API version 2026-05-20. Use when requests concern AgentLoop datasets, data rows, Dataset schemas, embedding fields, semantic search, ExecuteQuery, AgentSpace data, 数据集, 数据写入, 数据查询, 语义检索, or ask
Open skill - /alibabacloud-agentloop-evaluation
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews, saved evaluator and evaluator-skill management, one-shot sample tests, trace or dataset batch runs, polling, and result inspection. Analyze evaluation quality and low-score cases from
Open skill - /alibabacloud-agentloop-experience
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through the bundled SearchContext CLI whenever the user asks or implies that prior work may help. Trigger for requests to check, search, recall, retrieve, look up, review, consult, reference,
Open skill - /alibabacloud-agentloop-management
AgentLoop APM接入 / AI可观测接入 / 应用监控接入 / 自研探针 / 探针安装. Use for Python aliyun-bootstrap (aliyun-instrument), Java AliyunJavaAgent, Golang instgo, Node.js cms_node_sdk, PHP/.NET OpenTelemetry, ack-onepilot, LicenseKey, AgentLoop workspace agentloop-*. Also for LangChain, Dify,
Open skill - /alibabacloud-avatar-video
Use Alibaba Cloud DashScope API and LingMou to generate AI video and speech. Seven capabilities — (1) LivePortrait talking-head (image + audio → video, two-step), (2) EMO talking-head, (3) AA/AnimateAnyone full-body animation (three-step), (4) T2I text-to-image (Wan 2.x, default
Open skill

