alibabacloud-rds-copilot

SkillDatabases & data

Uses the Alibaba Cloud RDS Copilot API to help users with RDS-related intelligent Q&A, SQL optimization, instance operations, and troubleshooting. You can directly call the uv run ./scripts/call_rds_ai.py script to get real-time results.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the alibabacloud-rds-copilot skill

What this skill tells your AI

The instructions your AI receives, as published by aliyun/alibabacloud-rds-openapi-mcp-server in skill/alibabacloud-rds-copilot/SKILL.md and read by ahel’s review.

Skill 概览

本 Skill 用于在对话中充当 阿里云 RDS Copilot 的智能代理:

  • 理解用户的自然语言需求(中文或英文),识别是否与 RDS Copilot 相关;
  • 直接调用内置脚本 scripts/call_rds_ai.py 实时查询 RDS Copilot 并获取结果;
  • 当获取到结果或用户粘贴错误信息时,进一步解释、诊断并给出后续建议

工作模式:

  • 使用 scripts/call_rds_ai.py 脚本直接获取 RDS Copilot 的实时响应

标准使用流程

  1. 确认任务类型与参数

    • 判断用户意图:SQL 编写/优化、SQL 诊断、实例参数调优、故障排查、性能分析、查询实例列表等。
    • 收集必要参数(如未指定则使用默认值):
      • --region:地域 ID(默认 cn-hangzhou)
      • --language:语言(默认 zh-CN)
      • --timezone:时区(默认 Asia/Shanghai)
      • --custom-agent-id:专属 Agent ID(可选)
      • --conversation-id:会话 ID,用于多轮对话(可选)
  2. 构造查询并调用脚本

    - 示例:
    ```bash
    # 基础查询
    uv run ./scripts/call_rds_ai.py "查询杭州地域的 RDS MySQL 实例列表"
    
    # 指定地域
    uv run  ./scripts/call_rds_ai.py "优化这条SQL" --region cn-beijing
    
    # 多轮对话
    uv run ./scripts/call_rds_ai.py "继续分析" --conversation-id "<上次返回的会话ID>"
    
  3. 解析结果并后续处理

    • 将 RDS Copilot 的响应用自然语言解释给用户;
    • 如返回包含 SQL 或操作步骤,评估风险并提醒:
      • 避免在生产环境直接执行高风险语句(如大表 DELETE / UPDATE / 结构变更);
      • 建议在测试环境验证或加上备份/条件限制。
    • 如需继续对话,记录 conversation_id 用于下一轮查询。

工具脚本使用说明

命令行参数

参数说明默认值
query查询内容(必需),使用 - 从标准输入读取-
--region / --region-id阿里云地域 IDcn-hangzhou
--language / --lang语言zh-CN
--timezone / --tz时区Asia/Shanghai
--custom-agent-id专属 Agent ID
--conversation-id / --conv-id会话 ID(多轮对话)
--endpointAPI 端点rdsai.aliyuncs.com
--no-stream禁用流式输出False(默认启用流式)

输出格式

脚本会将查询信息输出到 stderr,将 RDS Copilot 的回答输出到 stdout,便于分离日志和结果:

[查询] 查询杭州地域实例列表
[地域] cn-hangzhou | [语言] zh-CN
============================================================
[RDS Copilot 回答]
<实际回答内容>

[会话ID] conv-xxxx-xxxx-xxxx

Signals

GitHub stars
55
Forks
20
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
alibabacloud-rds-copilot
Source
github.com/aliyun/alibabacloud-rds-openapi-mcp-server