alibabacloud-bailian-m…
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-dms-skill --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/alibabacloud-dms-skillContext preview
The summary Claude sees to decide when to auto-load this skill.
Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".
name: alibabacloud-dms-skill description: | Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".
Search for target databases and execute SQL queries and data modifications via Alibaba Cloud DMS OpenAPI.
This skill implements the following workflow:
1. **Search Target Database** — Search databases by keyword to get Database ID 2. **Execute SQL Query** — Execute SQL statements on the target database
User Request → Search Database → Get Database ID → Execute SQL → Return Results
This skill MUST run inside an AI-Mode session. Treat the following five steps as a strict lifecycle — do not skip, reorder, or interleave the setup steps with command execution:
1. aliyun configure ai-mode enable # Enable AI-Mode 2. aliyun configure ai-mode set-user-agent AlibabaCloud-Agent-Skills/alibabacloud-dms-skill # Register skill User-Agent 3. aliyun configure set --auto-plugin-install true && aliyun plugin update # Plugin update 4. <execute DMS commands via ./scripts/*.sh> # Execute commands 5. aliyun configure ai-mode disable # Disable AI-Mode (Cleanup)
Steps 1–3 belong to setup (this section). Step 4 is covered by [Core Workflow](#core-workflow). Step 5 is covered by [Cleanup](#cleanup).
> **Pre-check 0: Aliyun CLI >= 3.3.3 required** > Run `aliyun version` to verify >= 3.3.3. If not installed or version too low, > run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update, > or see `references/cli-installation-guide.md` for installation instructions.
> **Pre-check 1: Enable AI-Mode** > [MUST] run `aliyun configure ai-mode enable` to enable AI-Mode before any other configuration or command. > This activates the AI-Mode session that downstream OpenAPI services use to recognize agent-issued traffic.
> **Pre-check 2: Register skill User-Agent under AI-Mode** > [MUST] run `aliyun configure ai-mode set-user-agent AlibabaCloud-Agent-Skills/alibabacloud-dms-skill` > to register this skill's identifier as the AI-Mode User-Agent for the current session. > Run this immediately after `ai-mode enable` and before any plugin update or DMS command.
> **Pre-check 3: Aliyun CLI plugin update required** > [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date. > Plugin update MUST happen AFTER AI-Mode is enabled and the User-Agent is registered, so the plugin manager itself reports the correct identifier.
> **Pre-check 4: Alibaba Cloud Credentials Required** > > **Security Rules:** > - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Check the output for a valid profile (AK, STS, or OAuth identity). > > **If no valid profile exists, STOP here.** > 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) > 2. Configure credentials **outside of this session** (via `aliyun configure` in terminal or environment variables in shell profile) > 3. Return and re-run after `aliyun configure list` shows a valid profile
**[MUST] Per-command CLI User-Agent** — In addition to the AI-Mode User-Agent registered in Pre-check 2, every `aliyun` CLI command invocation in step 4 MUST also include: `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-dms-skill` The per-command flag and the AI-Mode session-level setting are complementary — both MUST be present so the identifier is sent on every request even if the AI-Mode session expires.
> **[MUST] RAM Permission Pre-check:** Verify that the current user has the following RAM permissions before execution. > See `references/ram-policies.md` for the complete permission list.
> **IMPORTANT: Parameter Confirmation** — Before executing any command or API call, > ALL user-customizable parameters (e.g., database keyword, SQL statement, db-id, etc.) > MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter | Required/Optional | Description | Default | |-----------|------------------|-------------|---------| | keyword | Required | Database search keyword (1-128 chars, alphanumeric) | - | | db-id | Required | Database ID (positive integer, obtained from search) | - | | sql | Required | SQL statement to execute (1-10000 chars) | - | | logic | Optional | Whether to use logic database mode | false | | force | Optional | Confirm write operations (INSERT/UPDATE/DELETE) | false | | dry-run | Optional | Preview write operations without executing | false |
Search for databases by keyword to get the Database ID:
./scripts/search_database.sh <keyword> --json
Example:
# Search for databases containing "mydb" ./scripts/search_database.sh mydb --json
The output includes `database_id`, `schema_name`, `db_type`, `host`, `port`, etc.
Execute SQL using the Database ID obtained in the previous step:
./scripts/execute_query.sh --db-id <data
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Alibaba Cloud Parse-X intelligent document parsing and extraction tool. Supports two…
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users…
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API…
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews,…
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through…