← 返回 Skills 市场
sdk-team

Alibabacloud Data Agent Skill

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ⚠ suspicious
99
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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 Analyti...
使用说明 (SKILL.md)

metadata: author: DataAgent Team version: "1.7.2"

Changelog

  • 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

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

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

Permission Requirements

RAM users need AliyunDMSFullAccess or AliyunDMSDataAgentFullAccess permissions. See 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 databases here can be analyzed
  • DMS: Alibaba Cloud Data Management Service, stores metadata of all databases
  • Relationship: Databases registered in DMS ≠ Databases in Data Center

Usage Flow:

  1. First use ls to check if the target database exists in Data Center
  2. If not found, use dms subcommand to search for database info, then use import subcommand to import it
  3. After successful import, you can use db subcommand for analysis

Analysis Modes

  • ASK_DATA (default): Synchronous execution, sub-second response, suitable for quick Q&A
  • ANALYSIS: Deep analysis, takes 5-40 minutes, requires spawning a sub-agent for async execution or using --async-run parameter

See ANALYSIS_MODE.md for details


Session Reuse

Use db/file to create a session for initial analysis, then use attach --session-id \x3CID> to reuse the session for follow-up questions.

See COMMANDS.md and WORKFLOWS.md for details


Quick Start

# 1. List available databases
python3 scripts/data_agent_cli.py ls

# 2. Query analysis (synchronous response)
python3 scripts/data_agent_cli.py db \
    --dms-instance-id \x3CID> --dms-db-id \x3CID> \
    --instance-name \x3CNAME> --db-name \x3CDB> \
    --tables "employees,departments" -q "Which department has the highest average salary"

# 3. Follow-up question (reuse session)
python3 scripts/data_agent_cli.py attach --session-id \x3CID> -q "Break down by month"

📖 See WORKFLOWS.md and COMMANDS.md for complete workflows, command reference, and best practices


Project Structure

                          # Skill root directory
├── SKILL.md              # This document
├── scripts/              # Source code
│   ├── data_agent/       # SDK module
│   ├── cli/              # CLI module
│   ├── data_agent_cli.py # CLI entry point
│   └── requirements.txt  # Dependencies
├── sessions/             # Session data
└── references/           # Reference documents
安全使用建议
What to consider before installing or enabling this skill: - Source verification: The skill bundle contains many Python files but no homepage or source URL in the registry entry. Ask the publisher for a code repository or official distribution channel and verify signatures or repository provenance before running code. - Credentials and permissions: SKILL.md requires Alibaba Cloud credentials (default credential chain or DATA_AGENT_API_KEY) and a region, but the registry metadata omitted these. If you enable it, avoid granting broad RAM policies with Resource: '*'—instead create a least-privilege RAM role scoped to specific resources and review the minimal actions listed in RAM-POLICIES.md. - Installation: There is no secure install spec even though requirements.txt exists. If you need to install dependencies, do so in an isolated environment (container or VM) and pin package versions from trusted registries. Review requirements.txt manually before installing. - Prompt-injection and notifications: assets/HEARTBEAT.md contains instructions that look like a prompt-injection (requesting 'chain-of-thought' style behavior) and suggests sending messages via external channels (Telegram/WhatsApp). If you deploy, remove or audit that file and disable any automated notification hooks unless explicitly desired and verified. - Network and file I/O risk: The CLI downloads report files from URLs returned by the service. Consider running the skill in a network-restricted environment or with egress controls to prevent unexpected exfiltration. Also review what the skill will read/write (sessions/ directory) to avoid leaking sensitive local data. - Test safely: Run the tool against the provided demo data (internal_data_employees or the included example CSV) in an isolated test account to validate behavior before connecting it to production databases. If you want, I can: - Extract and summarize the exact environment variables and permissions the code reads (DataAgentConfig.from_env usage), - List the entries in requirements.txt and flag risky packages, - Point out the exact files/lines where downloads or external notifications are performed so you can audit them or remove the functionality.
功能分析
Type: OpenClaw Skill Name: alibabacloud-data-agent-skill Version: 0.0.1 The skill bundle is a comprehensive and professionally structured CLI tool and SDK for Alibaba Cloud's Data Agent, designed for natural language-driven database and file analysis. It supports complex workflows including asynchronous background execution (scripts/cli/worker_utils.py), session persistence, and real-time progress streaming via SSE. While it possesses powerful capabilities such as executing platform CLI commands for notifications (scripts/cli/notify.py) and managing local session files, these actions are transparently documented and strictly aligned with the tool's stated purpose. The instructions for automated monitoring (assets/HEARTBEAT.md) serve as a legitimate operational guide for the agent to provide status updates, and no evidence of malicious intent, such as credential theft or unauthorized data exfiltration, was found.
能力评估
Purpose & Capability
The skill's name, description, and many included Python modules match a Data Agent CLI for Alibaba Cloud (coherent). However the registry metadata claims 'Required env vars: none' while SKILL.md and the code clearly require Alibaba Cloud credentials (default credential chain or DATA_AGENT_API_KEY) and region configuration. SKILL.md also says dependencies in requirements.txt must be installed even though there is no install spec. These mismatches (declared requirements ≠ actual requirements) are unexpected and reduce trust.
Instruction Scope
SKILL.md and reference docs instruct the agent to create/attach background sub-agents, poll session state files under sessions/* (status.txt, progress.log), download generated files, and push notifications via external channels. assets/HEARTBEAT.md explicitly tells an agent to execute a 'chain-of-thought' style checklist and to scan sessions/, then use a 'send_message tool or current channel (Telegram/WhatsApp)' — this reads like a prompt-injection instruction and encourages pushing messages to external endpoints. Reading/writing sessions/ and downloading report URLs is expected for this tool, but the 'chain-of-thought' phrasing and external-notification guidance go beyond normal CLI behavior and are concerning.
Install Mechanism
This is labeled as 'instruction-only' with no install spec, but the bundle contains a full Python CLI (many scripts) and a requirements.txt. SKILL.md also states dependencies must be installed. There is no provided secure install step (no verified download host or package install instruction). That mismatch increases risk: code will run but the environment dependency installation is left to the user, which can cause accidental installation of arbitrary packages if done without care.
Credentials
The skill needs Alibaba Cloud credentials (default chain or API_KEY) and a region to function; this is reasonable for a cloud data agent. However the registry metadata omitted those env requirements. The provided RAM policy examples request many DMS permissions and use Resource: '*', granting broad access to DMS and Data Agent actions (Create/Describe sessions, SendChatMessage, FileUploadCallback, etc.). Those permissions are powerful; they are functionally plausible for this tool, but require careful scoping in production. The skill also downloads files from URLs returned by the service (file_manager.download_from_url), which could be abused if untrusted URLs were returned.
Persistence & Privilege
The skill does not set always:true and does not demand platform-wide persistent privileges in the metadata. It writes session state and report files under a local sessions/ directory and spawns background worker processes per its design — behavior consistent with a CLI that supports background tasks. This local persistence is expected, but combined with the other concerns (undeclared credentials and notification instructions) it warrants caution.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-data-agent-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-data-agent-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
alibabacloud-data-agent-skill v0.0.1 initial release: - Enables natural language-driven data analysis on Alibaba Cloud enterprise databases via the Data Agent for Analytics. - Supports database/resource discovery, query/analysis sessions, progress tracking, and result/report retrieval through a unified CLI. - Compatible with Alibaba Cloud default credential chain and API_KEY authentication. - Includes guidance for first-time use, permission requirements, analysis modes, and real-world command examples. - Provides clear project structure and references for advanced workflows and commands.
元数据
Slug alibabacloud-data-agent-skill
版本 0.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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 Analyti... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 99 次。

如何安装 Alibabacloud Data Agent Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-data-agent-skill」即可一键安装,无需额外配置。

Alibabacloud Data Agent Skill 是免费的吗?

是的,Alibabacloud Data Agent Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Data Agent Skill 支持哪些平台?

Alibabacloud Data Agent Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Data Agent Skill?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.1。

💬 留言讨论