Xpersona
A

Alibabacloud Data Agent Skill

CLAWHUB · Unverified

Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analyti...

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-data-agent-skill
  1. Install using `clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-data-agent-skill` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/sdk-team/alibabacloud-data-agent-skill before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-data-agent-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

66,948 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
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+ featur

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-data-agent-skill",
  "version": "1.8.5",
  "publishedAt": 1780279453664
}

references/ANALYSIS_MODE.md

# ANALYSIS Mode Sub-Agent Specification

ANALYSIS mode tasks are long-running (5-40 minutes), **you must spawn a sub-agent to execute in background** to avoid blocking the main conversation flow.

---

## Main Agent Behavior

1. Inform user that deep analysis has started, provide Session ID
2. Return immediately, continue responding to other user questions (non-blocking)

---

## Sub-Agent Behavior

1. Execute command in background, periodically poll `status.txt` (every 30-60 seconds)
2. Push progress updates to main agent/user at key checkpoints
3. Return report or guide user to console when task completes

---

## Key Checkpoints for Sub-Agent to Report

| Checkpoint | Trigger Condition | Report Content | Required Action |
|------|----------|----------|----------|
| 🚀 Task Started | After command execution | Session ID, estimated duration | No action needed |
| 📋 Execution Plan Ready | `status.txt` = `waiting_input` | Show analysis plan/SQL | **Must wait for user confirmation, then `attach -q 'confirm execution'`** |
| 📊 Phase Conclusion | New content in `progress.log` | Phase analysis summary | No action needed |
| ✅ Task Completed | `status.txt` = `completed` | Report link or file path | Guide user to view report |
| ❌ Task Failed | `status.txt` = `failed` | Error message | Prompt user to retry |

> ⚠️ **`waiting_input` is a mandatory wait point**: Worker has exited, sub-agent must present execution plan to user, execute `attach -q 'confirm execution'` after receiving confirmation, otherwise task will be permanently paused.

---

## Guide User to View Report After Task Completion

```bash
# Download report to local
python3 scripts/data_agent_cli.py reports --session-id <SESSION_ID>

# Or guide user to Data Agent console (recommended)
# https://agent.dms.aliyun.com/<region>/session/<SESSION_ID>
```

references/COMMANDS.md

# Subcommand Reference

This document contains detailed descriptions and complete parameter lists for all subcommands.

---

## ls Subcommand — Discover Data Resources

Before initiating analysis, use `ls` to understand what databases and tables are available.

> **⚠️ Important**: The `ls` command only shows databases that have been **imported into Data Agent Data Center**. If you can't find the database you need, it means the database has not been imported from DMS yet.

### List All Databases

```bash
python3 scripts/data_agent_cli.py ls
```

Output is divided into two groups:
- **Database Connections** (ImportType: RDS/DMS) — Real relational databases, can be used with `db` subcommand
- **File Data Sources** (ImportType: FILE) — Uploaded file datasets

Output displays databases in compact format:
```
chinook [mysql]  dbId=abc123  instanceResourceId=rm-xxx  catalogName=chinook
employees [mysql]  dbId=def456  instanceResourceId=rm-yyy  catalogName=employees
```

> **Tip**: `internal_data_employees` is DataAgent's built-in demo database, containing employee, department, and salary test data, suitable for first-time experience.

### Filter by Keyword

```bash
python3 scripts/data_agent_cli.py ls --search internal_data_employees
```

### List Tables for a Specific Database + Generate Usable Command

```bash
python3 scripts/data_agent_cli.py ls --db-id <AgentDbId>
```

Output includes a `db` command template ready to copy and use.

---

## db Subcommand — Database Analysis

> **⚠️ Important**: The `db` subcommand requires the database to **already exist in Data Agent Data Center**.

### Data Source Parameters

| Parameter | Description |
|------|------|
| `--dms-instance-id` | DMS Instance ID (numeric) |
| `--dms-db-id` | DMS Database ID (numeric) |
| `--instance-name` | RDS Instance Name |
| `--db-name` | Database Name |
| `--tables` | Table name list, comma-separated |
| `--engine` | Database engine, default `mysql` |

### Session Parameters

| Parameter | Description |
|------|------|
| `--session-mode` | `ASK_DATA` (default) / `ANALYSIS` / `INSIGHT` |
| `--output` | `summary` (default) / `detail` / `raw` |
| `--enable-search` | Enable search capability (default `false`) |
| `--workspace-id` | Workspace ID to bind the session to a specific workspace |
| `--custom-agent-id` | Custom Agent ID to use for the analysis session | No |

### Query Methods

| Parameter | Description |
|------|------|
| `-q` / `--query` | Single query (runs preset query if not specified) |

---

## file Subcommand — File Analysis

File analysis uses `ANALYSIS` mode by default.

### Parameters

| Parameter | Description |
|------|------|
| `--session-mode` | `ASK_DATA` / `ANALYSIS` (default) / `INSIGHT` |
| `--output` | `summary` (default) / `detail` / `raw` |
| `--enable-search` | Enable search capability (default `false`) |
| `--workspace-id` | Workspace ID to bind the session to a specific workspace |
| `--custom-agent-id` | Custom Agent ID to use for the analysis sessio

references/RAM-POLICIES.md

# RAM Permission Policies

This Skill requires the following Alibaba Cloud RAM permissions:

## Required Permissions (Recommended)

Use a custom RAM policy with only the actions required by this Skill:

```json
{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dms:ListInstances",
        "dms:ListDatabases",
        "dms:ListTables",
        "dms:ListColumns",
        "dms:GetInstance",
        "dms:GetDatabase",
        "dms:GetTableTopology",
        "dms:GetMetaTableDetailInfo",
        "dms:DescribeInstance",
        "dms:CreateDataAgentSession",
        "dms:DescribeDataAgentSession",
        "dms:ListDataAgentSession",
        "dms:SendChatMessage",
        "dms:GetChatContent",
        "dms:DescribeDataAgentUsage",
        "dms:UpdateDataAgentSession",
        "dms:CreateDataAgentFeedback",
        "dms:DescribeFileUploadSignature",
        "dms:FileUploadCallback",
        "dms:ListFileUpload",
        "dms:DeleteFileUpload",
        "dms:ListTagMetaAsset",
        "dms:InitDataAgentPersonalWorkspace",
        "dms:ListDataCenterDatabase",
        "dms:ListDataCenterTable",
        "dms:AddDataCenterTable"
      ],
      "Resource": "*"
    }
  ]
}
```

## Optional Managed Policies

Managed full-access policies are broader than this Skill requires. Use them only
for temporary testing or accounts that are already governed by separate access
controls:

| Policy | Description |
|----------|------|
| `AliyunDMSDataAgentFullAccess` | Full access to Data Agent |
| `AliyunDMSFullAccess` | Full access to DMS Data Management Service |

## Configuration Instructions

1. Log in to [Alibaba Cloud RAM Console](https://ram.console.aliyun.com/)
2. Create or select a user
3. Add the custom minimal permission policy to the user
4. Create AccessKey for Skill authentication

Sponsored

Ads related to Alibabacloud Data Agent Skill and adjacent AI workflows.