/alibabacloud-data-agent-skill
Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-data-agent-skill --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-data-agent-skill
Context preview
The summary Claude sees to decide when to auto-load this skill.
Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically
SKILL.md
alibabacloud-data-agent-skill.SKILL.mdname: alibabacloud-data-agent-skill
description: |
Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases.
Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions.
This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports.
Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
compatibility: |
Requires Python 3.10+ (macOS system Python is typically too old — use brew or pyenv to install);
Requires valid Alibaba Cloud credentials (default credential chain or API_KEY);
Requires dependencies in requirements.txt to be installed inside a venv;
Data sources must be managed in Alibaba Cloud Apsara Database or DMS.
domain: AIOps
metadata: author: DataAgent Team version: "1.8.5" ---
Changelog
- **v1.8.5** — Database listing migrated to `ListTagMetaAsset` (dms-enterprise 2018-11-01); workspace auto-resolution (CLI `--workspace-id` > env `DATA_AGENT_WORKSPACE_ID` > `InitDataAgentPersonalWorkspace`); `db` subcommand relaxed `--dms-instance-id` / `--instance-name` to optional.
- **v1.8.4**: Document project Python virtualenv (`venv/`) setup and activation; add end-to-end regression notes for ASK_DATA / ANALYSIS (async + attach)
- **v1.8.3**: `db` and `file` subcommands now accept `--session-mode CLAW`
- **v1.8.2**: `SendChatMessage` now supports per-message `Mode=CLAW` (injected via `SessionConfig.Mode`); dynamic DMSUnit resolution via `GetActiveRouteUnit`
- **v1.8.1**: Emphasize `attach`-based session reuse as the core interaction mechanism; add golden workflow, capability matrix, and usage rules
- **v1.8.0**: Add workspace (collaborative space) support, add custom agent support
- **v1.7.2**: Use Alibaba Cloud default credential chain instead of explicit AK/SK, add User-Agent header, fix RAM policy wildcard issues
- **v1.7.1**: Fix CLI `ls` command API response parsing (support case-insensitive field names), optimize SKILL documentation structure, separate ANALYSIS mode specification document
- **v1.7.0**: API_KEY authentication support, native async execution mode, session isolation, enhanced attach mode, optimized log output
---
---
Installation
Python Environment (venv) — MUST READ
> **🚨 Hard Requirement: Python ≥ 3.10** > > The macOS system `/usr/bin/python3` is typically 3.8 or 3.9 and **cannot run this project** (it relies on `match/case`, `TypeAlias`, `|` union syntax, and other 3.10+ features). > > Verify your version first: `python3 --version`. If below 3.10, install via Homebrew or pyenv: > ```bash > # Homebrew > brew install python@3.12 > # Or pyenv > pyenv install 3.12.4 && pyenv local 3.12.4 > ```
> **⚠️ You MUST use a venv virtual environment. Never install dependencies globally.** Running `pip install` against the system Python pollutes the environment and may fail due to permission issues.
Use Existing venv (Recommended)
The project ships a pre-built `venv/` directory (all dependencies pre-installed). Use it whenever possible:
cd alibabacloud-data-agent-skill
# Option A (recommended): activate the venv
source venv/bin/activate
python3 scripts/data_agent_cli.py ls
# Option B: invoke the venv interpreter directly (no activation needed)
venv/bin/python3 scripts/data_agent_cli.py ls
Rebuild venv
If `venv/` is missing or dependencies are corrupted, recreate with a **3.10+** Python:
python3.12 -m venv venv # explicitly use a 3.10+ interpreter
source venv/bin/activate
pip install -r scripts/requirements.txt
> **Tip**: All examples in this document write `python3 scripts/data_agent_cli.py ...`. When venv is activated, `python3` resolves to the venv interpreter automatically; otherwise prefix with `venv/bin/python3`.
Configure Credentials
This Skill uses Alibaba Cloud default credential chain (recommended) or API_KEY authentication.
Option 1: Default Credential Chain (Recommended)
The Skill uses Alibaba Cloud SDK's default credential chain to automatically obtain credentials, supporting environment variables, configuration files, instance roles, etc.
See [Alibaba Cloud Credential Chain Documentation](https://help.aliyun.com/document_detail/378659.html)
Option 2: API_KEY Authentication (File Analysis Only)
export DATA_AGENT_API_KEY=your-api-key
export DATA_AGENT_REGION=cn-hangzhou
Get API_KEY: [Data Agent Console](https://agent.dms.aliyun.com/cn-hangzhou/api-key)
Permission Requirements
RAM users need `AliyunDMSFullAccess` or `AliyunDMSDataAgentFullAccess` permissions. See [RAM-POLICIES.md](references/RAM-POLICIES.md) for detailed permission information.
Debug Mode
DATA_AGENT_DEBUG_API=1 python3 scripts/data_agent_cli.py file example.csv -q "analyze"
💡 Getting Started Tips
- Use the built-in demo database `internal_data_employees` (DataAgent's built-in test database containing employee, department, and salary data) for first-time experience
- Or use local file `assets/example_game_data.csv` for file analysis experience
Data Agent CLI — Unified Command-Line Data Analysis Tool
Overview
`scripts/data_agent_cli.py` helps users complete the full workflow from **discover data → initiate analysis → track progress → get results**.
Core Concepts
> **⚠️ Key Prerequisite**: Data Agent can only analyze databases that have been **imported into Data Agent Data Center**. > > - **Data Center**: Data Agent's data center, only
Read more
name: alibabacloud-data-agent-skill description: | Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights". compatibility: | Requires Python 3.10+ (macOS system Python is typically too old — use brew or pyenv to install); Requires valid Alibaba Cloud credentials (default credential chain or API_KEY); Requires dependencies in requirements.txt to be installed inside a venv; Data sources must be managed in Alibaba Cloud Apsara Database or DMS. domain: AIOps
metadata: author: DataAgent Team version: "1.8.5" ---
Changelog
- **v1.8.5** — Database listing migrated to `ListTagMetaAsset` (dms-enterprise 2018-11-01); workspace auto-resolution (CLI `--workspace-id` > env `DATA_AGENT_WORKSPACE_ID` > `InitDataAgentPersonalWorkspace`); `db` subcommand relaxed `--dms-instance-id` / `--instance-name` to optional.
- **v1.8.4**: Document project Python virtualenv (`venv/`) setup and activation; add end-to-end regression notes for ASK_DATA / ANALYSIS (async + attach)
- **v1.8.3**: `db` and `file` subcommands now accept `--session-mode CLAW`
- **v1.8.2**: `SendChatMessage` now supports per-message `Mode=CLAW` (injected via `SessionConfig.Mode`); dynamic DMSUnit resolution via `GetActiveRouteUnit`
- **v1.8.1**: Emphasize `attach`-based session reuse as the core interaction mechanism; add golden workflow, capability matrix, and usage rules
- **v1.8.0**: Add workspace (collaborative space) support, add custom agent support
- **v1.7.2**: Use Alibaba Cloud default credential chain instead of explicit AK/SK, add User-Agent header, fix RAM policy wildcard issues
- **v1.7.1**: Fix CLI `ls` command API response parsing (support case-insensitive field names), optimize SKILL documentation structure, separate ANALYSIS mode specification document
- **v1.7.0**: API_KEY authentication support, native async execution mode, session isolation, enhanced attach mode, optimized log output
---
---
Installation
Python Environment (venv) — MUST READ
> **🚨 Hard Requirement: Python ≥ 3.10** > > The macOS system `/usr/bin/python3` is typically 3.8 or 3.9 and **cannot run this project** (it relies on `match/case`, `TypeAlias`, `|` union syntax, and other 3.10+ features). > > Verify your version first: `python3 --version`. If below 3.10, install via Homebrew or pyenv: > ```bash > # Homebrew > brew install python@3.12 > # Or pyenv > pyenv install 3.12.4 && pyenv local 3.12.4 > ```
> **⚠️ You MUST use a venv virtual environment. Never install dependencies globally.** Running `pip install` against the system Python pollutes the environment and may fail due to permission issues.
Use Existing venv (Recommended)
The project ships a pre-built `venv/` directory (all dependencies pre-installed). Use it whenever possible:
cd alibabacloud-data-agent-skill # Option A (recommended): activate the venv source venv/bin/activate python3 scripts/data_agent_cli.py ls # Option B: invoke the venv interpreter directly (no activation needed) venv/bin/python3 scripts/data_agent_cli.py ls
Rebuild venv
If `venv/` is missing or dependencies are corrupted, recreate with a **3.10+** Python:
python3.12 -m venv venv # explicitly use a 3.10+ interpreter source venv/bin/activate pip install -r scripts/requirements.txt
> **Tip**: All examples in this document write `python3 scripts/data_agent_cli.py ...`. When venv is activated, `python3` resolves to the venv interpreter automatically; otherwise prefix with `venv/bin/python3`.
Configure Credentials
This Skill uses Alibaba Cloud default credential chain (recommended) or API_KEY authentication.
Option 1: Default Credential Chain (Recommended)
The Skill uses Alibaba Cloud SDK's default credential chain to automatically obtain credentials, supporting environment variables, configuration files, instance roles, etc.
See [Alibaba Cloud Credential Chain Documentation](https://help.aliyun.com/document_detail/378659.html)
Option 2: API_KEY Authentication (File Analysis Only)
export DATA_AGENT_API_KEY=your-api-key export DATA_AGENT_REGION=cn-hangzhou
Get API_KEY: [Data Agent Console](https://agent.dms.aliyun.com/cn-hangzhou/api-key)
Permission Requirements
RAM users need `AliyunDMSFullAccess` or `AliyunDMSDataAgentFullAccess` permissions. See [RAM-POLICIES.md](references/RAM-POLICIES.md) for detailed permission information.
Debug Mode
DATA_AGENT_DEBUG_API=1 python3 scripts/data_agent_cli.py file example.csv -q "analyze"
💡 Getting Started Tips
- Use the built-in demo database `internal_data_employees` (DataAgent's built-in test database containing employee, department, and salary data) for first-time experience
- Or use local file `assets/example_game_data.csv` for file analysis experience
Data Agent CLI — Unified Command-Line Data Analysis Tool
Overview
`scripts/data_agent_cli.py` helps users complete the full workflow from **discover data → initiate analysis → track progress → get results**.
Core Concepts
> **⚠️ Key Prerequisite**: Data Agent can only analyze databases that have been **imported into Data Agent Data Center**. > > - **Data Center**: Data Agent's data center, only
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

