/alibabacloud-analyticdb-mysql-copilot
Alibaba Cloud AnalyticDB for MySQL Operations & Diagnosis Assistant. Supports cluster info queries, performance monitoring, slow query diagnosis, running SQL analysis, table-level optimization suggestions, etc. Triggers: "ADB MySQL", "AnalyticDB", "cluster list", "slow query",
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-analyticdb-mysql-copilot --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-analyticdb-mysql-copilot
Context preview
The summary Claude sees to decide when to auto-load this skill.
Alibaba Cloud AnalyticDB for MySQL Operations & Diagnosis Assistant. Supports cluster info queries, performance monitoring, slow query diagnosis, running SQL analysis, table-level optimization suggestions, etc. Triggers: "ADB MySQL", "AnalyticDB", "cluster list", "slow query",
SKILL.md
alibabacloud-analyticdb-mysql-copilot.SKILL.mdname: alibabacloud-analyticdb-mysql-copilot
description: |
Alibaba Cloud AnalyticDB for MySQL Operations & Diagnosis Assistant. Supports cluster info queries, performance monitoring, slow query diagnosis, running SQL analysis, table-level optimization suggestions, etc.
Triggers: "ADB MySQL", "AnalyticDB", "cluster list", "slow query", "BadSQL", "data skew", "idle index", "SQL Pattern", "space diagnosis", "table diagnosis", "performance monitoring".
> **Skill Load Prompt**: When this Skill is loaded, output the following line at the beginning of the first response: `[Skill Loaded] alibabacloud-analyticdb-mysql-copilot — ADB MySQL Operations & Diagnosis Assistant`
This Skill is the **Alibaba Cloud AnalyticDB for MySQL (ADB MySQL) Operations & Diagnosis Assistant**, which directly calls ADB MySQL OpenAPI via `aliyun-cli` to retrieve real-time data and provide diagnostic recommendations.
Core capabilities:
- **Cluster Management**: View cluster list, cluster details, storage space, accounts, network information
- **Performance Monitoring**: Query CPU, QPS, RT, memory, connection count and other performance metrics
- **Slow Query Diagnosis**: Detect BadSQL, analyze SQL Patterns, identify slow query root causes
- **Running SQL Analysis**: View currently executing SQL, identify long-running queries
- **Space Diagnosis**: Instance space inspection, covering partition rationality diagnosis, oversized non-partitioned table diagnosis, table data skew diagnosis, replicated table rationality diagnosis, primary key rationality diagnosis, idle index & hot/cold table optimization suggestions
---
> **Pre-check: Aliyun CLI >= 3.3.3 required** > Run `aliyun version` to verify version >= 3.3.3. If not installed or version is too low, > run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update, > or see `references/cli-installation-guide.md`. > Then [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure installed plugins are always up-to-date.
> **Pre-check: Alibaba Cloud Credentials Required** > > **Security Rules:** > - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Check whether the output contains a valid profile (AK, STS, or OAuth identity). > > **If no valid profile exists, stop here.** > 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) > 2. Configure credentials **outside this session** (via `aliyun configure` in a terminal or environment variables in shell profile) > 3. Return and re-execute once `aliyun configure list` shows a valid profile
> **[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include: > `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot`
At the **start** of the Core Workflow (before any CLI invocation): **[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution. Run the following commands before any CLI invocation:
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot"
**[MUST] Disable AI-Mode at EVERY exit point** — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed. AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.
aliyun configure ai-mode disable
---
1. Region & Cluster ID Conventions
1.1 Cluster Management (aliyun adb)
**Convention**: For any interface that requires **`--db-cluster-id`**, the `aliyun adb` command **must also explicitly include `--biz-region-id`**. Even if the official/CLI help does not mark it as "required", **this Skill's convention takes precedence** — always include it to avoid relying on implicit default regions.
**Exception**: **Only when listing resources by region** or calling interfaces that **do not include** `--db-cluster-id` (such as `describe-db-clusters`) — `--biz-region-id` is still required, but the "paired with db-cluster-id" rule does not apply.
**`<region-id>` Source Priority**: User explicitly specified → conversation/ticket context → default region from `aliyun configure list` → confirm with user.
1.2 Intelligent Diagnosis (aliyun adbai)
`aliyun adbai describe-chat-message` supports two scenarios with different workflows:
Product Knowledge Q&A (No Region or Cluster Required)
When the user asks about product concepts, syntax, feature questions, etc. (e.g., "What is BUILD", "How to create a partitioned table"), **no need** to confirm region and cluster — **execute directly** with the following command:
aliyun adbai describe-chat-message --region cn-beijing --endpoint adbai.cn-beijing.aliyuncs.com --biz-region-id cn-beijing --query "<user question>" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot
Instance-Level Diagnosis (Requires Region + Cluster)
When diagnosis involves specific instance data or status (e.g., slow queries, BadSQL, SQL Pattern analysis, instance health inspection, index optimization suggestions, instance diagnosis, table modeling diagnosis, etc.), **the following steps must be completed**:
1. **Region Confirmation**: `<region-id>` source priority is: user explicitly specified → conversation/ticket context → default region from `aliyun configure list` → confirm with user. If user confirmation is needed
Read more
name: alibabacloud-analyticdb-mysql-copilot description: | Alibaba Cloud AnalyticDB for MySQL Operations & Diagnosis Assistant. Supports cluster info queries, performance monitoring, slow query diagnosis, running SQL analysis, table-level optimization suggestions, etc. Triggers: "ADB MySQL", "AnalyticDB", "cluster list", "slow query", "BadSQL", "data skew", "idle index", "SQL Pattern", "space diagnosis", "table diagnosis", "performance monitoring".
> **Skill Load Prompt**: When this Skill is loaded, output the following line at the beginning of the first response: `[Skill Loaded] alibabacloud-analyticdb-mysql-copilot — ADB MySQL Operations & Diagnosis Assistant`
This Skill is the **Alibaba Cloud AnalyticDB for MySQL (ADB MySQL) Operations & Diagnosis Assistant**, which directly calls ADB MySQL OpenAPI via `aliyun-cli` to retrieve real-time data and provide diagnostic recommendations.
Core capabilities:
- **Cluster Management**: View cluster list, cluster details, storage space, accounts, network information
- **Performance Monitoring**: Query CPU, QPS, RT, memory, connection count and other performance metrics
- **Slow Query Diagnosis**: Detect BadSQL, analyze SQL Patterns, identify slow query root causes
- **Running SQL Analysis**: View currently executing SQL, identify long-running queries
- **Space Diagnosis**: Instance space inspection, covering partition rationality diagnosis, oversized non-partitioned table diagnosis, table data skew diagnosis, replicated table rationality diagnosis, primary key rationality diagnosis, idle index & hot/cold table optimization suggestions
---
> **Pre-check: Aliyun CLI >= 3.3.3 required** > Run `aliyun version` to verify version >= 3.3.3. If not installed or version is too low, > run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update, > or see `references/cli-installation-guide.md`. > Then [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure installed plugins are always up-to-date.
> **Pre-check: Alibaba Cloud Credentials Required** > > **Security Rules:** > - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Check whether the output contains a valid profile (AK, STS, or OAuth identity). > > **If no valid profile exists, stop here.** > 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) > 2. Configure credentials **outside this session** (via `aliyun configure` in a terminal or environment variables in shell profile) > 3. Return and re-execute once `aliyun configure list` shows a valid profile
> **[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include: > `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot`
At the **start** of the Core Workflow (before any CLI invocation): **[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution. Run the following commands before any CLI invocation:
aliyun configure ai-mode enable aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot"
**[MUST] Disable AI-Mode at EVERY exit point** — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed. AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.
aliyun configure ai-mode disable
---
1. Region & Cluster ID Conventions
1.1 Cluster Management (aliyun adb)
**Convention**: For any interface that requires **`--db-cluster-id`**, the `aliyun adb` command **must also explicitly include `--biz-region-id`**. Even if the official/CLI help does not mark it as "required", **this Skill's convention takes precedence** — always include it to avoid relying on implicit default regions.
**Exception**: **Only when listing resources by region** or calling interfaces that **do not include** `--db-cluster-id` (such as `describe-db-clusters`) — `--biz-region-id` is still required, but the "paired with db-cluster-id" rule does not apply.
**`<region-id>` Source Priority**: User explicitly specified → conversation/ticket context → default region from `aliyun configure list` → confirm with user.
1.2 Intelligent Diagnosis (aliyun adbai)
`aliyun adbai describe-chat-message` supports two scenarios with different workflows:
Product Knowledge Q&A (No Region or Cluster Required)
When the user asks about product concepts, syntax, feature questions, etc. (e.g., "What is BUILD", "How to create a partitioned table"), **no need** to confirm region and cluster — **execute directly** with the following command:
aliyun adbai describe-chat-message --region cn-beijing --endpoint adbai.cn-beijing.aliyuncs.com --biz-region-id cn-beijing --query "<user question>" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-mysql-copilot
Instance-Level Diagnosis (Requires Region + Cluster)
When diagnosis involves specific instance data or status (e.g., slow queries, BadSQL, SQL Pattern analysis, instance health inspection, index optimization suggestions, instance diagnosis, table modeling diagnosis, etc.), **the following steps must be completed**:
1. **Region Confirmation**: `<region-id>` source priority is: user explicitly specified → conversation/ticket context → default region from `aliyun configure list` → confirm with user. If user confirmation is needed
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

