{"id":"1fa7bdf3-98b1-4f19-b1e5-bffcd04286cf","entityType":"agent","slug":"clawhub-sdk-team-alibabacloud-polardbx-ai-assistant","name":"Alibabacloud Polardbx Ai Assistant","canonicalUrl":"https://www.xpersona.co/agent/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant","canonicalPath":"/agent/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant","generatedAt":"2026-10-13T03:22:43.338Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":null},"description":"Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati... Skill: Alibabacloud Polardbx Ai Assistant Owner: sdk-team Summary: Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati... Tags: latest:0.0.2 Version history: v0.0.2 | 2026-04-23T06:50:43.728Z | auto **Changelog for alibabacloud-polardbx-ai-assistant v0.0.2** - Increased minimal aliyun CLI version to 3.3.3 and upd","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 956 downloads reported by the source. Last updated 10/12/2026.","installCommand":"clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-polardbx-ai-assistant","sourceUrl":"https://clawhub.ai/sdk-team/alibabacloud-polardbx-ai-assistant","homepage":"https://clawhub.ai/sdk-team/skills/alibabacloud-polardbx-ai-assistant","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/sdk-team/alibabacloud-polardbx-ai-assistant","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/sdk-team/skills/alibabacloud-polardbx-ai-assistant","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":null},"stars":null,"forks":null,"downloads":956,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"0.0.2","tractionLabel":"956 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T02:13:22.275Z","emptyReason":null},"lastUpdatedAt":"2026-10-12T02:13:22.381Z","lastCrawledAt":"2026-10-12T02:13:22.275Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-13T02:13:22.275Z","lastVerifiedAt":null,"highlights":[{"version":"0.0.2","createdAt":"2026-04-23T06:50:43.728Z","changelog":"**Changelog for alibabacloud-polardbx-ai-assistant v0.0.2** - Increased minimal aliyun CLI version to 3.3.3 and updated installation instructions. - Enforced required use of AI-mode for all CLI operations, including user-agent header and AI-mode lifecycle management (enable before, disable after). - Added explicit instructions to always update CLI plugins with `aliyun plugin update`. - Updated documentation and workflow scripts to reflect stricter user-agent and AI-mode requirements. - General documentation improvements and clarifications in installation and operation steps.","fileCount":9,"zipByteSize":19000},{"version":"0.0.1","createdAt":"2026-04-22T02:15:11.417Z","changelog":"Initial release of Alibaba Cloud PolarDB-X Distributed Database AI Assistant. - Provides intelligent O&M for PolarDB-X clusters via the aliyun CLI DAS plugin (get-yao-chi-agent API). - Supports cluster management, topology inspection, performance diagnostics, SQL optimization, security audits, backup checks, parameter tuning, and more. - Enforces strict credential handling and permission checks—never print or request AK/SK. - All O&M actions routed through scripts/call_yaochi_agent.sh, never using direct polardbx/rds APIs. - Includes detailed installation, configuration, and permission guidance to ensure secure and proper usage.","fileCount":8,"zipByteSize":16554}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-polardbx-ai-assistant","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-13T03:22:43.338Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-polardbx-ai-assistant/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":null},"readme":"Skill: Alibabacloud Polardbx Ai Assistant\n\nOwner: sdk-team\n\nSummary: Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati...\n\nTags: latest:0.0.2\n\nVersion history:\n\nv0.0.2 | 2026-04-23T06:50:43.728Z | auto\n\n**Changelog for alibabacloud-polardbx-ai-assistant v0.0.2**\n\n- Increased minimal aliyun CLI version to 3.3.3 and updated installation instructions.\n- Enforced required use of AI-mode for all CLI operations, including user-agent header and AI-mode lifecycle management (enable before, disable after).\n- Added explicit instructions to always update CLI plugins with `aliyun plugin update`.\n- Updated documentation and workflow scripts to reflect stricter user-agent and AI-mode requirements.\n- General documentation improvements and clarifications in installation and operation steps.\n\nv0.0.1 | 2026-04-22T02:15:11.417Z | auto\n\nInitial release of Alibaba Cloud PolarDB-X Distributed Database AI Assistant.\n\n- Provides intelligent O&M for PolarDB-X clusters via the aliyun CLI DAS plugin (get-yao-chi-agent API).\n- Supports cluster management, topology inspection, performance diagnostics, SQL optimization, security audits, backup checks, parameter tuning, and more.\n- Enforces strict credential handling and permission checks—never print or request AK/SK.\n- All O&M actions routed through scripts/call_yaochi_agent.sh, never using direct polardbx/rds APIs.\n- Includes detailed installation, configuration, and permission guidance to ensure secure and proper usage.\n\nArchive index:\n\nArchive v0.0.2: 9 files, 19000 bytes\n\nFiles: references/acceptance-criteria.md (5945b), references/cli-installation-guide.md (11622b), references/ram-policies.md (1547b), references/related-apis.md (2095b), references/verification-method.md (2385b), scripts/call_yaochi_agent.sh (11074b), skill-card.md (3310b), SKILL.md (13709b), _meta.json (153b)\n\nFile v0.0.2:SKILL.md\n\n---\nname: alibabacloud-polardbx-ai-assistant\ndescription: |\n  Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management,\n  topology inspection, performance diagnostics, SQL optimization, data distribution analysis,\n  elastic scaling diagnostics, connection/session analysis, security audit, backup/restore,\n  parameter tuning, and other O&M operations.\n  Triggers: \"PolarDB-X\", \"distributed database\", \"pxc-\", \"DN/CN nodes\", \"data sharding\",\n  \"PolarDB-X diagnostics\", \"PolarDB-X performance\", \"PolarDB-X slow SQL\", \"YaoChi Agent\",\n  \"PolarDB-X topology\", \"PolarDB-X backup\", \"PolarDB-X security audit\", \"PolarDB-X scaling\"\n---\n\n# PolarDB-X Distributed Database AI Assistant\n\nThis skill provides intelligent O&M capabilities for **Alibaba Cloud PolarDB-X distributed database**, powered by the DAS (Database Autonomy Service) `get-yao-chi-agent` API via the aliyun CLI DAS plugin.\n\n**Architecture**: `Aliyun CLI` -> `DAS Plugin (Signature V3)` -> `get-yao-chi-agent API` -> PolarDB-X Intelligent Diagnostics\n\n### Supported Capabilities\n\n| Capability | Description |\n|------------|-------------|\n| Instance Information | Instance details, cluster configuration, version info |\n| Topology Inspection | CN/DN node distribution, shard topology, data node status |\n| Storage Information | Disk usage, storage capacity, space growth trends |\n| SQL Optimization | Slow SQL analysis, distributed execution plan interpretation, index suggestions, cross-shard query optimization |\n| Cluster Performance Monitoring | QPS/TPS/connections/throughput and other core metrics analysis |\n| Connection & Session Analysis | Connection count monitoring, session troubleshooting, connection pool optimization |\n| Security Audit | Whitelist, SSL, security policy audit |\n| Backup Status Check | Backup completeness, retention policy, point-in-time recovery |\n| Instance Health Check | Instance health status, running state verification |\n| Log Diagnostics | Error log analysis, slow log troubleshooting |\n| Data Distribution Analysis | Shard data skew detection, hotspot shard diagnostics |\n| Elastic Scaling Diagnostics | Scale-out/in status, data migration progress, node load balancing |\n| Parameter Tuning | Kernel parameter interpretation, change impact assessment, configuration recommendations |\n| High Availability & DR | HA configuration assessment, disaster recovery architecture diagnostics, primary-standby status |\n| Expiring Instance Query | Subscription instance expiration reminders, renewal status |\n\n## Installation\n\n> **Pre-check: Aliyun CLI >= 3.3.3 required**\n> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,\n> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update,\n> or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions.\n\n> **Pre-check: Aliyun CLI plugin update required**\n> **[MUST]** run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.\n> **[MUST]** run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date.\n\n> **[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include:\n> `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-polardbx-ai-assistant`\n\n> **[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution.\n> Run the following commands before any CLI invocation:\n> ```bash\n> aliyun configure ai-mode enable\n> aliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills/alibabacloud-polardbx-ai-assistant\"\n> ```\n\n> **[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.\n> AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.\n> ```bash\n> aliyun configure ai-mode disable\n> ```\n\n```bash\n# Install aliyun CLI\ncurl -fsSL https://aliyuncli.alicdn.com/install.sh | bash\naliyun version  # Verify >= 3.3.3\n\n# Enable automatic plugin installation\naliyun configure set --auto-plugin-install true\n\n# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)\naliyun plugin install --names aliyun-cli-das\n\n# Install jq (for JSON response parsing)\n# macOS:\nbrew install jq\n# Ubuntu/Debian:\n# sudo apt-get install jq\n```\n\n## Environment Variables\n\nNo additional environment variables are required. This skill relies entirely on the aliyun CLI's existing credential configuration.\n\n## Authentication\n\n> **Pre-check: Alibaba Cloud Credentials Required**\n>\n> **Security Rules:**\n> - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN)\n> - **NEVER** ask the user to input AK/SK directly in the conversation or command line\n> - **NEVER** use `aliyun configure set` with literal credential values\n> - **ONLY** use `aliyun configure list` to check credential status\n>\n> ```bash\n> aliyun configure list\n> ```\n> Check the output for a valid profile (AK, STS, or OAuth identity).\n>\n> **If no valid profile exists, STOP here.**\n> 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak)\n> 2. Configure credentials **outside of this session** (via `aliyun configure` in terminal or environment variables in shell profile)\n> 3. Return and re-run after `aliyun configure list` shows a valid profile\n\nCredentials are managed through aliyun CLI configuration — **no additional AK/SK setup is needed**:\n\n```bash\n# Recommended: OAuth mode\naliyun configure --mode OAuth\n\n# Alternative: AK mode (configure outside of agent session)\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n\n# Cross-account access: RamRoleArn mode\naliyun configure set \\\n  --mode RamRoleArn \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --ram-role-arn acs:ram::<account-id>:role/<role-name> \\\n  --role-session-name yaochi-agent-session \\\n  --region cn-hangzhou\n```\n\n## RAM Policy\n\nSee [references/ram-policies.md](references/ram-policies.md) for the full list of required permissions.\n\n> **[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process:\n> 1. Read `references/ram-policies.md` to get the full list of permissions required by this SKILL\n> 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions\n> 3. Pause and wait until the user confirms that the required permissions have been granted\n\n## Parameter Confirmation\n\n> **IMPORTANT: Parameter Confirmation** — Before executing any command or API call,\n> ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks,\n> passwords, domain names, resource specifications, etc.) MUST be confirmed with the\n> user. Do NOT assume or use default values without explicit user approval.\n\n| Parameter | Required/Optional | Description | Default Value |\n|-----------|-------------------|-------------|---------------|\n| `query` | Required | Natural language query content (including region, instance info, etc.) | - |\n| `--session-id` | Optional | Session ID for multi-turn conversation context | - |\n| `--profile` | Optional | aliyun CLI profile name | default |\n\n## Core Workflow\n\nAll intelligent O&M operations **MUST** be invoked through `scripts/call_yaochi_agent.sh`, which wraps the `aliyun das get-yao-chi-agent` (DAS plugin kebab-case command, supporting Signature V3) with streaming response parsing.\n\n> **⚠️ CRITICAL RESTRICTION:**\n> - **DO NOT** use direct `aliyun polardbx` or `aliyun rds` CLI commands for diagnostics, topology, or security audits.\n> - **DO NOT** attempt to query instance details using `DescribeDBInstances` or similar APIs directly.\n> - **ONLY** use the DAS plugin command: `aliyun das get-yao-chi-agent` (wrapped by `call_yaochi_agent.sh`).\n> - If the script fails, check permissions via `ram-permission-diagnose` skill, **DO NOT** fallback to other product APIs.\n\n```bash\n# Cluster Management\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show detailed configuration of instance pxc-xxx\"\n\n# Topology Inspection\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show CN/DN node distribution of instance pxc-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show shard topology of instance pxc-xxx\"\n\n# Performance Diagnostics\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze performance of instance pxc-xxx in the last hour\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show slow SQL of instance pxc-xxx\"\n\n# SQL Optimization\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Optimize execution plan of this SQL on instance pxc-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Which cross-shard queries on instance pxc-xxx need optimization\"\n\n# Data Distribution\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Check whether data distribution of instance pxc-xxx is even\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Are there any hotspot shards on instance pxc-xxx\"\n\n# Elastic Scaling\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show scale-out status of instance pxc-xxx\"\n\n# Parameter Tuning\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to tune CONN_POOL_MAX_POOL_SIZE parameter on instance pxc-xxx\"\n\n# Connection & Session\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to troubleshoot high connection count on instance pxc-xxx\"\n\n# Backup & Restore\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show backup status of instance pxc-xxx\"\n\n# Security Audit\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Check security configuration of instance pxc-xxx\"\n\n# High Availability & DR\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show HA configuration of instance pxc-xxx\"\n\n# Multi-turn Conversation (use session ID returned from previous call)\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Continue analysis\" --session-id \"<session-id>\"\n\n# Specify profile\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\n\n# Read from stdin\necho \"List instances\" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -\n```\n\n### Typical Query Examples\n\n| Scenario | Example Query |\n|----------|---------------|\n| Cluster Management | Show node list of instance pxc-xxx |\n| Topology | How many CN and DN nodes does instance pxc-xxx have |\n| Performance Diagnostics | How to troubleshoot high CPU usage on instance pxc-xxx |\n| Slow SQL Analysis | Show slow SQL of instance pxc-xxx in the last hour |\n| SQL Optimization | Why is this SELECT statement slow on instance pxc-xxx |\n| Data Distribution | Is there data skew in shards of instance pxc-xxx |\n| Elastic Scaling | What is the scale-out progress of instance pxc-xxx |\n| Parameter Tuning | How to optimize connection pool parameters on instance pxc-xxx |\n| Backup & Restore | When was the latest backup of instance pxc-xxx |\n| Storage Optimization | What to do about rapid storage growth on instance pxc-xxx |\n| Connection Troubleshooting | Instance pxc-xxx connection count is maxed out |\n| Security Audit | Check security configuration of instance pxc-xxx |\n| High Availability | Is the DR architecture of instance pxc-xxx reasonable |\n| Expiration Reminder | Which PolarDB-X instances are about to expire |\n\n## Success Verification\n\nSee [references/verification-method.md](references/verification-method.md) for detailed verification steps.\n\n## Cleanup\n\nThis skill focuses on **query and diagnostics** capabilities only. It does not create any resources, so no cleanup is needed.\n\nThe following operations are **out of scope** for this skill:\n- Creating/deleting PolarDB-X instances\n- Changing instance specifications\n- Purchasing/renewing instances\n\n## Command Tables\n\nSee [references/related-apis.md](references/related-apis.md) for the full list of APIs and CLI commands.\n\n## Best Practices\n\n1. **Instance ID Format**: PolarDB-X instance IDs start with `pxc-`. Always include the full instance ID in queries.\n2. **Region Specification**: Explicitly specify the region in natural language queries (e.g., \"Hangzhou region\", \"Beijing region\") to improve query accuracy.\n3. **Multi-turn Conversation**: Use `--session-id` to maintain context continuity in complex diagnostic scenarios.\n4. **Concurrency Limit**: Maximum 2 concurrent sessions per account. Avoid launching multiple parallel calls.\n5. **Distributed Characteristics**: When troubleshooting issues, distinguish between CN (Compute Node) and DN (Data Node) layers.\n6. **Throttling Handling**: If you encounter a `Throttling.UserConcurrentLimit` error, wait for the previous query to complete before retrying.\n7. **Credential Security**: Use `aliyun configure` to manage credentials. Never hardcode AK/SK in scripts.\n\n## Reference Links\n\n| Reference | Description |\n|-----------|-------------|\n| [references/cli-installation-guide.md](references/cli-installation-guide.md) | Aliyun CLI installation and configuration guide |\n| [references/related-apis.md](references/related-apis.md) | Related APIs and CLI command list |\n| [references/ram-policies.md](references/ram-policies.md) | RAM permission policy list |\n| [references/verification-method.md](references/verification-method.md) | Success verification methods |\n| [references/acceptance-criteria.md](references/acceptance-criteria.md) | Acceptance criteria |\n\nFile v0.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn74p5w8ywv6prh40g0s82gmqh83nw54\",\n  \"slug\": \"alibabacloud-polardbx-ai-assistant\",\n  \"version\": \"0.0.2\",\n  \"publishedAt\": 1776927043728\n}\n\nFile v0.0.2:references/acceptance-criteria.md\n\n# Acceptance Criteria: alibabacloud-polardbx-ai-assistant\n\n**Scenario**: PolarDB-X Distributed Database AI Assistant\n**Purpose**: Skill testing acceptance criteria\n\n---\n\n# Correct CLI Command Patterns\n\n## 1. Product - DAS (Database Autonomy Service)\n\n#### CORRECT\n```bash\n# Plugin kebab-case command (Signature V3, recommended)\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: product name wrong case\naliyun DAS get-yao-chi-agent --query \"List instances\"\n\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 2. Command - get-yao-chi-agent\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"Hello\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: API name typo\naliyun das get-yao-chi --query \"Hello\"\n\n# Error: using non-existent API\naliyun das yaochi-agent --query \"Hello\"\n```\n\n## 3. Parameters\n\n### get-yao-chi-agent Parameters\n\n#### CORRECT\n```bash\n# Required parameter --query\naliyun das get-yao-chi-agent --query \"List PolarDB-X instances in Hangzhou region\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --source\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --session-id (multi-turn)\naliyun das get-yao-chi-agent --query \"Continue analysis\" --session-id \"sess-xxx\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing required parameter --query\naliyun das get-yao-chi-agent --source \"polardbx-console\"\n\n# Error: using non-existent parameter\naliyun das get-yao-chi-agent --query \"List instances\" --region-id \"cn-hangzhou\"\n```\n\n## 4. Endpoint\n\n#### CORRECT\n```bash\n# get-yao-chi-agent always uses cn-shanghai endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: wrong endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-beijing.aliyuncs.com\n\n# Error: missing endpoint, may use wrong default\naliyun das get-yao-chi-agent --query \"List instances\"\n```\n\n## 5. --user-agent Flag - Required\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 6. Timeout Settings\n\n#### CORRECT\n```bash\n# SSE streaming API needs longer read timeout (180s)\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --read-timeout 180 --connect-timeout 30 --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: read timeout too short, streaming API may timeout\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --read-timeout 10 --user-agent AlibabaCloud-Agent-Skills\n```\n\n---\n\n# Correct Bash Script Patterns\n\n## 1. Script Invocation\n\n#### CORRECT\n```bash\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze performance of instance pxc-xxx\" --session-id \"sess-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\necho \"List instances\" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -\n```\n\n#### INCORRECT\n```bash\n# Error: using Python script (does not exist)\nuv run $SKILL_DIR/scripts/call_yaochi_agent.py \"List instances\"\n\n# Error: using Python interpreter on bash script\npython $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\"\n\n# Error: using old parameter format\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --role-arn acs:ram::xxx:role/xxx\n```\n\n## 2. SSE Response Parsing\n\n#### CORRECT - script auto-parses SSE response\n```\n# Input: SSE format response body\ndata: {\"Content\":\"PolarDB-X instance list:\",\"SessionId\":\"sess-abc123\",\"ReasoningContent\":\"\"}\ndata: {\"Content\":\"\\n1. pxc-xxx (cn-hangzhou)\",\"SessionId\":\"sess-abc123\",\"ReasoningContent\":\"\"}\ndata: [DONE]\n\n# Output: concatenated Content\nPolarDB-X instance list:\n1. pxc-xxx (cn-hangzhou)\n```\n\n## 3. Credential Management\n\n#### CORRECT\n```bash\n# Use existing aliyun CLI configuration\naliyun configure --mode OAuth\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\"\n\n# Use specific profile\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\n```\n\n#### INCORRECT\n```bash\n# Error: hardcoding AK/SK in script\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\"LTAI5tXXXXXXXX\"\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\"8dXXXXXXXXXXXX\"\n\n# Error: using custom credential variables\nexport YAOCHI_ACCESS_KEY_ID=\"xxx\"\nexport YAOCHI_ACCESS_KEY_SECRET=\"xxx\"\n```\n\n---\n\n# Authentication Patterns\n\n#### CORRECT - use aliyun CLI configuration\n```bash\n# OAuth mode (recommended)\naliyun configure --mode OAuth\n\n# AK mode\naliyun configure set --mode AK --access-key-id <AK> --access-key-secret <SK> --region cn-hangzhou\n\n# Cross-account RamRoleArn mode\naliyun configure set --mode RamRoleArn --access-key-id <AK> --access-key-secret <SK> --ram-role-arn <ARN> --role-session-name yaochi-session --region cn-hangzhou\n```\n\n#### INCORRECT - managing credentials in script\n```python\n# Error: using Python SDK for credentials\nfrom alibabacloud_das20200116.client import Client as DAS20200116Client\n\n# Error: parsing credentials from .env file\n# Error: parsing credentials from ~/.alibabacloud/credentials\n```\n\nFile v0.0.2:references/cli-installation-guide.md\n\n# Aliyun CLI Installation & Configuration Guide\n\nComplete guide for installing and configuring Aliyun CLI.\n\n> **Aliyun CLI 3.3.3+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.3 or later for full plugin ecosystem coverage.\n\n## Installation\n\n### macOS\n\n**Using Homebrew (Recommended)**\n```bash\nbrew install aliyun-cli\n# Upgrade to latest\nbrew upgrade aliyun-cli\n\n# Verify version (>= 3.3.3)\naliyun version\n```\n\n**Using Binary**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz\n\n# Extract\ntar -xzf aliyun-cli-macosx-latest-amd64.tgz\n\n# Move to PATH\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n### Linux\n\n**Debian/Ubuntu**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**CentOS/RHEL**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**ARM64 Architecture**\n```bash\n# Download ARM64 version\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-arm64.tgz\nsudo mv aliyun /usr/local/bin/\n```\n\n### Windows\n\n**Using Binary**\n1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\n2. Extract the ZIP file\n3. Add the directory to your PATH environment variable\n4. Open new Command Prompt or PowerShell\n5. Verify: `aliyun version`\n\n**Using PowerShell**\n```powershell\n# Download\nInvoke-WebRequest -Uri \"https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\" -OutFile \"aliyun-cli.zip\"\n\n# Extract\nExpand-Archive -Path aliyun-cli.zip -DestinationPath C:\\aliyun-cli\n\n# Add to PATH (requires admin privileges)\n$env:Path += \";C:\\aliyun-cli\"\n[Environment]::SetEnvironmentVariable(\"Path\", $env:Path, [System.EnvironmentVariableTarget]::Machine)\n\n# Verify\naliyun version\n```\n\n## Configuration\n\n### Quick Start\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n```\n\nAll `aliyun configure` commands support non-interactive flags, which is the recommended approach —\nit works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.\n\n**Where to Get Access Keys**\n\n1. Log in to Aliyun Console: https://ram.console.aliyun.com/\n2. Navigate to: AccessKey Management\n3. Create a new AccessKey pair\n4. Save the secret immediately — it's only shown once\n\n### Configuration Modes\n\nAliyun CLI supports 6 authentication modes. All examples below use non-interactive flags.\n\n#### 1. AK Mode (Access Key)\n\nMost common mode for personal accounts and scripts.\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --region cn-hangzhou\n```\n\nConfiguration is stored in `~/.aliyun/config.json`:\n\n```json\n{\n  \"current\": \"default\",\n  \"profiles\": [\n    {\n      \"name\": \"default\",\n      \"mode\": \"AK\",\n      \"access_key_id\": \"LTAI5tXXXXXXXX\",\n      \"access_key_secret\": \"8dXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"region_id\": \"cn-hangzhou\",\n      \"output_format\": \"json\",\n      \"language\": \"en\"\n    }\n  ]\n}\n```\n\n#### 2. StsToken Mode (Temporary Credentials)\n\nFor short-lived access (tokens expire in 1-12 hours).\n\n```bash\naliyun configure set \\\n  --mode StsToken \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --sts-token v1.0:XXXXXXXXXXXXXXXX \\\n  --region cn-hangzhou\n```\n\nUse cases: CI/CD pipelines, temporary access for external contractors, cross-account access.\n\n#### 3. RamRoleArn Mode (Assume RAM Role)\n\nAssume a RAM role for elevated or cross-account access.\n\n```bash\naliyun configure set \\\n  --mode RamRoleArn \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --ram-role-arn acs:ram::123456789012:role/AdminRole \\\n  --role-session-name my-session \\\n  --region cn-hangzhou\n```\n\nUse cases: cross-account resource access, temporary elevated privileges, role-based access control.\n\n#### 4. EcsRamRole Mode (ECS Instance RAM Role)\n\nUse the RAM role attached to an ECS instance — no credentials needed.\n\n```bash\naliyun configure set \\\n  --mode EcsRamRole \\\n  --ram-role-name MyEcsRole \\\n  --region cn-hangzhou\n```\n\nRequirements: must be running on an ECS instance with a RAM role attached.\n\nUse cases: scripts and automation running on ECS instances.\n\n#### 5. RsaKeyPair Mode (RSA Key Pair)\n\nUse RSA key pair for authentication (generate key pair in Aliyun Console first).\n\n```bash\naliyun configure set \\\n  --mode RsaKeyPair \\\n  --private-key /path/to/private-key.pem \\\n  --key-pair-name my-key-pair \\\n  --region cn-hangzhou\n```\n\n#### 6. RamRoleArnWithEcs Mode (ECS + RAM Role)\n\nCombine ECS instance role with RAM role assumption for cross-account access from ECS.\n\n```bash\naliyun configure set \\\n  --mode RamRoleArnWithEcs \\\n  --ram-role-name MyEcsRole \\\n  --ram-role-arn acs:ram::123456789012:role/TargetRole \\\n  --role-session-name my-session \\\n  --region cn-hangzhou\n```\n\n### Environment Variables\n\n**Highest priority** - overrides config file\n\n**Access Key Mode**\n```bash\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n```\n\n**STS Token Mode**\n```bash\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret\nexport ALIBABA_CLOUD_SECURITY_TOKEN=your_sts_token\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n```\n\n**ECS RAM Role Mode**\n```bash\nexport ALIBABA_CLOUD_ECS_METADATA=role_name\n```\n\n**Use Case**:\n- CI/CD pipelines\n- Docker containers\n- Temporary credential override\n\n### Managing Multiple Profiles\n\n**Create Named Profiles**\n\n```bash\naliyun configure set --profile projectA \\\n  --mode AK \\\n  --access-key-id LTAI5tAAAAAAAA \\\n  --access-key-secret 8dAAAAAAAAAAAAAAAAAAAAAAAA \\\n  --region cn-hangzhou\n\naliyun configure set --profile projectB \\\n  --mode AK \\\n  --access-key-id LTAI5tBBBBBBBB \\\n  --access-key-secret 8dBBBBBBBBBBBBBBBBBBBBBBBB \\\n  --region cn-shanghai\n```\n\n**Use Specific Profile**\n\n```bash\naliyun ecs describe-instances --profile projectA\n\nexport ALIBABA_CLOUD_PROFILE=projectA\naliyun ecs describe-instances   # Uses projectA\n```\n\n**List and Switch Profiles**\n\n```bash\naliyun configure list                      # List all profiles\naliyun configure set --current projectA    # Switch default profile\n```\n\n### Credential Priority\n\nCredentials are loaded in this order (first found wins):\n\n1. **Command-line flag**: `--profile <name>`\n2. **Environment variable**: `ALIBABA_CLOUD_PROFILE`\n3. **Environment credentials**: `ALIBABA_CLOUD_ACCESS_KEY_ID`, etc.\n4. **Configuration file**: `~/.aliyun/config.json` (current profile)\n5. **ECS Instance RAM Role**: If running on ECS with attached role\n\n## Verification\n\n### Test Authentication\n\n```bash\n# Basic test - list regions\naliyun ecs describe-regions\n\n# Expected output: JSON array of regions\n```\n\n**If successful**, you'll see:\n```json\n{\n  \"Regions\": {\n    \"Region\": [\n      {\n        \"RegionId\": \"cn-hangzhou\",\n        \"RegionEndpoint\": \"ecs.cn-hangzhou.aliyuncs.com\",\n        \"LocalName\": \"华东 1（杭州）\"\n      },\n      ...\n    ]\n  },\n  \"RequestId\": \"...\"\n}\n```\n\n**If failed**, you'll see error messages:\n- `InvalidAccessKeyId.NotFound` - Wrong Access Key ID\n- `SignatureDoesNotMatch` - Wrong Access Key Secret\n- `InvalidSecurityToken.Expired` - STS token expired (for StsToken mode)\n- `Forbidden.RAM` - Insufficient permissions\n\n### Debug Configuration\n\n```bash\n# Show current configuration\naliyun configure get\n\n# Test with debug logging\naliyun ecs describe-regions --log-level=debug\n\n# Check credential provider\naliyun configure get mode\n```\n\n## Security Best Practices\n\n### 1. Use RAM Users (Not Root Account)\n\n❌ **Don't**: Use Aliyun root account credentials\n✅ **Do**: Create RAM users with specific permissions\n\n```bash\n# Create RAM user in console\n# Attach only necessary policies\n# Use RAM user's access keys\n```\n\n### 2. Principle of Least Privilege\n\nGrant only the minimum permissions needed:\n\n```bash\n# Example: Read-only ECS access\n# Attach policy: AliyunECSReadOnlyAccess\n```\n\n### 3. Rotate Access Keys Regularly\n\n```bash\n# Create new access key in RAM Console, then update configuration\naliyun configure set --access-key-id NEW_KEY --access-key-secret NEW_SECRET\n# Delete old access key from console\n```\n\n### 4. Use STS Tokens for Temporary Access\n\n```bash\naliyun configure set --mode StsToken \\\n  --access-key-id XXXX --access-key-secret XXXX \\\n  --sts-token XXXX --region cn-hangzhou\n```\n\n### 5. Use ECS RAM Roles When Possible\n\n```bash\naliyun configure set --mode EcsRamRole --ram-role-name MyRole --region cn-hangzhou\n```\n\n### 6. Never Commit Credentials\n\n```bash\n# Add to .gitignore\necho \"~/.aliyun/config.json\" >> .gitignore\n\n# Use environment variables in CI/CD instead\n```\n\n### 7. Secure Config File\n\n```bash\n# Restrict permissions\nchmod 600 ~/.aliyun/config.json\n```\n\n## Troubleshooting\n\n### Issue: Command Not Found\n\n```bash\n# Check installation\nwhich aliyun\n\n# Check PATH\necho $PATH\n\n# Reinstall or add to PATH\n```\n\n### Issue: Authentication Failed\n\n```bash\n# Verify configuration\naliyun configure get\n\n# Test with debug\naliyun ecs describe-regions --log-level=debug\n\n# Check credentials in console\n# Verify access key is active\n```\n\n### Issue: Permission Denied\n\n```bash\n# Error: Forbidden.RAM\n\n# Check RAM user permissions\n# Attach necessary policies in RAM console\n# Example: AliyunECSFullAccess for ECS operations\n```\n\n### Issue: STS Token Expired\n\n```bash\n# Error: InvalidSecurityToken.Expired\n\n# Reconfigure with new token\naliyun configure set --mode StsToken \\\n  --access-key-id XXXX --access-key-secret XXXX \\\n  --sts-token NEW_TOKEN --region cn-hangzhou\n```\n\n### Issue: Wrong Region\n\n```bash\n# Some resources may not exist in the specified region\n\n# Check available regions\naliyun ecs describe-regions\n\n# Update default region\naliyun configure set region cn-shanghai\n```\n\n## Advanced Configuration\n\n### Custom Endpoint\n\n```bash\n# Use custom or private endpoint\nexport ALIBABA_CLOUD_ECS_ENDPOINT=ecs-vpc.cn-hangzhou.aliyuncs.com\n```\n\n### Proxy Settings\n\n```bash\n# HTTP proxy\nexport HTTP_PROXY=http://proxy.example.com:8080\nexport HTTPS_PROXY=http://proxy.example.com:8080\n\n# No proxy for specific domains\nexport NO_PROXY=localhost,127.0.0.1,.aliyuncs.com\n```\n\n### Timeout Settings\n\n```bash\n# Connection timeout (default: 10s)\nexport ALIBABA_CLOUD_CONNECT_TIMEOUT=30\n\n# Read timeout (default: 10s)\nexport ALIBABA_CLOUD_READ_TIMEOUT=30\n```\n\n## Next Steps\n\nAfter installation and configuration:\n\n1. **Install plugins** for services you need (v3.3.3+ supports all published product plugins):\n   ```bash\n   aliyun plugin install --names ecs vpc rds\n\n   # List all available plugins\n   aliyun plugin list-remote\n   ```\n\n2. **Explore commands**:\n   ```bash\n   aliyun ecs --help\n   aliyun fc --help\n   ```\n\n3. **Read documentation**:\n   - [Command Syntax Guide](./command-syntax.md)\n   - [Global Flags Reference](./global-flags.md)\n   - [Common Scenarios](./common-scenarios.md)\n\n## References\n\n- Official Documentation: https://help.aliyun.com/zh/cli/\n- RAM Console: https://ram.console.aliyun.com/\n- Access Key Management: https://ram.console.aliyun.com/manage/ak\n- Plugin Repository: https://github.com/aliyun/aliyun-cli\n\nFile v0.0.2:references/ram-policies.md\n\n# RAM Policies\n\n## Required Permissions\n\nUsing PolarDB-X AI Assistant (YaoChi Agent) requires the following RAM permissions:\n\n### Core Permission - DAS GetYaoChiAgent\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Recommended - DAS Read-Only\n\nFor full diagnostic capabilities, grant the following specific DAS read-only permissions:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\",\n        \"das:DescribeInstanceDasPro\",\n        \"das:GetInstanceInspections\",\n        \"das:GetQueryOptimizeExecErrorStats\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Cross-Account Access - STS AssumeRole\n\nFor cross-account access, configure RAM role trust policy on the target account:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"sts:AssumeRole\",\n      \"Principal\": {\n        \"RAM\": [\n          \"acs:ram::<caller-account-id>:root\"\n        ]\n      }\n    }\n  ]\n}\n```\n\n## Recommended System Policies\n\n| Policy Name | Description | Use Case |\n|-------------|-------------|----------|\n| `AliyunDASReadOnlyAccess` | DAS read-only | Daily diagnostic queries |\n\n\n## Permission Mapping\n\n| Operation | Required RAM Action |\n|-----------|---------------------|\n| YaoChi Agent diagnostics | `das:GetYaoChiAgent` |\n| DAS Agent SSE | `das:GetDasAgentSSE` |\n\nFile v0.0.2:references/related-apis.md\n\n# Related APIs\n\n## DAS (Database Autonomy Service) - Core API\n\n| Product | CLI Command | API Action | Description |\n|---------|------------|------------|-------------|\n| DAS | `aliyun das get-yao-chi-agent --query \"<query>\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills` | GetYaoChiAgent | YaoChi Agent (SSE streaming response) |\n| DAS | `aliyun das get-das-agent-sse --Query \"<query>\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills` | GetDasAgentSSE | DAS Agent SSE API |\n\n## GetYaoChiAgent API Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `--query` | String | Yes | Natural language query content |\n| `--source` | String | No | Call source identifier, set to `polardbx-console` |\n| `--session-id` | String | No | Session ID for multi-turn conversation context |\n\n## GetDasAgentSSE API Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `--Query` | String | Yes | Natural language query content |\n| `--AgentId` | String | No | Agent ID |\n| `--InstanceId` | String | No | Database instance ID |\n| `--SessionId` | String | No | Session ID for multi-turn conversation context |\n\n## SSE Response Format\n\nGetYaoChiAgent returns SSE (Server-Sent Events) streaming response:\n\n```\ndata: {\"Content\":\"Response text chunk 1\",\"SessionId\":\"sess-xxx\",\"ReasoningContent\":\"\"}\ndata: {\"Content\":\"Response text chunk 2\",\"SessionId\":\"sess-xxx\",\"ReasoningContent\":\"\"}\n...\ndata: [DONE]\n```\n\n### Response Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `Content` | String | Current chunk text content |\n| `SessionId` | String | Session ID for multi-turn conversation |\n| `ReasoningContent` | String | Reasoning content (for debug) |\n\n## API Endpoint\n\n| Environment | Endpoint |\n|-------------|----------|\n| Production | `das.cn-shanghai.aliyuncs.com` |\n\n> Note: GetYaoChiAgent API uses `das.cn-shanghai.aliyuncs.com` endpoint uniformly, regardless of the PolarDB-X instance's region.\n\nFile v0.0.2:references/verification-method.md\n\n# Verification Method\n\n## Steps to Verify Skill Execution\n\n### Step 1: Verify aliyun CLI installation and configuration\n\n```bash\n# Check CLI version\naliyun version\n# Expected: 3.3.3 or higher\n\n# Check auth configuration\naliyun configure get\n# Expected: shows current profile configuration\n\n# Test basic connectivity\naliyun das describe-instance-das-pro --instanceId \"pxc-test\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills/alibabacloud-polardbx-ai-assistant 2>&1\n# Expected: JSON response (API error for non-existent instance is OK, connection error is NOT)\n```\n\n### Step 2: Verify jq installation\n\n```bash\necho '{\"Content\":\"test\"}' | jq -r '.Content'\n# Expected: test\n```\n\n### Step 3: Verify call_yaochi_agent.sh script\n\n```bash\n# Verify script is runnable\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh --help\n# Expected: shows help information\n\n# Verify no-argument error prompt\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh\n# Expected: shows usage prompt and exits\n```\n\n### Step 4: Verify actual invocation (requires valid credentials)\n\n```bash\n# Simple query test\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Hello\"\n# Expected: YaoChi Agent response content\n\n# With debug mode\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Hello\" --debug\n# Expected: response content + debug info on stderr\n```\n\n### Step 5: Verify multi-turn conversation\n\n```bash\n# First query - note the session ID in stderr output\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\n# Expected: instance list, stderr shows [SessionID] sess-xxx\n\n# Second query - use session ID from previous call\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Continue analyzing the first instance\" --session-id \"sess-xxx\"\n# Expected: contextual analysis based on previous conversation\n```\n\n## Common Errors and Solutions\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `command not found: aliyun` | aliyun CLI not installed | See cli-installation-guide.md |\n| `command not found: jq` | jq not installed | `brew install jq` or `apt install jq` |\n| `InvalidAccessKeyId` | Invalid AK/SK | Check `aliyun configure get` configuration |\n| `Throttling.UserConcurrentLimit` | Concurrent session limit reached | Wait for previous query to finish, then retry |\n| `Forbidden.RAM` | Insufficient permissions | See ram-policies.md for required permissions |\n\nFile v0.0.2:skill-card.md\n\n## Description: <br>\nAlibaba Cloud PolarDB-X Distributed Database AI Assistant for cluster management, topology inspection, performance diagnostics, SQL optimization, data distribution analysis, scaling diagnostics, session analysis, security audit, backup and restore checks, parameter tuning, and other operations tasks. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sdk-team](https://clawhub.ai/user/sdk-team) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers, DBAs, and cloud operations teams use this skill to run Alibaba Cloud PolarDB-X diagnostics through the Aliyun CLI DAS YaoChi Agent workflow. It helps inspect cluster topology, performance, slow SQL, sessions, backups, security posture, data distribution, and related operational status. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill uses an Aliyun CLI profile that may have access to sensitive Alibaba Cloud resources. <br>\nMitigation: Use a profile intended for PolarDB-X diagnostics, preferably OAuth, STS, or a least-privilege RAM role. <br>\nRisk: Access keys, tokens, or production database details could be exposed if pasted into chat or logged commands. <br>\nMitigation: Do not paste real access keys into chat or shell commands, and avoid sending secrets or highly sensitive production details in diagnostic prompts. <br>\nRisk: The setup flow references remote installer and plugin update commands. <br>\nMitigation: Review any remote installer before executing it and update or install CLI plugins from trusted sources. <br>\nRisk: AI-mode is enabled for skill execution and could remain active after the diagnostic task. <br>\nMitigation: Disable AI-mode at every exit point after completing, failing, or cancelling the workflow. <br>\nRisk: The underlying service can throttle concurrent diagnostic sessions. <br>\nMitigation: Avoid more than two concurrent sessions per account and wait or retry when throttling is reported. <br>\n\n\n## Reference(s): <br>\n- [Aliyun CLI Installation & Configuration Guide](references/cli-installation-guide.md) <br>\n- [Related APIs](references/related-apis.md) <br>\n- [RAM Policies](references/ram-policies.md) <br>\n- [Verification Method](references/verification-method.md) <br>\n- [Acceptance Criteria](references/acceptance-criteria.md) <br>\n- [Aliyun CLI Official Documentation](https://help.aliyun.com/zh/cli/) <br>\n- [Aliyun CLI Plugin Repository](https://github.com/aliyun/aliyun-cli) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell command examples and streamed text responses from Alibaba Cloud DAS/YaoChi.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Uses an existing Aliyun CLI credential profile and may return a session ID for multi-turn diagnostics.] <br>\n\n## Skill Version(s): <br>\n0.0.2 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v0.0.1: 8 files, 16554 bytes\n\nFiles: references/acceptance-criteria.md (5945b), references/cli-installation-guide.md (11622b), references/ram-policies.md (1617b), references/related-apis.md (2092b), references/verification-method.md (2347b), scripts/call_yaochi_agent.sh (9709b), SKILL.md (12491b), _meta.json (153b)\n\nFile v0.0.1:SKILL.md\n\n---\nname: alibabacloud-polardbx-ai-assistant\ndescription: |\n  Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management,\n  topology inspection, performance diagnostics, SQL optimization, data distribution analysis,\n  elastic scaling diagnostics, connection/session analysis, security audit, backup/restore,\n  parameter tuning, and other O&M operations.\n  Triggers: \"PolarDB-X\", \"distributed database\", \"pxc-\", \"DN/CN nodes\", \"data sharding\",\n  \"PolarDB-X diagnostics\", \"PolarDB-X performance\", \"PolarDB-X slow SQL\", \"YaoChi Agent\",\n  \"PolarDB-X topology\", \"PolarDB-X backup\", \"PolarDB-X security audit\", \"PolarDB-X scaling\"\n---\n\n# PolarDB-X Distributed Database AI Assistant\n\nThis skill provides intelligent O&M capabilities for **Alibaba Cloud PolarDB-X distributed database**, powered by the DAS (Database Autonomy Service) `get-yao-chi-agent` API via the aliyun CLI DAS plugin.\n\n**Architecture**: `Aliyun CLI` -> `DAS Plugin (Signature V3)` -> `get-yao-chi-agent API` -> PolarDB-X Intelligent Diagnostics\n\n### Supported Capabilities\n\n| Capability | Description |\n|------------|-------------|\n| Instance Information | Instance details, cluster configuration, version info |\n| Topology Inspection | CN/DN node distribution, shard topology, data node status |\n| Storage Information | Disk usage, storage capacity, space growth trends |\n| SQL Optimization | Slow SQL analysis, distributed execution plan interpretation, index suggestions, cross-shard query optimization |\n| Cluster Performance Monitoring | QPS/TPS/connections/throughput and other core metrics analysis |\n| Connection & Session Analysis | Connection count monitoring, session troubleshooting, connection pool optimization |\n| Security Audit | Whitelist, SSL, security policy audit |\n| Backup Status Check | Backup completeness, retention policy, point-in-time recovery |\n| Instance Health Check | Instance health status, running state verification |\n| Log Diagnostics | Error log analysis, slow log troubleshooting |\n| Data Distribution Analysis | Shard data skew detection, hotspot shard diagnostics |\n| Elastic Scaling Diagnostics | Scale-out/in status, data migration progress, node load balancing |\n| Parameter Tuning | Kernel parameter interpretation, change impact assessment, configuration recommendations |\n| High Availability & DR | HA configuration assessment, disaster recovery architecture diagnostics, primary-standby status |\n| Expiring Instance Query | Subscription instance expiration reminders, renewal status |\n\n## Installation\n\n> **Pre-check: Aliyun CLI >= 3.3.1 required**\n> Run `aliyun version` to verify >= 3.3.1. If not installed or version too low,\n> see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions.\n> Then **[MUST]** run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.\n\n```bash\n# Install aliyun CLI\ncurl -fsSL https://aliyuncli.alicdn.com/install.sh | bash\naliyun version  # Verify >= 3.3.1\n\n# Enable automatic plugin installation\naliyun configure set --auto-plugin-install true\n\n# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)\naliyun plugin install --names aliyun-cli-das\n\n# Install jq (for JSON response parsing)\n# macOS:\nbrew install jq\n# Ubuntu/Debian:\n# sudo apt-get install jq\n```\n\n## Environment Variables\n\nNo additional environment variables are required. This skill relies entirely on the aliyun CLI's existing credential configuration.\n\n## Authentication\n\n> **Pre-check: Alibaba Cloud Credentials Required**\n>\n> **Security Rules:**\n> - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN)\n> - **NEVER** ask the user to input AK/SK directly in the conversation or command line\n> - **NEVER** use `aliyun configure set` with literal credential values\n> - **ONLY** use `aliyun configure list` to check credential status\n>\n> ```bash\n> aliyun configure list\n> ```\n> Check the output for a valid profile (AK, STS, or OAuth identity).\n>\n> **If no valid profile exists, STOP here.**\n> 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak)\n> 2. Configure credentials **outside of this session** (via `aliyun configure` in terminal or environment variables in shell profile)\n> 3. Return and re-run after `aliyun configure list` shows a valid profile\n\nCredentials are managed through aliyun CLI configuration — **no additional AK/SK setup is needed**:\n\n```bash\n# Recommended: OAuth mode\naliyun configure --mode OAuth\n\n# Alternative: AK mode (configure outside of agent session)\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n\n# Cross-account access: RamRoleArn mode\naliyun configure set \\\n  --mode RamRoleArn \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --ram-role-arn acs:ram::<account-id>:role/<role-name> \\\n  --role-session-name yaochi-agent-session \\\n  --region cn-hangzhou\n```\n\n## RAM Policy\n\nSee [references/ram-policies.md](references/ram-policies.md) for the full list of required permissions.\n\n> **[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process:\n> 1. Read `references/ram-policies.md` to get the full list of permissions required by this SKILL\n> 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions\n> 3. Pause and wait until the user confirms that the required permissions have been granted\n\n## Parameter Confirmation\n\n> **IMPORTANT: Parameter Confirmation** — Before executing any command or API call,\n> ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks,\n> passwords, domain names, resource specifications, etc.) MUST be confirmed with the\n> user. Do NOT assume or use default values without explicit user approval.\n\n| Parameter | Required/Optional | Description | Default Value |\n|-----------|-------------------|-------------|---------------|\n| `query` | Required | Natural language query content (including region, instance info, etc.) | - |\n| `--session-id` | Optional | Session ID for multi-turn conversation context | - |\n| `--profile` | Optional | aliyun CLI profile name | default |\n\n## Core Workflow\n\nAll intelligent O&M operations **MUST** be invoked through `scripts/call_yaochi_agent.sh`, which wraps the `aliyun das get-yao-chi-agent` (DAS plugin kebab-case command, supporting Signature V3) with streaming response parsing.\n\n> **⚠️ CRITICAL RESTRICTION:**\n> - **DO NOT** use direct `aliyun polardbx` or `aliyun rds` CLI commands for diagnostics, topology, or security audits.\n> - **DO NOT** attempt to query instance details using `DescribeDBInstances` or similar APIs directly.\n> - **ONLY** use the DAS plugin command: `aliyun das GetYaoChiAgent` (wrapped by `call_yaochi_agent.sh`).\n> - If the script fails, check permissions via `ram-permission-diagnose` skill, **DO NOT** fallback to other product APIs.\n\n```bash\n# Cluster Management\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show detailed configuration of instance pxc-xxx\"\n\n# Topology Inspection\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show CN/DN node distribution of instance pxc-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show shard topology of instance pxc-xxx\"\n\n# Performance Diagnostics\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze performance of instance pxc-xxx in the last hour\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show slow SQL of instance pxc-xxx\"\n\n# SQL Optimization\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Optimize execution plan of this SQL on instance pxc-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Which cross-shard queries on instance pxc-xxx need optimization\"\n\n# Data Distribution\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Check whether data distribution of instance pxc-xxx is even\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Are there any hotspot shards on instance pxc-xxx\"\n\n# Elastic Scaling\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show scale-out status of instance pxc-xxx\"\n\n# Parameter Tuning\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to tune CONN_POOL_MAX_POOL_SIZE parameter on instance pxc-xxx\"\n\n# Connection & Session\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to troubleshoot high connection count on instance pxc-xxx\"\n\n# Backup & Restore\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show backup status of instance pxc-xxx\"\n\n# Security Audit\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Check security configuration of instance pxc-xxx\"\n\n# High Availability & DR\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show HA configuration of instance pxc-xxx\"\n\n# Multi-turn Conversation (use session ID returned from previous call)\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Continue analysis\" --session-id \"<session-id>\"\n\n# Specify profile\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\n\n# Read from stdin\necho \"List instances\" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -\n```\n\n### Typical Query Examples\n\n| Scenario | Example Query |\n|----------|---------------|\n| Cluster Management | Show node list of instance pxc-xxx |\n| Topology | How many CN and DN nodes does instance pxc-xxx have |\n| Performance Diagnostics | How to troubleshoot high CPU usage on instance pxc-xxx |\n| Slow SQL Analysis | Show slow SQL of instance pxc-xxx in the last hour |\n| SQL Optimization | Why is this SELECT statement slow on instance pxc-xxx |\n| Data Distribution | Is there data skew in shards of instance pxc-xxx |\n| Elastic Scaling | What is the scale-out progress of instance pxc-xxx |\n| Parameter Tuning | How to optimize connection pool parameters on instance pxc-xxx |\n| Backup & Restore | When was the latest backup of instance pxc-xxx |\n| Storage Optimization | What to do about rapid storage growth on instance pxc-xxx |\n| Connection Troubleshooting | Instance pxc-xxx connection count is maxed out |\n| Security Audit | Check security configuration of instance pxc-xxx |\n| High Availability | Is the DR architecture of instance pxc-xxx reasonable |\n| Expiration Reminder | Which PolarDB-X instances are about to expire |\n\n## Success Verification\n\nSee [references/verification-method.md](references/verification-method.md) for detailed verification steps.\n\n## Cleanup\n\nThis skill focuses on **query and diagnostics** capabilities only. It does not create any resources, so no cleanup is needed.\n\nThe following operations are **out of scope** for this skill:\n- Creating/deleting PolarDB-X instances\n- Changing instance specifications\n- Purchasing/renewing instances\n\n## Command Tables\n\nSee [references/related-apis.md](references/related-apis.md) for the full list of APIs and CLI commands.\n\n## Best Practices\n\n1. **Instance ID Format**: PolarDB-X instance IDs start with `pxc-`. Always include the full instance ID in queries.\n2. **Region Specification**: Explicitly specify the region in natural language queries (e.g., \"Hangzhou region\", \"Beijing region\") to improve query accuracy.\n3. **Multi-turn Conversation**: Use `--session-id` to maintain context continuity in complex diagnostic scenarios.\n4. **Concurrency Limit**: Maximum 2 concurrent sessions per account. Avoid launching multiple parallel calls.\n5. **Distributed Characteristics**: When troubleshooting issues, distinguish between CN (Compute Node) and DN (Data Node) layers.\n6. **Throttling Handling**: If you encounter a `Throttling.UserConcurrentLimit` error, wait for the previous query to complete before retrying.\n7. **Credential Security**: Use `aliyun configure` to manage credentials. Never hardcode AK/SK in scripts.\n\n## Reference Links\n\n| Reference | Description |\n|-----------|-------------|\n| [references/cli-installation-guide.md](references/cli-installation-guide.md) | Aliyun CLI installation and configuration guide |\n| [references/related-apis.md](references/related-apis.md) | Related APIs and CLI command list |\n| [references/ram-policies.md](references/ram-policies.md) | RAM permission policy list |\n| [references/verification-method.md](references/verification-method.md) | Success verification methods |\n| [references/acceptance-criteria.md](references/acceptance-criteria.md) | Acceptance criteria |\n\nFile v0.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn74p5w8ywv6prh40g0s82gmqh83nw54\",\n  \"slug\": \"alibabacloud-polardbx-ai-assistant\",\n  \"version\": \"0.0.1\",\n  \"publishedAt\": 1776824111417\n}\n\nFile v0.0.1:references/acceptance-criteria.md\n\n# Acceptance Criteria: alibabacloud-polardbx-ai-assistant\n\n**Scenario**: PolarDB-X Distributed Database AI Assistant\n**Purpose**: Skill testing acceptance criteria\n\n---\n\n# Correct CLI Command Patterns\n\n## 1. Product - DAS (Database Autonomy Service)\n\n#### CORRECT\n```bash\n# Plugin kebab-case command (Signature V3, recommended)\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: product name wrong case\naliyun DAS get-yao-chi-agent --query \"List instances\"\n\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 2. Command - get-yao-chi-agent\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"Hello\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: API name typo\naliyun das get-yao-chi --query \"Hello\"\n\n# Error: using non-existent API\naliyun das yaochi-agent --query \"Hello\"\n```\n\n## 3. Parameters\n\n### get-yao-chi-agent Parameters\n\n#### CORRECT\n```bash\n# Required parameter --query\naliyun das get-yao-chi-agent --query \"List PolarDB-X instances in Hangzhou region\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --source\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --session-id (multi-turn)\naliyun das get-yao-chi-agent --query \"Continue analysis\" --session-id \"sess-xxx\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing required parameter --query\naliyun das get-yao-chi-agent --source \"polardbx-console\"\n\n# Error: using non-existent parameter\naliyun das get-yao-chi-agent --query \"List instances\" --region-id \"cn-hangzhou\"\n```\n\n## 4. Endpoint\n\n#### CORRECT\n```bash\n# get-yao-chi-agent always uses cn-shanghai endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: wrong endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-beijing.aliyuncs.com\n\n# Error: missing endpoint, may use wrong default\naliyun das get-yao-chi-agent --query \"List instances\"\n```\n\n## 5. --user-agent Flag - Required\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 6. Timeout Settings\n\n#### CORRECT\n```bash\n# SSE streaming API needs longer read timeout (180s)\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --read-timeout 180 --connect-timeout 30 --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: read timeout too short, streaming API may timeout\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --read-timeout 10 --user-agent AlibabaCloud-Agent-Skills\n```\n\n---\n\n# Correct Bash Script Patterns\n\n## 1. Script Invocation\n\n#### CORRECT\n```bash\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze performance of instance pxc-xxx\" --session-id \"sess-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\necho \"List instances\" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -\n```\n\n#### INCORRECT\n```bash\n# Error: using Python script (does not exist)\nuv run $SKILL_DIR/scripts/call_yaochi_agent.py \"List instances\"\n\n# Error: using Python interpreter on bash script\npython $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\"\n\n# Error: using old parameter format\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --role-arn acs:ram::xxx:role/xxx\n```\n\n## 2. SSE Response Parsing\n\n#### CORRECT - script auto-parses SSE response\n```\n# Input: SSE format response body\ndata: {\"Content\":\"PolarDB-X instance list:\",\"SessionId\":\"sess-abc123\",\"ReasoningContent\":\"\"}\ndata: {\"Content\":\"\\n1. pxc-xxx (cn-hangzhou)\",\"SessionId\":\"sess-abc123\",\"ReasoningContent\":\"\"}\ndata: [DONE]\n\n# Output: concatenated Content\nPolarDB-X instance list:\n1. pxc-xxx (cn-hangzhou)\n```\n\n## 3. Credential Management\n\n#### CORRECT\n```bash\n# Use existing aliyun CLI configuration\naliyun configure --mode OAuth\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\"\n\n# Use specific profile\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\n```\n\n#### INCORRECT\n```bash\n# Error: hardcoding AK/SK in script\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\"LTAI5tXXXXXXXX\"\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\"8dXXXXXXXXXXXX\"\n\n# Error: using custom credential variables\nexport YAOCHI_ACCESS_KEY_ID=\"xxx\"\nexport YAOCHI_ACCESS_KEY_SECRET=\"xxx\"\n```\n\n---\n\n# Authentication Patterns\n\n#### CORRECT - use aliyun CLI configuration\n```bash\n# OAuth mode (recommended)\naliyun configure --mode OAuth\n\n# AK mode\naliyun configure set --mode AK --access-key-id <AK> --access-key-secret <SK> --region cn-hangzhou\n\n# Cross-account RamRoleArn mode\naliyun configure set --mode RamRoleArn --access-key-id <AK> --access-key-secret <SK> --ram-role-arn <ARN> --role-session-name yaochi-session --region cn-hangzhou\n```\n\n#### INCORRECT - managing credentials in script\n```python\n# Error: using Python SDK for credentials\nfrom alibabacloud_das20200116.client import Client as DAS20200116Client\n\n# Error: parsing credentials from .env file\n# Error: parsing credentials from ~/.alibabacloud/credentials\n```\n\nFile v0.0.1:references/cli-installation-guide.md\n\n# Aliyun CLI Installation & Configuration Guide\n\nComplete guide for installing and configuring Aliyun CLI.\n\n> **Aliyun CLI 3.3.1+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.1 or later for full plugin ecosystem coverage.\n\n## Installation\n\n### macOS\n\n**Using Homebrew (Recommended)**\n```bash\nbrew install aliyun-cli\n# Upgrade to latest\nbrew upgrade aliyun-cli\n\n# Verify version (>= 3.3.1)\naliyun version\n```\n\n**Using Binary**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz\n\n# Extract\ntar -xzf aliyun-cli-macosx-latest-amd64.tgz\n\n# Move to PATH\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n### Linux\n\n**Debian/Ubuntu**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**CentOS/RHEL**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**ARM64 Architecture**\n```bash\n# Download ARM64 version\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-arm64.tgz\nsudo mv aliyun /usr/local/bin/\n```\n\n### Windows\n\n**Using Binary**\n1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\n2. Extract the ZIP file\n3. Add the directory to your PATH environment variable\n4. Open new Command Prompt or PowerShell\n5. Verify: `aliyun version`\n\n**Using PowerShell**\n```powershell\n# Download\nInvoke-WebRequest -Uri \"https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\" -OutFile \"aliyun-cli.zip\"\n\n# Extract\nExpand-Archive -Path aliyun-cli.zip -DestinationPath C:\\aliyun-cli\n\n# Add to PATH (requires admin privileges)\n$env:Path += \";C:\\aliyun-cli\"\n[Environment]::SetEnvironmentVariable(\"Path\", $env:Path, [System.EnvironmentVariableTarget]::Machine)\n\n# Verify\naliyun version\n```\n\n## Configuration\n\n### Quick Start\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n```\n\nAll `aliyun configure` commands support non-interactive flags, which is the recommended approach —\nit works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.\n\n**Where to Get Access Keys**\n\n1. Log in to Aliyun Console: https://ram.console.aliyun.com/\n2. Navigate to: AccessKey Management\n3. Create a new AccessKey pair\n4. Save the secret immediately — it's only shown once\n\n### Configuration Modes\n\nAliyun CLI supports 6 authentication modes. All examples below use non-interactive flags.\n\n#### 1. AK Mode (Access Key)\n\nMost common mode for personal accounts and scripts.\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --region cn-hangzhou\n```\n\nConfiguration is stored in `~/.aliyun/config.json`:\n\n```json\n{\n  \"current\": \"default\",\n  \"profiles\": [\n    {\n      \"name\": \"default\",\n      \"mode\": \"AK\",\n      \"access_key_id\": \"LTAI5tXXXXXXXX\",\n      \"access_key_secret\": \"8dXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"region_id\": \"cn-hangzhou\",\n      \"output_format\": \"json\",\n      \"language\": \"en\"\n    }\n  ]\n}\n```\n\n#### 2. StsToken Mode (Temporary Credentials)\n\nFor short-lived access (tokens expire in 1-12 hours).\n\n```bash\naliyun configure set \\\n  --mode StsToken \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --sts-token v1.0:XXXXXXXXXXXXXXXX \\\n  --region cn-hangzhou\n```\n\nUse cases: CI/CD pipelines, temporary access for external contractors, cross-account access.\n\n#### 3. RamRoleArn Mode (Assume RAM Role)\n\nAssume a RAM role for elevated or cross-account access.\n\n```bash\naliyun configure set \\\n  --mode RamRoleArn \\\n  --access-key-id LTAI5tXXXXXXXX \\\n  --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --ram-role-arn acs:ram::123456789012:role/AdminRole \\\n  --role-session-name my-session \\\n  --region cn-hangzhou\n```\n\nUse cases: cross-account resource access, temporary elevated privileges, role-based access control.\n\n#### 4. EcsRamRole Mode (ECS Instance RAM Role)\n\nUse the RAM role attached to an ECS instance — no credentials needed.\n\n```bash\naliyun configure set \\\n  --mode EcsRamRole \\\n  --ram-role-name MyEcsRole \\\n  --region cn-hangzhou\n```\n\nRequirements: must be running on an ECS instance with a RAM role attached.\n\nUse cases: scripts and automation running on ECS instances.\n\n#### 5. RsaKeyPair Mode (RSA Key Pair)\n\nUse RSA key pair for authentication (generate key pair in Aliyun Console first).\n\n```bash\naliyun configure set \\\n  --mode RsaKeyPair \\\n  --private-key /path/to/private-key.pem \\\n  --key-pair-name my-key-pair \\\n  --region cn-hangzhou\n```\n\n#### 6. RamRoleArnWithEcs Mode (ECS + RAM Role)\n\nCombine ECS instance role with RAM role assumption for cross-account access from ECS.\n\n```bash\naliyun configure set \\\n  --mode RamRoleArnWithEcs \\\n  --ram-role-name MyEcsRole \\\n  --ram-role-arn acs:ram::123456789012:role/TargetRole \\\n  --role-session-name my-session \\\n  --region cn-hangzhou\n```\n\n### Environment Variables\n\n**Highest priority** - overrides config file\n\n**Access Key Mode**\n```bash\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n```\n\n**STS Token Mode**\n```bash\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret\nexport ALIBABA_CLOUD_SECURITY_TOKEN=your_sts_token\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n```\n\n**ECS RAM Role Mode**\n```bash\nexport ALIBABA_CLOUD_ECS_METADATA=role_name\n```\n\n**Use Case**:\n- CI/CD pipelines\n- Docker containers\n- Temporary credential override\n\n### Managing Multiple Profiles\n\n**Create Named Profiles**\n\n```bash\naliyun configure set --profile projectA \\\n  --mode AK \\\n  --access-key-id LTAI5tAAAAAAAA \\\n  --access-key-secret 8dAAAAAAAAAAAAAAAAAAAAAAAA \\\n  --region cn-hangzhou\n\naliyun configure set --profile projectB \\\n  --mode AK \\\n  --access-key-id LTAI5tBBBBBBBB \\\n  --access-key-secret 8dBBBBBBBBBBBBBBBBBBBBBBBB \\\n  --region cn-shanghai\n```\n\n**Use Specific Profile**\n\n```bash\naliyun ecs describe-instances --profile projectA\n\nexport ALIBABA_CLOUD_PROFILE=projectA\naliyun ecs describe-instances   # Uses projectA\n```\n\n**List and Switch Profiles**\n\n```bash\naliyun configure list                      # List all profiles\naliyun configure set --current projectA    # Switch default profile\n```\n\n### Credential Priority\n\nCredentials are loaded in this order (first found wins):\n\n1. **Command-line flag**: `--profile <name>`\n2. **Environment variable**: `ALIBABA_CLOUD_PROFILE`\n3. **Environment credentials**: `ALIBABA_CLOUD_ACCESS_KEY_ID`, etc.\n4. **Configuration file**: `~/.aliyun/config.json` (current profile)\n5. **ECS Instance RAM Role**: If running on ECS with attached role\n\n## Verification\n\n### Test Authentication\n\n```bash\n# Basic test - list regions\naliyun ecs describe-regions\n\n# Expected output: JSON array of regions\n```\n\n**If successful**, you'll see:\n```json\n{\n  \"Regions\": {\n    \"Region\": [\n      {\n        \"RegionId\": \"cn-hangzhou\",\n        \"RegionEndpoint\": \"ecs.cn-hangzhou.aliyuncs.com\",\n        \"LocalName\": \"华东 1（杭州）\"\n      },\n      ...\n    ]\n  },\n  \"RequestId\": \"...\"\n}\n```\n\n**If failed**, you'll see error messages:\n- `InvalidAccessKeyId.NotFound` - Wrong Access Key ID\n- `SignatureDoesNotMatch` - Wrong Access Key Secret\n- `InvalidSecurityToken.Expired` - STS token expired (for StsToken mode)\n- `Forbidden.RAM` - Insufficient permissions\n\n### Debug Configuration\n\n```bash\n# Show current configuration\naliyun configure get\n\n# Test with debug logging\naliyun ecs describe-regions --log-level=debug\n\n# Check credential provider\naliyun configure get mode\n```\n\n## Security Best Practices\n\n### 1. Use RAM Users (Not Root Account)\n\n❌ **Don't**: Use Aliyun root account credentials\n✅ **Do**: Create RAM users with specific permissions\n\n```bash\n# Create RAM user in console\n# Attach only necessary policies\n# Use RAM user's access keys\n```\n\n### 2. Principle of Least Privilege\n\nGrant only the minimum permissions needed:\n\n```bash\n# Example: Read-only ECS access\n# Attach policy: AliyunECSReadOnlyAccess\n```\n\n### 3. Rotate Access Keys Regularly\n\n```bash\n# Create new access key in RAM Console, then update configuration\naliyun configure set --access-key-id NEW_KEY --access-key-secret NEW_SECRET\n# Delete old access key from console\n```\n\n### 4. Use STS Tokens for Temporary Access\n\n```bash\naliyun configure set --mode StsToken \\\n  --access-key-id XXXX --access-key-secret XXXX \\\n  --sts-token XXXX --region cn-hangzhou\n```\n\n### 5. Use ECS RAM Roles When Possible\n\n```bash\naliyun configure set --mode EcsRamRole --ram-role-name MyRole --region cn-hangzhou\n```\n\n### 6. Never Commit Credentials\n\n```bash\n# Add to .gitignore\necho \"~/.aliyun/config.json\" >> .gitignore\n\n# Use environment variables in CI/CD instead\n```\n\n### 7. Secure Config File\n\n```bash\n# Restrict permissions\nchmod 600 ~/.aliyun/config.json\n```\n\n## Troubleshooting\n\n### Issue: Command Not Found\n\n```bash\n# Check installation\nwhich aliyun\n\n# Check PATH\necho $PATH\n\n# Reinstall or add to PATH\n```\n\n### Issue: Authentication Failed\n\n```bash\n# Verify configuration\naliyun configure get\n\n# Test with debug\naliyun ecs describe-regions --log-level=debug\n\n# Check credentials in console\n# Verify access key is active\n```\n\n### Issue: Permission Denied\n\n```bash\n# Error: Forbidden.RAM\n\n# Check RAM user permissions\n# Attach necessary policies in RAM console\n# Example: AliyunECSFullAccess for ECS operations\n```\n\n### Issue: STS Token Expired\n\n```bash\n# Error: InvalidSecurityToken.Expired\n\n# Reconfigure with new token\naliyun configure set --mode StsToken \\\n  --access-key-id XXXX --access-key-secret XXXX \\\n  --sts-token NEW_TOKEN --region cn-hangzhou\n```\n\n### Issue: Wrong Region\n\n```bash\n# Some resources may not exist in the specified region\n\n# Check available regions\naliyun ecs describe-regions\n\n# Update default region\naliyun configure set region cn-shanghai\n```\n\n## Advanced Configuration\n\n### Custom Endpoint\n\n```bash\n# Use custom or private endpoint\nexport ALIBABA_CLOUD_ECS_ENDPOINT=ecs-vpc.cn-hangzhou.aliyuncs.com\n```\n\n### Proxy Settings\n\n```bash\n# HTTP proxy\nexport HTTP_PROXY=http://proxy.example.com:8080\nexport HTTPS_PROXY=http://proxy.example.com:8080\n\n# No proxy for specific domains\nexport NO_PROXY=localhost,127.0.0.1,.aliyuncs.com\n```\n\n### Timeout Settings\n\n```bash\n# Connection timeout (default: 10s)\nexport ALIBABA_CLOUD_CONNECT_TIMEOUT=30\n\n# Read timeout (default: 10s)\nexport ALIBABA_CLOUD_READ_TIMEOUT=30\n```\n\n## Next Steps\n\nAfter installation and configuration:\n\n1. **Install plugins** for services you need (v3.3.1+ supports all published product plugins):\n   ```bash\n   aliyun plugin install --names ecs vpc rds\n\n   # List all available plugins\n   aliyun plugin list-remote\n   ```\n\n2. **Explore commands**:\n   ```bash\n   aliyun ecs --help\n   aliyun fc --help\n   ```\n\n3. **Read documentation**:\n   - [Command Syntax Guide](./command-syntax.md)\n   - [Global Flags Reference](./global-flags.md)\n   - [Common Scenarios](./common-scenarios.md)\n\n## References\n\n- Official Documentation: https://help.aliyun.com/zh/cli/\n- RAM Console: https://ram.console.aliyun.com/\n- Access Key Management: https://ram.console.aliyun.com/manage/ak\n- Plugin Repository: https://github.com/aliyun/aliyun-cli\n\nFile v0.0.1:references/ram-policies.md\n\n# RAM Policies\n\n## Required Permissions\n\nUsing PolarDB-X AI Assistant (YaoChi Agent) requires the following RAM permissions:\n\n### Core Permission - DAS GetYaoChiAgent\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Recommended - DAS Read-Only\n\nFor full diagnostic capabilities, grant the following specific DAS read-only permissions:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\",\n        \"das:DescribeInstanceDasPro\",\n        \"das:GetInstanceInspections\",\n        \"das:GetQueryOptimizeExecErrorStats\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Cross-Account Access - STS AssumeRole\n\nFor cross-account access, configure RAM role trust policy on the target account:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"sts:AssumeRole\",\n      \"Principal\": {\n        \"RAM\": [\n          \"acs:ram::<caller-account-id>:root\"\n        ]\n      }\n    }\n  ]\n}\n```\n\n## Recommended System Policies\n\n| Policy Name | Description | Use Case |\n|-------------|-------------|----------|\n| `AliyunDASReadOnlyAccess` | DAS read-only | Daily diagnostic queries |\n| `AliyunDASFullAccess` | DAS full access | Execute diagnostic tasks |\n\n## Permission Mapping\n\n| Operation | Required RAM Action |\n|-----------|---------------------|\n| YaoChi Agent diagnostics | `das:GetYaoChiAgent` |\n| DAS Agent SSE | `das:GetDasAgentSSE` |\n\nFile v0.0.1:references/related-apis.md\n\n# Related APIs\n\n## DAS (Database Autonomy Service) - Core API\n\n| Product | CLI Command | API Action | Description |\n|---------|------------|------------|-------------|\n| DAS | `aliyun das get-yao-chi-agent --query \"<query>\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills` | GetYaoChiAgent | YaoChi Agent (SSE streaming response) |\n| DAS | `aliyun das GetDasAgentSSE --Query \"<query>\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills` | GetDasAgentSSE | DAS Agent SSE API |\n\n## GetYaoChiAgent API Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `--query` | String | Yes | Natural language query content |\n| `--source` | String | No | Call source identifier, set to `polardbx-console` |\n| `--session-id` | String | No | Session ID for multi-turn conversation context |\n\n## GetDasAgentSSE API Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `--Query` | String | Yes | Natural language query content |\n| `--AgentId` | String | No | Agent ID |\n| `--InstanceId` | String | No | Database instance ID |\n| `--SessionId` | String | No | Session ID for multi-turn conversation context |\n\n## SSE Response Format\n\nGetYaoChiAgent returns SSE (Server-Sent Events) streaming response:\n\n```\ndata: {\"Content\":\"Response text chunk 1\",\"SessionId\":\"sess-xxx\",\"ReasoningContent\":\"\"}\ndata: {\"Content\":\"Response text chunk 2\",\"SessionId\":\"sess-xxx\",\"ReasoningContent\":\"\"}\n...\ndata: [DONE]\n```\n\n### Response Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `Content` | String | Current chunk text content |\n| `SessionId` | String | Session ID for multi-turn conversation |\n| `ReasoningContent` | String | Reasoning content (for debug) |\n\n## API Endpoint\n\n| Environment | Endpoint |\n|-------------|----------|\n| Production | `das.cn-shanghai.aliyuncs.com` |\n\n> Note: GetYaoChiAgent API uses `das.cn-shanghai.aliyuncs.com` endpoint uniformly, regardless of the PolarDB-X instance's region.\n\nFile v0.0.1:references/verification-method.md\n\n# Verification Method\n\n## Steps to Verify Skill Execution\n\n### Step 1: Verify aliyun CLI installation and configuration\n\n```bash\n# Check CLI version\naliyun version\n# Expected: 3.3.1 or higher\n\n# Check auth configuration\naliyun configure get\n# Expected: shows current profile configuration\n\n# Test basic connectivity\naliyun das DescribeInstanceDasPro --InstanceId \"pxc-test\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills 2>&1\n# Expected: JSON response (API error for non-existent instance is OK, connection error is NOT)\n```\n\n### Step 2: Verify jq installation\n\n```bash\necho '{\"Content\":\"test\"}' | jq -r '.Content'\n# Expected: test\n```\n\n### Step 3: Verify call_yaochi_agent.sh script\n\n```bash\n# Verify script is runnable\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh --help\n# Expected: shows help information\n\n# Verify no-argument error prompt\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh\n# Expected: shows usage prompt and exits\n```\n\n### Step 4: Verify actual invocation (requires valid credentials)\n\n```bash\n# Simple query test\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Hello\"\n# Expected: YaoChi Agent response content\n\n# With debug mode\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Hello\" --debug\n# Expected: response content + debug info on stderr\n```\n\n### Step 5: Verify multi-turn conversation\n\n```bash\n# First query - note the session ID in stderr output\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List PolarDB-X instances in Hangzhou region\"\n# Expected: instance list, stderr shows [SessionID] sess-xxx\n\n# Second query - use session ID from previous call\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Continue analyzing the first instance\" --session-id \"sess-xxx\"\n# Expected: contextual analysis based on previous conversation\n```\n\n## Common Errors and Solutions\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `command not found: aliyun` | aliyun CLI not installed | See cli-installation-guide.md |\n| `command not found: jq` | jq not installed | `brew install jq` or `apt install jq` |\n| `InvalidAccessKeyId` | Invalid AK/SK | Check `aliyun configure get` configuration |\n| `Throttling.UserConcurrentLimit` | Concurrent session limit reached | Wait for previous query to finish, then retry |\n| `Forbidden.RAM` | Insufficient permissions | See ram-policies.md for required permissions |","readmeExcerpt":"Skill: Alibabacloud Polardbx Ai Assistant Owner: sdk-team Summary: Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati... Tags: latest:0.0.2 Version history: v0.0.2 | 2026-04-23T06:50:43.728Z | auto **Changelog for alibabacloud-polardbx-ai-assistant v0.0.2** - Increased minimal aliyun CLI version to 3.3.3 and upd","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"> aliyun configure ai-mode enable\n> aliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills/alibabacloud-polardbx-ai-assistant\"\n>"},{"language":"bash","snippet":"> aliyun configure ai-mode disable\n>"},{"language":"bash","snippet":"curl -fsSL https://aliyuncli.alicdn.com/install.sh | bash"},{"language":"bash","snippet":"# Install aliyun CLI\ncurl -fsSL https://aliyuncli.alicdn.com/install.sh | bash\naliyun version  # Verify >= 3.3.3\n\n# Enable automatic plugin installation\naliyun configure set --auto-plugin-install true\n\n# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)\naliyun plugin install --names aliyun-cli-das\n\n# Install jq (for JSON response parsing)\n# macOS:\nbrew install jq\n# Ubuntu/Debian:\n# sudo apt-get install jq"},{"language":"bash","snippet":"> aliyun configure list\n>"},{"language":"bash","snippet":"# Recommended: OAuth mode\naliyun configure --mode OAuth\n\n# Alternative: AK mode (configure outside of agent session)\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n\n# Cross-account access: RamRoleArn mode\naliyun configure set \\\n  --mode RamRoleArn \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --ram-role-arn acs:ram::<account-id>:role/<role-name> \\\n  --role-session-name yaochi-agent-session \\\n  --region cn-hangzhou"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: alibabacloud-polardbx-ai-assistant\ndescription: |\n  Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management,\n  topology inspection, performance diagnostics, SQL optimization, data distribution analysis,\n  elastic scaling diagnostics, connection/session analysis, security audit, backup/restore,\n  parameter tuning, and other O&M operations.\n  Triggers: \"PolarDB-X\", \"distributed database\", \"pxc-\", \"DN/CN nodes\", \"data sharding\",\n  \"PolarDB-X diagnostics\", \"PolarDB-X performance\", \"PolarDB-X slow SQL\", \"YaoChi Agent\",\n  \"PolarDB-X topology\", \"PolarDB-X backup\", \"PolarDB-X security audit\", \"PolarDB-X scaling\"\n---\n\n# PolarDB-X Distributed Database AI Assistant\n\nThis skill provides intelligent O&M capabilities for **Alibaba Cloud PolarDB-X distributed database**, powered by the DAS (Database Autonomy Service) `get-yao-chi-agent` API via the aliyun CLI DAS plugin.\n\n**Architecture**: `Aliyun CLI` -> `DAS Plugin (Signature V3)` -> `get-yao-chi-agent API` -> PolarDB-X Intelligent Diagnostics\n\n### Supported Capabilities\n\n| Capability | Description |\n|------------|-------------|\n| Instance Information | Instance details, cluster configuration, version info |\n| Topology Inspection | CN/DN node distribution, shard topology, data node status |\n| Storage Information | Disk usage, storage capacity, space growth trends |\n| SQL Optimization | Slow SQL analysis, distributed execution plan interpretation, index suggestions, cross-shard query optimization |\n| Cluster Performance Monitoring | QPS/TPS/connections/throughput and other core metrics analysis |\n| Connection & Session Analysis | Connection count monitoring, session troubleshooting, connection pool optimization |\n| Security Audit | Whitelist, SSL, security policy audit |\n| Backup Status Check | Backup completeness, retention policy, point-in-time recovery |\n| Instance Health Check | Instance health status, running state verification |\n| Log Diagnostics | Error log analysis, slow log troubleshooting |\n| Data Distribution Analysis | Shard data skew detection, hotspot shard diagnostics |\n| Elastic Scaling Diagnostics | Scale-out/in status, data migration progress, node load balancing |\n| Parameter Tuning | Kernel parameter interpretation, change impact assessment, configuration recommendations |\n| High Availability & DR | HA configuration assessment, disaster recovery architecture diagnostics, primary-standby status |\n| Expiring Instance Query | Subscription instance expiration reminders, renewal status |\n\n## Installation\n\n> **Pre-check: Aliyun CLI >= 3.3.3 required**\n> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,\n> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update,\n> or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions.\n\n> **Pre-check: Aliyun CLI plugin update required**\n> **[MUST]** run `aliyun configure set --auto-plugin-install true` to e"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn74p5w8ywv6prh40g0s82gmqh83nw54\",\n  \"slug\": \"alibabacloud-polardbx-ai-assistant\",\n  \"version\": \"0.0.2\",\n  \"publishedAt\": 1776927043728\n}"},{"path":"references/acceptance-criteria.md","content":"# Acceptance Criteria: alibabacloud-polardbx-ai-assistant\n\n**Scenario**: PolarDB-X Distributed Database AI Assistant\n**Purpose**: Skill testing acceptance criteria\n\n---\n\n# Correct CLI Command Patterns\n\n## 1. Product - DAS (Database Autonomy Service)\n\n#### CORRECT\n```bash\n# Plugin kebab-case command (Signature V3, recommended)\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: product name wrong case\naliyun DAS get-yao-chi-agent --query \"List instances\"\n\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 2. Command - get-yao-chi-agent\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"Hello\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: API name typo\naliyun das get-yao-chi --query \"Hello\"\n\n# Error: using non-existent API\naliyun das yaochi-agent --query \"Hello\"\n```\n\n## 3. Parameters\n\n### get-yao-chi-agent Parameters\n\n#### CORRECT\n```bash\n# Required parameter --query\naliyun das get-yao-chi-agent --query \"List PolarDB-X instances in Hangzhou region\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --source\naliyun das get-yao-chi-agent --query \"List instances\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n\n# Optional parameter --session-id (multi-turn)\naliyun das get-yao-chi-agent --query \"Continue analysis\" --session-id \"sess-xxx\" --source \"polardbx-console\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing required parameter --query\naliyun das get-yao-chi-agent --source \"polardbx-console\"\n\n# Error: using non-existent parameter\naliyun das get-yao-chi-agent --query \"List instances\" --region-id \"cn-hangzhou\"\n```\n\n## 4. Endpoint\n\n#### CORRECT\n```bash\n# get-yao-chi-agent always uses cn-shanghai endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: wrong endpoint\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-beijing.aliyuncs.com\n\n# Error: missing endpoint, may use wrong default\naliyun das get-yao-chi-agent --query \"List instances\"\n```\n\n## 5. --user-agent Flag - Required\n\n#### CORRECT\n```bash\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com --user-agent AlibabaCloud-Agent-Skills\n```\n\n#### INCORRECT\n```bash\n# Error: missing --user-agent flag\naliyun das get-yao-chi-agent --query \"List instances\" --endpoint das.cn-shanghai.aliyuncs.com\n```\n\n## 6. Timeout Settings\n\n#### CORRECT\n```bash\n# SSE streaming API needs longer read timeout (180s)\naliyun das ge"},{"path":"references/cli-installation-guide.md","content":"# Aliyun CLI Installation & Configuration Guide\n\nComplete guide for installing and configuring Aliyun CLI.\n\n> **Aliyun CLI 3.3.3+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.3 or later for full plugin ecosystem coverage.\n\n## Installation\n\n### macOS\n\n**Using Homebrew (Recommended)**\n```bash\nbrew install aliyun-cli\n# Upgrade to latest\nbrew upgrade aliyun-cli\n\n# Verify version (>= 3.3.3)\naliyun version\n```\n\n**Using Binary**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz\n\n# Extract\ntar -xzf aliyun-cli-macosx-latest-amd64.tgz\n\n# Move to PATH\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n### Linux\n\n**Debian/Ubuntu**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**CentOS/RHEL**\n```bash\n# Download\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-amd64.tgz\nsudo mv aliyun /usr/local/bin/\n\n# Verify\naliyun version\n```\n\n**ARM64 Architecture**\n```bash\n# Download ARM64 version\nwget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz\n\n# Extract and install\ntar -xzf aliyun-cli-linux-latest-arm64.tgz\nsudo mv aliyun /usr/local/bin/\n```\n\n### Windows\n\n**Using Binary**\n1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\n2. Extract the ZIP file\n3. Add the directory to your PATH environment variable\n4. Open new Command Prompt or PowerShell\n5. Verify: `aliyun version`\n\n**Using PowerShell**\n```powershell\n# Download\nInvoke-WebRequest -Uri \"https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip\" -OutFile \"aliyun-cli.zip\"\n\n# Extract\nExpand-Archive -Path aliyun-cli.zip -DestinationPath C:\\aliyun-cli\n\n# Add to PATH (requires admin privileges)\n$env:Path += \";C:\\aliyun-cli\"\n[Environment]::SetEnvironmentVariable(\"Path\", $env:Path, [System.EnvironmentVariableTarget]::Machine)\n\n# Verify\naliyun version\n```\n\n## Configuration\n\n### Quick Start\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id <your-access-key-id> \\\n  --access-key-secret <your-access-key-secret> \\\n  --region cn-hangzhou\n```\n\nAll `aliyun configure` commands support non-interactive flags, which is the recommended approach —\nit works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.\n\n**Where to Get Access Keys**\n\n1. Log in to Aliyun Console: https://ram.console.aliyun.com/\n2. Navigate to: AccessKey Management\n3. Create a new AccessKey pair\n4. Save the secret immediately — it's only shown once\n\n### Configuration Modes\n\nAliyun CLI supports 6 authentication modes. All examples below use non-interactive flags.\n\n#### 1. AK Mode (Access Key)\n\nMost common mode for personal accounts and scripts.\n\n```bash\naliyun configure set \\\n  --mode AK \\\n  --access-key-id LTAI5tXXXXXXX"},{"path":"references/ram-policies.md","content":"# RAM Policies\n\n## Required Permissions\n\nUsing PolarDB-X AI Assistant (YaoChi Agent) requires the following RAM permissions:\n\n### Core Permission - DAS GetYaoChiAgent\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Recommended - DAS Read-Only\n\nFor full diagnostic capabilities, grant the following specific DAS read-only permissions:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"das:GetYaoChiAgent\",\n        \"das:GetDasAgentSSE\",\n        \"das:DescribeInstanceDasPro\",\n        \"das:GetInstanceInspections\",\n        \"das:GetQueryOptimizeExecErrorStats\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Cross-Account Access - STS AssumeRole\n\nFor cross-account access, configure RAM role trust policy on the target account:\n\n```json\n{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"sts:AssumeRole\",\n      \"Principal\": {\n        \"RAM\": [\n          \"acs:ram::<caller-account-id>:root\"\n        ]\n      }\n    }\n  ]\n}\n```\n\n## Recommended System Policies\n\n| Policy Name | Description | Use Case |\n|-------------|-------------|----------|\n| `AliyunDASReadOnlyAccess` | DAS read-only | Daily diagnostic queries |\n\n\n## Permission Mapping\n\n| Operation | Required RAM Action |\n|-----------|---------------------|\n| YaoChi Agent diagnostics | `das:GetYaoChiAgent` |\n| DAS Agent SSE | `das:GetDasAgentSSE` |"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati... Skill: Alibabacloud Polardbx Ai Assistant Owner: sdk-team Summary: Alibaba Cloud PolarDB-X Distributed Database AI Assistant. Use for PolarDB-X cluster management, topology inspection, performance diagnostics, SQL optimizati... Tags: latest:0.0.2 Version history: v0.0.2 | 2026-04-23T06:50:43.728Z | auto **Changelog for alibabacloud-polardbx-ai-assistant v0.0.2** - Increased minimal aliyun CLI version to 3.3.3 and upd","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1275,"uniquenessScore":45,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-12T02:13:22.381Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-13T03:22:43.338Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}