This document covers the complete setup process for the alibabacloud-rds-copilot skill — from initial installation and credential configuration through plugin installation and end-to-end validation.
alibabacloud-rds-copilot is a Claude Code skill that serves as the AIOps agent for Alibaba Cloud RDS Copilot:
aliyun rdsai chat-messages (RdsAi OpenAPI) to fetch real-time resultsUser natural language → Claude (trigger skill) → Alibaba Cloud CLI → RdsAi OpenAPI (rdsai.aliyuncs.com) → AI response
Key dependencies: Alibaba Cloud CLI + rdsai plugin + valid AK credential + RDS Copilot Professional Edition activated.
| Requirement | Description |
|---|---|
| Claude Code | Installed and able to run npx
|
| Alibaba Cloud AccessKey | AK ID + Secret from the primary account or a RAM user |
| RAM permission | At least rdsai:ChatMessages. To query instances or slow query logs, add RDS read-only permissions (see Appendix). |
| RDS Copilot Professional Edition | Must be activated. Otherwise, calls return No valid order found (see Troubleshooting). |
| Network | Can access GitHub (to download the CLI) and Alibaba Cloud OpenAPI |
Activate RDS Copilot Professional Edition:


npx skills add aliyun/alibabacloud-aiops-skills \
--skill alibabacloud-rds-copilot \
--agent claude-code -g -y --full-depth

| Parameter | Description |
|---|---|
aliyun/alibabacloud-aiops-skills |
Skill source repository (GitHub) |
--skill alibabacloud-rds-copilot |
Install only this skill (the repository contains 202 in total) |
--agent claude-code |
Target agent is Claude Code |
-g |
Global install (installs to ~/.claude/skills/) |
-y |
Non-interactive, auto-confirm |
--full-depth |
Pull the complete skill including references sub-files |
~/.claude/skills/alibabacloud-rds-copilot/
SKILL.md before use.ls ~/.claude/skills/alibabacloud-rds-copilot/
# Expected: SKILL.md references/
ls ~/.claude/skills/alibabacloud-rds-copilot/references/
# Expected: acceptance-criteria.md ram-policies.md related-apis.md verification-method.md

After installation, alibabacloud-rds-copilot appears in the active skills list of your Claude Code session.
The skill requires an AccessKey ID + AccessKey Secret pair to call OpenAPI. Configure them manually.
Use the interactive command directly. The secret stays in the CLI credential store and never enters your command history:
aliyun configure --mode AK --profile rdsai
# Follow the prompts to enter: Access Key Id / Access Key Secret / Default Region Id (enter cn-hangzhou)
The skill explicitly requires: do not use environment variables like
export ALIBABA_CLOUD_ACCESS_KEY_ID=...as the regular configuration path.
command -v aliyun && aliyun version
>= 3.3.3 → skip to Step 4# Query the latest version and linux-amd64 download URL
REL=$(curl -fsSL https://api.github.com/repos/aliyun/aliyun-cli/releases/latest)
VER=$(echo "$REL" | jq -r .tag_name)
URL=$(echo "$REL" | jq -r '.assets[] | select(.name|test("linux.*amd64")) | .browser_download_url' | head -1)
echo "Version: $VER Download: $URL
# Download, extract, and install
curl -fsSL "$URL" -o /tmp/aliyun-cli.tgz
tar xzf /tmp/aliyun-cli.tgz -C /tmp
install -m 0755 /tmp/aliyun /usr/local/bin/aliyun
# Verify
aliyun version # Tested: 3.4.10
For macOS, you can use
brew install aliyun-clior the one-click script:/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)".

aliyun version outputs 3.4.10 (or higher), meeting the skill's requirement of >= 3.3.3.
Continue using the
ID/SECvariables from Step 2.1. You must be in the same shell session. If not, rerun the value extraction command from 2.1 first.
aliyun configure set \
--mode AK \
--profile rdsai \
--region cn-hangzhou \
--access-key-id "$ID" \
--access-key-secret "$SEC"
Parameters:
| Parameter | Description |
|---|---|
--mode AK |
Use AccessKey authentication (not STS/role) |
--profile rdsai |
Profile name. The skill uses this name by default. |
--region cn-hangzhou |
Default region. The skill specifies Hangzhou when no region is given. |
--access-key-id "$ID" |
Use a variable reference to avoid plaintext in the command line |
--access-key-secret "$SEC" |
Same as above. The secret is not echoed. |
aliyun configure set --auto-plugin-install true --profile rdsai
aliyun configure list | sed -E 's/(LTAI[A-Za-z0-9]{0,6})[A-Za-z0-9]+/\1…(masked)/g'
Expected output (focus on the rdsai line):
Profile | Credential | Valid | Region | Language
--------- | ------------ | ------- | ------------- | --------
default | | Invalid | | en
rdsai * | AK:***… | Valid | cn-hangzhou | en
Success criteria: the rdsai line shows Valid, has * (current profile), and Region = cn-hangzhou.
If it shows
Invalidor reportsInvalidAccessKeyId/SignatureDoesNotMatch→ go back to Step 2 and check whether the AK ID/Secret split is correct (especially the pipe character).
# auto-plugin-install was enabled in Step 4.2
aliyun plugin list # View installed plugins
aliyun plugin search rdsai # Search for the rdsai plugin
plugin search rdsai should return aliyun-cli-rdsai (some version, Status: Not installed).

aliyun plugin install --names aliyun-cli-rdsai
# Expected: Plugin aliyun-cli-rdsai 0.7.1 installed successfully!
The
aliyun rdsaicommand has product metadata built into the CLI (API Version 2025-05-07), so you can run basic commands without the dedicated plugin. The dedicated plugin provides enhanced capabilities and is recommended.
aliyun rdsai --help # Should display Product: RdsAi
aliyun rdsai chat-messages --help # Should display "Sends chat messages" and its parameters
If it reports
'plugin' is not a valid command or product→ the CLI version is too old (< 3.3.0). Go back to Step 3 to upgrade.
Once configuration is complete, you can directly make RDS requests to Claude in natural language. The skill will automatically run the commands above. Examples:







Key points:
cn-hangzhou. If you mention another city (e.g., "Beijing"), the skill will use cn-beijing.ConversationId from the previous turn to maintain context.The current local credential is the root AccessKey (the STS-returned ARN contains :root), which has full permissions but carries the highest risk: a leak means the entire Alibaba Cloud account is compromised. Furthermore, this AK exists in two locations: ~/.claude.json (MCP env) and ~/.alibabacloud/ (CLI credential store).
1. Create a dedicated RAM user in the RAM console and generate an AccessKey for it.
2. Grant the least privilege policy:
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": ["rdsai:ChatMessages"],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"rds:DescribeDBInstances",
"rds:DescribeDBInstanceAttribute",
"rds:DescribeDBInstancePerformance",
"rds:DescribeSlowLogRecords",
"rds:DescribeParameters"
],
"Resource": "*"
}
]
}
3. Rerun Step 4 aliyun configure set with the new AK to overwrite the rdsai profile.
4. Rotate AKs regularly.
For the complete policy, see
/root/.claude/skills/alibabacloud-rds-copilot/references/ram-policies.md.
|
Symptom |
Cause / Solution |
|
|
Not installed in Step 3 or not in PATH. Check |
|
|
Upgrade the CLI( |
|
|
CLI < 3.3.0, Upgrade first, then install the plugin. |
|
|
AK is invalid or split incorrectly. Check the |
|
|
RDS Copilot Professional Edition is not activated. See Section 6.5. |
|
|
RAM has not granted |
|
|
Profile not configured. Go back to Step 4. |
|
Call hangs with no response |
Check network connectivity to |
Goodbye Spark Scripts: Fully Automated Table Optimization in AnalyticDB for MySQL
New AliSQL Release: DuckDB, VIDX, Native Flashback, and Transaction Optimization
Alibaba Cloud Native Community - March 13, 2026
Bryan, Zhang - June 17, 2026
ApsaraDB - June 26, 2026
Alibaba Cloud Native Community - April 10, 2026
OpenAnolis - June 24, 2026
ApsaraDB - February 27, 2026
Token Plan
Build more, spend less. One plan, every modality.
Learn More
Alibaba Cloud Model Studio
A one-stop generative AI platform to build intelligent applications that understand your business, based on Qwen model series such as Qwen-Max and other popular models
Learn More
ApsaraDB for OceanBase
A financial-grade distributed relational database that features high stability, high scalability, and high performance.
Learn More
ApsaraDB for Cassandra
A database engine fully compatible with Apache Cassandra with enterprise-level SLA assurance.
Learn MoreMore Posts by ApsaraDB