MCPInstall

alibabacloud-polardb-ai-assistant

Alibaba Cloud PolarDB Database AI Assistant. For PolarDB MySQL/PostgreSQL cluster management, instance inspection, performance diagnostics, parameter explanation and change assessment, SQL/log analysis, backup, security audit, HA/DR, event analysis, and other PolarDB O&M operations. Use when user questions involve PolarDB, cluster IDs starting with pc-, PolarDB kernel/proxy versions, parameters, primary-standby switchover, IMCI columnar storage, or PolarDB console operations. This Skill is PolarDB-only.

Installs
215
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-polardb-ai-assistant
  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-polardb-ai-assistant 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.

PolarDB Database AI Assistant

This Skill focuses on Alibaba Cloud PolarDB MySQL/PostgreSQL database intelligent O&M. It invokes the Yaochi Agent v2 backend through the get-yao-chi-agent API and the aliyun CLI DAS plugin.

Architecture: Codex Skill -> scripts/call_yaochi_agent.sh -> Aliyun CLI -> DAS Plugin (Signature V3) -> get-yao-chi-agent API -> Yaochi Agent v2 -> PolarDB Skill/MCP/DAS/RAG capabilities

Scope: PolarDB only. Do not use this Skill for non-PolarDB product O&M requests unless the user's request is explicitly about PolarDB integration or comparison.

Supported Capabilities

CapabilityDescription
Instance query and filteringNatural-language filtering for PolarDB clusters by ID, engine, version, status, pay type, zone, architecture, tags, name, creation window, or expiration window
Instance status inspectionRuntime status, node health, version, lock/migration state, endpoint state, pay type, and expiration checks
Cluster resource inspectionCPU, memory, connections, IOPS, storage, Serverless PCU behavior, capacity pressure, and trend analysis
Connection and session inspectionConnection usage, active sessions, idle transaction risk, connection trend, and connection pool suggestions
Proxy performance inspectionProxy CPU, QPS, connection stability, response time, endpoint/routing information, and read/write split signal checks
Backup inspectionBackup policy, backup records, backup task status, log backup/PITR capability, and backup success/failure risk
Security inspectionWhitelist, public exposure risk, SSL/TDE, account security posture, and SQL audit configuration
High availability and disaster recoveryMulti-zone/HA posture, hot standby state, GDN/migration signals, HA switch records, and DR readiness
Log diagnosticsError log and slow log volume, pattern analysis, and operational recommendations
Serverless inspectionPCU min/max configuration, scaling behavior, auto-pause posture, and workload-resource fit
Parameter explanationPolarDB MySQL/PostgreSQL parameter meaning, defaults, risk, best practices, and restart/effective-scope notes
Parameter change assessmentParameter modification log explanation, multi-parameter impact assessment, and change-risk suggestions
IMCI parameter explanationPolarDB MySQL IMCI columnar index parameter explanation and usage guidance
Kernel and proxy version diagnosticsDB kernel/proxy version gap analysis, release-note based risk assessment, high-risk fixed bug checks, and upgrade suggestions
HA switchover and event analysisHA switchover root cause, related performance/log evidence, event impact, and follow-up mitigation
Storage diagnosticsStorage composition, growth trend, abnormal usage, cold data/archive signals, and cleanup or capacity advice
SQL performance diagnosticsSlow SQL, execution plan, lock/blocking, and index optimization diagnostics when supported by backend and permissions

Backend Execution Model

The local Skill does not call PolarDB MCP tools directly. It sends a natural-language query to Yaochi Agent v2. The backend is responsible for:

  1. Matching a PolarDB scenario Skill first when the request is an O&M, inspection, diagnosis, parameter, or event scenario.
  2. Calling PolarDB MCP/OpenAPI tools for real cluster, metric, log, backup, security, or data-plane evidence.
  3. Using DAS intelligent diagnosis for performance, slow SQL, lock, index, and auto-increment ID issues when applicable.
  4. Falling back to PolarDB documentation/RAG only when structured tools cannot answer the question.

When answering users, treat the backend output as the source of truth. Do not invent cluster status, metrics, logs, risk levels, or document links that are not present in the response.

Observability

[MUST] User-Agent template — Every Alibaba Cloud CLI, SDK, or Terraform invocation made by this Skill must use: AlibabaCloud-Agent-Skills/alibabacloud-polardb-ai-assistant/{session-id}

[MUST] Session-id rule — Generate one observability session ID at the start of each Skill execution session, reuse the same value across all Alibaba Cloud CLI, SDK, and Terraform calls in that session, and do not regenerate it for retries or multi-step workflows. The session ID must be a 32-character lowercase hexadecimal string.

export ALIBABACLOUD_AGENT_SKILL_SESSION_ID="${ALIBABACLOUD_AGENT_SKILL_SESSION_ID:-$(openssl rand -hex 16)}"

[MUST] CLI User-Agent — Every aliyun CLI command invocation must include: --user-agent AlibabaCloud-Agent-Skills/alibabacloud-polardb-ai-assistant/${ALIBABACLOUD_AGENT_SKILL_SESSION_ID}

Installation

Pre-check: Aliyun CLI >= 3.3.3 required Run aliyun version to verify >= 3.3.3. If not installed or version too low, download the installer, review it, then run it locally to update, or see references/cli-installation-guide.md for installation instructions. Then [MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation. Then [MUST] run aliyun plugin update to ensure that any existing plugins on your local machine are always up-to-date.

# Install aliyun CLI after reviewing the downloaded installer
curl -fsSL https://aliyuncli.alicdn.com/setup.sh -o /tmp/aliyun-cli-setup.sh
less /tmp/aliyun-cli-setup.sh
bash /tmp/aliyun-cli-setup.sh
aliyun version  # Verify >= 3.3.3

# Enable automatic plugin installation
aliyun configure set --auto-plugin-install true

# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)
aliyun plugin install --names aliyun-cli-das

# Install jq (for JSON response parsing)
# macOS:
brew install jq
# Ubuntu/Debian:
# sudo apt-get install jq

Parameter Confirmation

IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.

ParameterRequired/OptionalDescriptionDefault
queryRequiredNatural language query content (including region, cluster info)-
--session-idOptionalSession ID for multi-turn conversation-
--profileOptionalaliyun CLI profile namedefault

Authentication

Credentials use existing aliyun CLI configuration, no additional AK/SK setup required:

# Recommended: OAuth mode
aliyun configure --mode OAuth

# Or: AK mode
aliyun configure set \
  --mode AK \
  --access-key-id <your-access-key-id> \
  --access-key-secret <your-access-key-secret> \
  --region cn-hangzhou

# Cross-account access: RamRoleArn mode
aliyun configure set \
  --mode RamRoleArn \
  --access-key-id <your-access-key-id> \
  --access-key-secret <your-access-key-secret> \
  --ram-role-arn acs:ram::<account-id>:role/<role-name> \
  --role-session-name yaochi-agent-session \
  --region cn-hangzhou

RAM Policy

See references/ram-policies.md

Core Workflow

All intelligent O&M operations are invoked through scripts/call_yaochi_agent.sh, which wraps aliyun das get-yao-chi-agent (DAS plugin kebab-case command, supports Signature V3) with streaming response parsing.

# Cluster management
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "List PolarDB clusters in Hangzhou region"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show detailed configuration of cluster pc-xxx"

# Performance diagnostics
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Analyze cluster pc-xxx performance in the last hour"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show slow SQL of cluster pc-xxx"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Diagnose lock blocking and index risks for PolarDB PostgreSQL cluster pc-xxx"

# Parameter tuning
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "How to tune innodb_buffer_pool_size for cluster pc-xxx"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Explain loose_polar_log_bin parameter"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Compare parameters between pc-xxx and pc-yyy"

# Primary-standby switchover diagnostics
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Analyze recent primary-standby switchover cause for cluster pc-xxx"

# Connection and session
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "How to troubleshoot high connection count in cluster pc-xxx"

# Backup recovery
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show backup status of cluster pc-xxx"

# Inspection
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Generate a health inspection report for cluster pc-xxx"

# Multi-turn conversation (use session ID from previous response)
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Continue analysis" --session-id "<session-id>"

# Specify profile
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "List clusters" --profile myprofile

# Read from stdin
echo "List clusters" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -

Error Handling

If call_yaochi_agent.sh fails, do not summarize it as only Error: SDKError. Surface the structured error block from stderr to the user, especially:

[YaoChi Agent Error]
ErrorCode: <aliyun error code>
ErrorMessage: <full error description>
AuthAction: <required RAM action, when returned>
RequestId: <request id, when returned>
Suggestion: <specific fix>
Reference: <local skill reference>
Troubleshooting: <Aliyun troubleshooting link>

For permission errors such as Forbidden.RAM, check AuthAction first and guide the user to grant that RAM action or the policies in references/ram-policies.md. For credential, throttling, timeout, or plugin errors, use the Suggestion and references/verification-method.md to give the next concrete fix.

Throttling.UserConcurrentLimit means the account has exceeded the Yaochi Agent concurrent request limit. Current production verification shows at most 2 concurrent sessions per account; wait for an existing request to finish before retrying.

Response Requirements

For diagnosis and inspection questions, keep the answer evidence-driven:

  1. Start with the conclusion and current risk level.
  2. Cite concrete evidence from the backend response, such as metric values, log counts, backup records, version numbers, or returned status fields.
  3. Give at most the highest-impact next actions first. Distinguish immediate actions from follow-up observation.
  4. For missing data or permission failures, explain what could not be verified and surface the structured error or missing-permission guidance.
  5. Do not expose internal tool names, absolute local file paths, hidden system groups, credentials, or raw implementation details unless they are necessary for user remediation.

For high-risk or change-related requests:

  • Parameter changes, restarts, failovers, whitelist changes, backup recovery, and configuration changes require explicit risk explanation and user confirmation.
  • Always state whether a parameter change requires restart or has immediate effect when that evidence is available.
  • Backup and recovery guidance must remind the user to verify recovery point, data consistency, and business impact before action.

Example Questions

ScenarioExample Question
Cluster ManagementList nodes and endpoints of cluster pc-xxx
Instance QueryList PolarDB MySQL 8.0 prepaid clusters in Beijing
Health InspectionGenerate a health inspection report for cluster pc-xxx
Performance DiagnosticsTroubleshoot high CPU usage in cluster pc-xxx
Slow SQL AnalysisShow slow SQL in cluster pc-xxx in the last hour
Parameter TuningWhat does loose_polar_log_bin parameter mean
Parameter ChangeExplain parameter changes of pc-xxx in the last 3 days
Parameter ComparisonCompare parameter differences between pc-xxx and pc-yyy
IMCI ParametersHow to configure IMCI related parameters for cluster pc-xxx
HA SwitchoverAnalyze recent primary-standby switchover cause for cluster pc-xxx
Backup RecoveryWhen was the latest backup of cluster pc-xxx
Storage OptimizationWhat to do if storage usage of cluster pc-xxx grows too fast
Connection TroubleshootingCluster pc-xxx connections are full
Security AuditCheck security configuration of cluster pc-xxx
Version RiskAnalyze DB kernel and proxy version risk for pc-xxx
Event AnalysisAnalyze PolarDB event impact for pc-xxx

Success Verification

See references/verification-method.md

Cleanup

This Skill focuses on query and diagnostics capabilities, does not create any resources, no cleanup required.

The following operations are NOT within the scope of this Skill:

  • Directly create/delete PolarDB clusters
  • Directly change instance specifications or parameters
  • Directly modify whitelist, security, backup, or HA configuration

The Skill may explain these operations, assess risk, and guide the user through the required checks, but it must not claim that a change was executed unless the backend response explicitly confirms it.

API and Command Tables

See references/related-apis.md

Best Practices

  1. PolarDB-only scope: Use this Skill for PolarDB MySQL/PostgreSQL. Do not route non-PolarDB product O&M requests here.
  2. Cluster ID Format: PolarDB cluster IDs typically start with pc-; include the full cluster ID in queries when available.
  3. Region Specification: Explicitly specify region in natural language queries (e.g., "Hangzhou region", "Beijing region") to improve query accuracy. If region is unknown, ask or let the backend infer it from the instance when supported.
  4. Evidence First: For O&M, inspection, and diagnosis answers, rely on backend-returned tool evidence. Do not infer exact metrics, version risk, or backup state without data.
  5. Multi-turn Conversation: Use --session-id for complex diagnostic scenarios to maintain context continuity.
  6. Concurrency Limit: Maximum 2 concurrent sessions per account, avoid initiating multiple parallel calls.
  7. High-risk Operations: For parameter changes, failover, recovery, or security changes, explain risk and require user confirmation before any action path.
  8. Throttling Handling: If encountering Throttling.UserConcurrentLimit error, wait for previous query to complete and retry.
  9. Credential Security: Use aliyun configure to manage credentials, never hardcode AK/SK in scripts.

Reference Links

ReferenceDescription
references/cli-installation-guide.mdAliyun CLI installation and configuration guide
references/related-apis.mdRelated API and CLI command list
references/ram-policies.mdRAM permission policy list
references/verification-method.mdSuccess verification methods
references/acceptance-criteria.mdAcceptance criteria

FAQ

What does the alibabacloud-polardb-ai-assistant skill do?

Alibaba Cloud PolarDB Database AI Assistant. For PolarDB MySQL/PostgreSQL cluster management, instance inspection, performance diagnostics, parameter explanation and change assessment, SQL/log analysis, backup, security audit, HA/DR, event analysis, and other PolarDB O&M operations. Use when user questions involve PolarDB, cluster IDs starting with pc-, PolarDB kernel/proxy versions, parameters, primary-standby switchover, IMCI columnar storage, or PolarDB console operations. This Skill is PolarDB-only.

How do I install alibabacloud-polardb-ai-assistant?

Run npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-polardb-ai-assistant 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-polardb-ai-assistant/ (personal) or .claude/skills/alibabacloud-polardb-ai-assistant/ (project).

Which AI agents can use alibabacloud-polardb-ai-assistant?

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-polardb-ai-assistant 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-polardb-ai-assistant?

It is published by aliyun in aliyun/alibabacloud-aiops-skills. It has 215 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