- Skill ID
- aliyun/alibabacloud-aiops-skills/alibabacloud-rds-copilot
- Publisher
- aliyun
- Repository
- alibabacloud-aiops-skills
- Installs
- 0
- Files
- 5
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
aliyun/alibabacloud-aiops-skills/alibabacloud-rds-copilotInstalls these files- SKILL.md
- references/acceptance-criteria.md
- references/ram-policies.md
- references/related-apis.md
- references/verification-method.md
What this skill tells the agent
Alibaba Cloud RDS Copilot Intelligent Operations Assistant
This skill serves as an intelligent agent for Alibaba Cloud RDS Copilot in conversations, helping users with RDS-related intelligent Q&A, SQL optimization, instance operations, and troubleshooting.
Scenario Description
Architecture: Alibaba Cloud CLI + RdsAi OpenAPI
Main features:
- Understand user's natural language requests (Chinese or English), identify if related to RDS Copilot
- Directly call Alibaba Cloud CLI to execute
aliyun rdsai chat-messagescommand for real-time RDS Copilot queries - When receiving results or user-pasted error messages, further explain, diagnose, and provide recommendations
Agent Execution Contract
Before calling RDS Copilot, the agent must make the local environment ready by itself whenever command execution is available. Do not ask the user to install CLI or plugins first if the agent can install or upgrade them directly. If install or upgrade needs network access, sudo, or tool approval, request that approval with the concrete command and continue after approval.
Hard gate: Do not execute aliyun rdsai chat-messages until all readiness checks pass:
- Alibaba Cloud CLI exists and
aliyun versionis >=3.3.3. - Plugin auto-install is enabled and the
rdsaiproduct plugin/command is available. - Alibaba Cloud CLI credentials are configured and the selected profile is valid.
If any gate fails:
- Missing or old CLI: install or upgrade Alibaba Cloud CLI, then re-run
aliyun version. - Missing
rdsaiplugin: enable plugin auto-install and install or trigger installation ofrdsai, then re-check the command. - Missing/invalid credentials: stop before the RDS Copilot API call and guide the user to configure credentials. If the user asks the agent to configure them, request only the required fields, then configure through
aliyun configure; never ask the user to paste secrets into environment variables.
Default region: If the user does not explicitly provide a region, always use cn-hangzhou. Natural language "Hangzhou" maps to cn-hangzhou. Keep this default in both --inputs RegionId=cn-hangzhou and any credential setup guidance unless the user specifies another region.
Installation
Agent preflight: Alibaba Cloud CLI must be installed or installed by the agent This skill uses Alibaba Cloud CLI to call RdsAi OpenAPI. The agent must first check whether the CLI is present and usable. If the CLI is missing and command execution is available, install it before asking the user to take manual action.
Pre-check: Aliyun CLI >= 3.3.3 required
Runcommand -v aliyunandaliyun versionto verify >= 3.3.3. If not installed or version is too low, install or update it before proceeding. CLI versions below 3.3.0 do not support thealiyun plugincommand; upgrade the CLI first instead of running plugin commands repeatedly.
Pre-check: Aliyun CLI plugin update required
[MUST] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation. [MUST] verify therdsaiplugin capability withaliyun plugin list,aliyun plugin search rdsai, oraliyun rdsai --help. [MUST] ifrdsaiis not installed, runaliyun plugin install --names rdsaiand re-check. [MUST] runaliyun plugin update --name rdsaiwhen the plugin is already installed; if the CLI only supportsaliyun plugin update, use that and continue.
[MUST] CLI User-Agent — Every aliyun rdsai chat-messages invocation must include a per-command --user-agent value in this format: AlibabaCloud-Agent-Skills/alibabacloud-rds-copilot/{session-id}. See the Observability section for session-id generation rules. The auxiliary aliyun rdsai get-chat-model command, when used, follows the same User-Agent rule. Do not pass --user-agent to system commands such as aliyun configure, aliyun plugin, aliyun version, or install/upgrade commands.
macOS Installation
# Option 1: Install via Homebrew (recommended)
brew install aliyun-cli
# Option 2: Install via PKG package
curl -O https://aliyuncli.alicdn.com/aliyun-cli-latest.pkg
sudo installer -pkg aliyun-cli-latest.pkg -target /
# Option 3: Install via one-click script
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"Linux Installation
# Install via one-click script
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"
# Or download TGZ package for manual installation
curl https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz -o aliyun-cli.tgz
tar xzvf aliyun-cli.tgz
sudo mv aliyun /usr/local/bin/Verify Installation
command -v aliyun
aliyun versionCredential Configuration
Option 1: Interactive Configuration (Recommended)
aliyun configure --mode AK --profile rdsaiFollow the prompts to enter:
- Access Key Id: Your AccessKey ID
- Access Key Secret: Your AccessKey Secret
- Default Region Id: cn-hangzhou unless the user specifies another region
Before asking the user for secrets, explain that the recommended interactive command keeps the secret inside Alibaba Cloud CLI's credential store. Do not print or store the secret in chat history longer than needed.
Option 2: Non-interactive Configuration
aliyun configure set \
--profile rdsai \
--mode AK \
--access-key-id <yourAccessKeyID> \
--access-key-secret <yourAccessKeySecret> \
--region cn-hangzhouCommand Format
Basic Command Structure
aliyun rdsai chat-messages \
--query '<query content>' \
--inputs RegionId=cn-hangzhou Language=zh-CN Timezone=Asia/Shanghai [CustomAgentId=<custom agent ID>] [EnableThinking=<true|false>] [ThinkEffort=<default|high|low>] [ModelId=<model ID>] \
--event-mode separate \
--endpoint rdsai.aliyuncs.com \
--user-agent 'AlibabaCloud-Agent-Skills/alibabacloud-rds-copilot/{session-id}' \
[--conversation-id '<conversation ID>']Parameter Description
IMPORTANT: Parameter Confirmation — Before executing any command, Determine user intent: SQL writing/optimization, SQL diagnosis, instance parameter tuning, troubleshooting, performance analysis, query instance list, etc. Collect necessary parameters (use default values if not specified).
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
--query | Required | User query content | - |
--inputs RegionId= | Optional | Alibaba Cloud region ID | cn-hangzhou |
--inputs Language= | Optional | Language | zh-CN |
--inputs Timezone= | Optional | Timezone | Asia/Shanghai |
--inputs CustomAgentId= | Optional | Custom Agent ID | None |
--inputs EnableThinking= | Optional | Deep thinking mode switch: true (enabled) or false (disabled) | None |
--inputs ThinkEffort= | Optional | Thinking depth: default (auto), high (deeper reasoning), low (faster responses); supported values are model-specific, see ThinkingLevels in the get-chat-model response | None |
--inputs ModelId= | Optional | Model ID for the response model; when explicitly set, [MUST] verify it with the auxiliary aliyun rdsai get-chat-model command before calling chat-messages — never rely on a memorized or hardcoded model list | None |
--event-mode | Optional | Event mode | separate |
--endpoint | Required | API endpoint | rdsai.aliyuncs.com |
--conversation-id | Optional | Conversation ID for multi-turn dialogue | None |
--region | Optional | Region for API call | Credential default region |
--profile | Optional | Specify credential profile name | Default profile |
--user-agent | Required for business API commands | Custom User-Agent | AlibabaCloud-Agent-Skills/alibabacloud-rds-copilot/{session-id} |
RAM Permissions
More from aliyun
Use this skill in a project
Open any RiverX project, search the Skills panel for aliyun/alibabacloud-aiops-skills/alibabacloud-rds-copilot, and install it in one click.
