MCPInstall

alibabacloud-das-agent

Diagnose and manage Alibaba Cloud databases through natural language. Use when users need to troubleshoot database performance issues (high CPU, slow queries, abnormal connections, lock waits), check instance status, analyze disk space, optimize SQL, run health inspections, or detect security baseline violations. Supports RDS (MySQL/PostgreSQL/SQL Server), PolarDB, MongoDB, Redis (Tair), and Lindorm. Trigger this skill even for casual descriptions like "my database is slow", "can't connect to the database", "help me check this SQL", or "database disk is almost full". Also suitable for consulting Alibaba Cloud-specific database features (e.g., PolarDB Serverless, DAS autonomy capabilities) and comparing product differences (RDS vs PolarDB). Do NOT use this skill for general SQL tutorials, non-Alibaba Cloud databases, or local database administration.

Installs
391
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-das-agent
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads alibabacloud-das-agent automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

DAS Agent Chat

Send natural language questions to the Alibaba Cloud DAS (Database Autonomy Service) Agent and receive diagnostic results.

Pricing and Free Tier

This is a paid service with a free tier for trial usage.

  • Free Tier: When ALIBABA_CLOUD_DAS_AGENT_ID is not set, the script omits the AgentId parameter and the API will use a default Agent ID which comes with a limited free quota for trial purposes.
  • Paid Usage: For production workloads or higher usage volumes, purchase a DAS Agent subscription and set your own ALIBABA_CLOUD_DAS_AGENT_ID to bind your dedicated agent and quota.

Recommendation: Start with the free tier (default Agent ID) to evaluate the service. Once you decide to adopt it for production, purchase a subscription and configure your own Agent ID.

Environment Variables

The script requires Alibaba Cloud credentials resolvable via the default credential chain. The DAS Agent ID is optional — if not provided, the AgentId parameter will be omitted and the API will use a default Agent ID with limited free quota.

# Optional: Set your own Agent ID after purchasing DAS Agent service
export ALIBABA_CLOUD_DAS_AGENT_ID="<agent_id>"               # Obtain from DAS console (optional)

The Alibaba Cloud Credentials SDK automatically resolves credentials from multiple sources (environment variables, configuration files, ECS RAM roles, etc.). Refer to the official credential configuration documentation for setup instructions.

If you have purchased a DAS Agent subscription, create and manage your Agent ID at: https://das.console.aliyun.com/

Troubleshooting

Credential Resolution Failed

If the script exits with a credential-related error, it means the Alibaba Cloud Credentials SDK could not resolve a usable credential from its default provider chain.

Supported credential sources:

  • Environment variables (see official documentation)
  • Local profile files: ~/.aliyun/config.json or ~/.alibabacloud/credentials.ini
  • ECS RAM Role metadata when running on an Alibaba Cloud ECS instance

Common cases:

  • Credential environment variables are empty or missing — configure them according to the official documentation.
  • Errors mentioning ~/.aliyun/config.json or ~/.alibabacloud/credentials.ini The SDK attempted local profile-based credentials, but the files were missing or invalid. Create/fix the default profile if you want to use local profiles.
  • Errors mentioning 100.100.100.200 The SDK attempted ECS metadata. This is expected on ECS, but usually a local-machine misconfiguration elsewhere.

For local development, if you are not using ECS RAM Role credentials, you can explicitly disable ECS metadata lookup:

export ALIBABA_CLOUD_ECS_METADATA_DISABLED=true

This avoids confusing 100.100.100.200 metadata connection errors on non-ECS machines and makes missing-credential failures easier to read.

Invocation

Run from the scripts/ directory of this skill:

cd scripts

# Pipe mode (RECOMMENDED for agents) — clean output: progress to stderr, answer clearly delimited on stdout
uv run call_das_agent.py --question "<user's question>" --pipe

# Default mode (CLI chat UI) — real-time streaming with tool details
uv run call_das_agent.py --question "<user's question>"

# JSON mode — machine-readable JSONL, one JSON object per line on stdout
uv run call_das_agent.py --question "<user's question>" --json

# Multi-turn conversation — reuse the server-assigned session ID to maintain context
uv run call_das_agent.py --question "List my instances" --pipe  # Returns session_id on first line
# Extract session_id (line starting with "SESSION:"), then reuse it:
uv run call_das_agent.py --question "Check the first one" --session "<session_id_from_above>" --pipe

Always use --pipe when invoking as an agent. It routes all progress/tool-call noise to stderr and writes only the DAS answer to stdout, wrapped in clear delimiters — making the real response impossible to miss.

Prefer --json when you need to parse the response programmatically. For JSON event types and output mode details, see references/api-reference.md.

Behavioral Notes

DAS Agent internally orchestrates multiple API calls and tool invocations to answer a single question. This has important implications:

  1. Long-running tasks: Complex diagnostics (multi-instance inspection, comprehensive health checks, batch SQL analysis) can take several minutes up to 30 minutes, because DAS Agent sequentially calls monitoring APIs, runs diagnostics, and synthesizes results. Inform the user before starting and provide periodic progress updates.

  2. Instance enrollment: The target database instance must be enrolled under the DAS Agent. If you see error code -1810006, it means the agent is not associated with any instance — guide the user to the DAS console settings to associate instances.

  3. Include instance ID in questions: DAS Agent resolves instances by ID (e.g., rm-bp1xxx, pc-2zeyyy). Always include the specific instance ID in the question for accurate results. If the user hasn't provided one, ask them or first query the instance list.

  4. Parallel execution: When diagnosing multiple instances, launch multiple script processes in parallel — each invocation is independent and stateless (unless sharing a session ID).

  5. Multi-turn conversations — always reuse the session ID when questions are related: If the user's questions are sequential or contextually connected (follow-up diagnostics, drill-down analysis, referencing a previous result, comparing findings), you must pass --session <session_id> on every subsequent call. Starting a new session mid-conversation forces the DAS Agent to re-run all prior context from scratch, wastes time, and produces lower-quality answers.

    Decision rule: Default to reusing the session ID. Only start a new session when the user explicitly switches to a completely unrelated topic or asks to "start over".

    The session ID is server-assigned and returned as the very first line of every --pipe invocation:

    SESSION: <uuid>
    

    Extract it immediately after each call and carry it forward. In --json mode it appears as {"type": "session", "session_id": "..."} on the first line.

    Examples of when reuse is mandatory:

    • "List my instances" → "Check CPU on the first one" → "Why is it high?"
    • "Run a health check on rm-bp1xxx" → "Show me the top slow queries"
    • "What locks are held?" → "Kill that session"

    The DAS Agent retains the full conversation history server-side, so follow-up questions can be short and natural — no need to repeat instance IDs or prior context.

Output

For output mode comparison and format details, see references/api-reference.md.

After running the script, relay the complete stdout to the user verbatim. Do not summarize, paraphrase, or omit any part of the script's stdout. The DAS Agent's actual diagnostic answer is embedded in the output — the user must see it in full.

For detailed API signature and SSE event documentation, see references/api-reference.md.

FAQ

What does the alibabacloud-das-agent skill do?

Diagnose and manage Alibaba Cloud databases through natural language. Use when users need to troubleshoot database performance issues (high CPU, slow queries, abnormal connections, lock waits), check instance status, analyze disk space, optimize SQL, run health inspections, or detect security baseline violations. Supports RDS (MySQL/PostgreSQL/SQL Server), PolarDB, MongoDB, Redis (Tair), and Lindorm. Trigger this skill even for casual descriptions like "my database is slow", "can't connect to the database", "help me check this SQL", or "database disk is almost full". Also suitable for consulting Alibaba Cloud-specific database features (e.g., PolarDB Serverless, DAS autonomy capabilities) and comparing product differences (RDS vs PolarDB). Do NOT use this skill for general SQL tutorials, non-Alibaba Cloud databases, or local database administration.

How do I install alibabacloud-das-agent?

Run npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-das-agent in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/alibabacloud-das-agent/ (personal) or .claude/skills/alibabacloud-das-agent/ (project).

Which AI agents can use alibabacloud-das-agent?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is alibabacloud-das-agent safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains alibabacloud-das-agent?

It is published by aliyun in aliyun/alibabacloud-aiops-skills. It has 391 recorded installs.

More from aliyun/alibabacloud-aiops-skills

View all →

alibabacloud-find-skills

aliyun/alibabacloud-aiops-skills

Use this skill when users want to search, discover, browse, or find Alibaba Cloud (阿里云) agent skills. Triggers include: "find a skill for X", "search alicloud skills", "阿里云有什么 skill","阿里云", "搜索阿里云技能", "有没有管理 ECS/RDS/OSS 的 skill", "阿里云 skills 有哪些类目", "帮我找一个 skill", "browse alicloud skills", "list alicloud skill categories", "is there an alicloud skill that can...", "what alicloud skills are available", "XX Skill 的内容是什么", "我想了解阿里云 XX Skill 具体做什么","帮我安装阿里云 Skill","使用阿里云相关的skill", "阿里云 agent skill 市场", "搜一下阿里云的 skill", "建一个数据分析项目有没有相关 skill".

AI & Agents2.2K installs

alibabacloud-dms-skill

aliyun/alibabacloud-aiops-skills

Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".

Data & Databases2.1K installs

alibabacloud-sls-query

aliyun/alibabacloud-aiops-skills

Alibaba Cloud SLS (Simple Log Service) log query & analysis skill. Use this skill to help users write, explain, optimize, execute, or troubleshoot SLS index search, SQL analytics, and SPL scan/pipeline statements through the aliyun CLI. Triggers: "SLS 查询", "SLS 分析", "日志查询", "日志分析", "log query", "analyze sls logs", "aliyun log query".

Data & Databases2K installs

alibabacloud-workbench-cli

aliyun/alibabacloud-aiops-skills

Agent-native CLI for managing ECS instances without public IPs, primarily for single-instance operations. It supports millisecond-level remote command execution, large file transfers up to 1GB, and TCP port forwarding. It offers four authentication modes: AK, RamRoleArn, CredentialsCmd, and CredentialsURI. Use it to run commands, deploy code, view logs, check processes, transfer files, set up port forwarding, or query and filter ECS instance lists.

DevOps & Cloud717 installs

alibabacloud-ecs-diagnose

aliyun/alibabacloud-aiops-skills

Comprehensive Alibaba Cloud ECS instance diagnostics skill. Performs systematic troubleshooting including cloud platform status checks and GuestOS internal diagnostics via Cloud Assistant. Use when users report server connectivity issues, SSH timeout, instance lag, website unavailability, disk full, CPU/memory alerts, system event notifications, or abnormal instance status. Triggers: "ECS", "instance", "server", "cannot connect", "SSH", "timeout", "slow", "disk full", "network", "CPU high", "memory high", "status check", "system event", "diagnose", "troubleshoot", "disk performance", "disk IO slow", "IOPS", "IO latency"

Backend & APIs686 installs

alibabacloud-cli-guidance

aliyun/alibabacloud-aiops-skills

Guide users to manage Alibaba Cloud resources using the Aliyun CLI command-line tool. Covers CLI installation, credential configuration, plugin management, command construction, and error troubleshooting. Use this skill when the user wants to operate Alibaba Cloud services from the terminal — including ECS (云服务器, cloud servers), Function Compute (函数计算, serverless), RDS (云数据库, databases), OSS (对象存储, object storage), SLS (日志服务, log service), VPC (专有网络, networking), ESS (弹性伸缩, auto scaling), and any other Alibaba Cloud product. Also use when the user mentions "aliyun", "阿里云", "阿里云CLI", "命令行", asks about CLI plugin installation, encounters Aliyun CLI errors (InvalidAccessKeyId, SignatureDoesNotMatch, Throttling), or needs help constructing aliyun commands with correct parameter syntax.

585 installs

Popular data & databases skills

View category →

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

OfficialData & Databases462.2K installs

prisma-client-api

prisma/skills

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

OfficialData & Databases393.5K installs

Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.

OfficialData & Databases392.3K installs

prisma-cli

prisma/skills

Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.

OfficialData & Databases390.8K installs

prisma-postgres

prisma/skills

Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.

OfficialData & Databases384.4K installs

Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.

OfficialData & Databases378.9K installs