← Back to Skills Marketplace
sdk-team

Alibabacloud Polardb Ai Assistant

by alibabacloud-skills-team · GitHub ↗ · v0.0.2 · MIT-0
cross-platform ✓ Security Clean
155
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install alibabacloud-polardb-ai-assistant
Description
Alibaba Cloud PolarDB Database AI Assistant. For PolarDB MySQL/PostgreSQL cluster management, performance diagnostics, parameter tuning, slow SQL analysis, b...
README (SKILL.md)

PolarDB Database AI Assistant

This Skill focuses on Alibaba Cloud PolarDB MySQL/PostgreSQL database intelligent O&M, invoking the get-yao-chi-agent API through the aliyun CLI DAS plugin for diagnostics and analysis.

Architecture: Aliyun CLIDAS Plugin (Signature V3)get-yao-chi-agent API → PolarDB Intelligent Diagnostics

Supported Capabilities

Capability Description
PolarDB Primary-Standby Switchover Analysis Failover cause investigation, switchover log analysis, unexpected Failover diagnostics
PolarDB Kernel Parameter Change Assessment Impact assessment before parameter modification, change risk analysis
PolarDB Kernel Parameter Explanation Parameter meaning explanation, configuration suggestions, performance impact analysis
PolarDB Kernel Parameter Explanation (IMCI) IMCI columnar engine related parameter explanation
PolarDB Kernel Version Proxy Diagnostics Proxy layer troubleshooting, version compatibility diagnostics
PolarDB Kernel Version Instance Diagnostics Instance layer version issue diagnostics, upgrade suggestions
Instance Query Filter PolarDB instance search and filtering
Proxy Performance Monitoring Proxy layer performance metrics analysis, connection routing diagnostics
Serverless Configuration Serverless instance parameters and elastic scaling configuration
SQL Optimization Analysis Slow SQL analysis, index suggestions, execution plan interpretation
Expiring Instance Query Subscription instance expiration reminder
Backup Status Check Backup completion, retention policy, recovery point in time
Storage Usage Diagnostics Storage consumption analysis, growth trends, space optimization suggestions
Security Configuration Audit Whitelist, SSL, security policy audit
Instance Status Check Instance health status, running status verification
Log Diagnostics Error log analysis, slow log troubleshooting
Auto-Increment ID Overflow Detection Auto-increment ID exhaustion risk detection, primary key overflow warning
Connection and Session Analysis Connection count monitoring, session issue troubleshooting, connection pool optimization
Cluster Performance Monitoring QPS/TPS/connections/throughput and other core metrics analysis
High Availability and Disaster Recovery HA configuration assessment, disaster recovery architecture diagnostics

Installation

Pre-check: Aliyun CLI >= 3.3.3 required Run aliyun version to verify >= 3.3.3. If not installed or version too low, run curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash 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.

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

[MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution. Run the following commands before any CLI invocation:

aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-polardb-ai-assistant"

[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed. AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.

aliyun configure ai-mode disable
# Install aliyun CLI
curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash
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.

Parameter Required/Optional Description Default
query Required Natural language query content (including region, cluster info) -
--session-id Optional Session ID for multi-turn conversation -
--profile Optional aliyun CLI profile name default

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 \x3Cyour-access-key-id> \
  --access-key-secret \x3Cyour-access-key-secret> \
  --region cn-hangzhou

# Cross-account access: RamRoleArn mode
aliyun configure set \
  --mode RamRoleArn \
  --access-key-id \x3Cyour-access-key-id> \
  --access-key-secret \x3Cyour-access-key-secret> \
  --ram-role-arn acs:ram::\x3Caccount-id>:role/\x3Crole-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"

# 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"

# 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"

# Multi-turn conversation (use session ID from previous response)
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Continue analysis" --session-id "\x3Csession-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 -

Example Questions

Scenario Example Question
Cluster Management List nodes of cluster pc-xxx
Performance Diagnostics How to troubleshoot high CPU usage in cluster pc-xxx
Slow SQL Analysis Show slow SQL in cluster pc-xxx in the last hour
Parameter Tuning What does loose_polar_log_bin parameter mean
IMCI Parameters How to configure IMCI related parameters for cluster pc-xxx
Primary-Standby How to handle high primary-standby delay in cluster pc-xxx
Backup Recovery When was the latest backup of cluster pc-xxx
Storage Optimization What to do if storage usage of cluster pc-xxx grows too fast
Connection Troubleshooting Cluster pc-xxx connections are full
Security Audit Check security configuration of cluster 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:

  • Create/delete PolarDB clusters
  • Change instance specifications
  • Purchase/renew instances

API and Command Tables

See references/related-apis.md

Best Practices

  1. Cluster ID Format: PolarDB cluster IDs typically start with pc-, include the full cluster ID in queries
  2. Region Specification: Explicitly specify region in natural language queries (e.g., "Hangzhou region", "Beijing region") to improve query accuracy
  3. Multi-turn Conversation: Use --session-id for complex diagnostic scenarios to maintain context continuity
  4. Concurrency Limit: Maximum 2 concurrent sessions per account, avoid initiating multiple parallel calls
  5. High-risk Operations: For operations involving parameter changes, primary-standby switchover, always remind users to verify in test environment first
  6. Throttling Handling: If encountering Throttling.UserConcurrentLimit error, wait for previous query to complete and retry
  7. Credential Security: Use aliyun configure to manage credentials, never hardcode AK/SK in scripts

Reference Links

Reference Description
references/cli-installation-guide.md Aliyun CLI installation and configuration guide
references/related-apis.md Related API and CLI command list
references/ram-policies.md RAM permission policy list
references/verification-method.md Success verification methods
references/acceptance-criteria.md Acceptance criteria
Usage Guidance
This skill appears to do what it claims (call Alibaba Cloud DAS YaoChi agent via the aliyun CLI). Before using it: (1) verify you trust the install URL (https://aliyuncli.alicdn.com) before running curl | bash; (2) run the CLI and plugin installs in a controlled environment if you prefer (use package manager or inspect the install script first); (3) grant the skill only a least-privilege RAM profile (read-only / das:GetYaoChiAgent, das:GetDasAgentSSE) — do not use root credentials; (4) be aware the script will use whatever credentials/config are present in your aliyun CLI (environment vars, profiles, or config file); (5) note it toggles CLI AI-mode and auto-plugin-install settings — verify and revert those settings if you do not want persistent changes. If you need higher assurance, inspect the install scripts from Alibaba's CDN before running them and test the skill with a low-privilege RAM account.
Capability Analysis
Type: OpenClaw Skill Name: alibabacloud-polardb-ai-assistant Version: 0.0.2 The skill bundle is a legitimate tool for managing Alibaba Cloud PolarDB instances via the Database Autonomy Service (DAS) AI agent. It utilizes the official Alibaba Cloud CLI (`aliyun`) and a dedicated bash script (`call_yaochi_agent.sh`) to interact with the `GetYaoChiAgent` API. The instructions in `SKILL.md` regarding `ai-mode` and `user-agent` configuration are consistent with official Alibaba Cloud CLI features for AI-driven diagnostics. No evidence of malicious intent, data exfiltration, or unauthorized execution was found; the use of `curl | bash` for CLI installation points to the official Alibaba Cloud CDN (`aliyuncli.alicdn.com`).
Capability Tags
cryptorequires-walletcan-make-purchasesrequires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
Name/description (PolarDB diagnostics) align with the actual behavior: the SKILL.md and script call the DAS GetYaoChiAgent/GetDasAgentSSE APIs via the aliyun CLI and DAS plugin. Required tools (aliyun CLI, DAS plugin, jq) and requested permissions (das:GetYaoChiAgent, das:GetDasAgentSSE) are appropriate for the stated purpose.
Instruction Scope
Runtime instructions stay within the declared purpose (building and sending diagnostic queries to DAS). They explicitly use existing aliyun CLI credentials/config and require user confirmation of parameters before executing. Minor scope items to note: instructions ask the user to enable an 'AI-mode' in the CLI and to set a specific --user-agent for each call; they also recommend running remote install scripts (curl | bash) if the CLI is missing — both are out-of-band actions that affect the user's environment but are explained and required for this skill.
Install Mechanism
The skill is instruction-only (no install spec). The SKILL.md recommends installing aliyun CLI and the DAS plugin using vendor-hosted URLs (aliyuncli.alicdn.com) and running their install script via curl | bash. The download host appears to be the official Alibaba CDN (not a random/personal server), but running a remote install script is higher-risk than a packaged install — reasonable here but user should verify the URL and contents before piping to shell.
Credentials
The skill does not declare or request extra env vars or secrets. It relies on the standard aliyun CLI configuration (config files or environment variables) to authenticate, which is proportional to calling Alibaba Cloud APIs. There are no unrelated credential requests or hidden endpoints in the provided files.
Persistence & Privilege
Skill does not require 'always' presence and is user-invocable. It instructs changing global CLI settings (e.g., enabling auto-plugin-install, enabling AI-mode) which modify user CLI behavior — this is within the tool's scope but is a privileged change to local config that the user should be aware of and reverse (the docs explicitly demand disabling AI-mode at exit).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install alibabacloud-polardb-ai-assistant
  3. After installation, invoke the skill by name or use /alibabacloud-polardb-ai-assistant
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.2
**Summary:** v0.0.2 introduces strict CLI version requirements, mandatory AI-mode settings, and user-agent enforcement for skill execution. - Increased minimum Aliyun CLI requirement to version 3.3.3. - Enforced inclusion of a custom user-agent string in all CLI commands. - Introduced mandatory AI-mode enablement and disablement at appropriate workflow points. - Updated installation and upgrade steps; users must update plugins and use a new CLI setup script. - Expanded installation instructions for improved reliability and compliance.
v0.0.1
Initial release of Alibaba Cloud PolarDB AI Assistant. - Provides intelligent O&M for PolarDB MySQL/PostgreSQL clusters, including diagnostics and analysis using the get-yao-chi-agent API through the aliyun CLI DAS plugin. - Supports a wide range of capabilities: cluster management, performance diagnostics, parameter tuning, slow SQL analysis, backup/recovery, primary-standby switchover analysis, security audit, and more. - Requires Aliyun CLI >= 3.3.1 and DAS plugin; includes clear setup and authentication instructions. - Emphasizes explicit user confirmation for all customizable parameters before any operation. - No resource creation or destructive actions included; focuses on diagnostics and query workflows.
v0.0.1-beta.1
Initial beta release of Alibaba Cloud PolarDB AI Assistant Skill. - Provides intelligent O&M for PolarDB MySQL/PostgreSQL clusters via Aliyun CLI + DAS plugin. - Supports diagnostics, performance analysis, parameter tuning, slow SQL analysis, switchover and security audits, and more. - Requires Aliyun CLI v3.3.1+ and enables plugin for Signature V3 support. - All user-customizable parameters must be confirmed before execution; credentials use standard CLI configuration. - Includes extensive capability list and example workflows.
Metadata
Slug alibabacloud-polardb-ai-assistant
Version 0.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Alibabacloud Polardb Ai Assistant?

Alibaba Cloud PolarDB Database AI Assistant. For PolarDB MySQL/PostgreSQL cluster management, performance diagnostics, parameter tuning, slow SQL analysis, b... It is an AI Agent Skill for Claude Code / OpenClaw, with 155 downloads so far.

How do I install Alibabacloud Polardb Ai Assistant?

Run "/install alibabacloud-polardb-ai-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Alibabacloud Polardb Ai Assistant free?

Yes, Alibabacloud Polardb Ai Assistant is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Alibabacloud Polardb Ai Assistant support?

Alibabacloud Polardb Ai Assistant is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Alibabacloud Polardb Ai Assistant?

It is built and maintained by alibabacloud-skills-team (@sdk-team); the current version is v0.0.2.

💬 Comments