/alibabacloud-core:alibabacloud-suggest-clifrom alibabacloud-core
Suggests Alibaba Cloud `aliyun` CLI commands from natural-language requests, using MCP tools to look up APIs and generate validated command strings for the CallCLI tool.
Ships in alibabacloud-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn a natural-language Alibaba Cloud request into one or more aliyun CLI command strings,
each ready to be passed as the command argument of the MCP CallCLI tool. After calling
GenerateCLICommand, take the returned unifiedCli field verbatim; if unifiedCli is empty,
fall back to cli. Do not manually rewrite either field. Commands must satisfy CallCLI's
constraints, must pass check_cli.py validation before output, and are suggested only —
do not run them unless the user explicitly asks.
aliyun ... command strings (from
GenerateCLICommand) for the MCP CallCLI tool. No execution, no SDK code.alibabacloud-cli-guidance: the knowledge base
for plugin vs built-in routing, --biz- naming, auth, install, and error fixes. Read it when
you need rules; this skill is the generation + validation loop on top of those rules.Split the request into atomic cloud operations. For each, verify the product, API/action name, version, and required parameters using MCP tools — do not guess.
Search APIs for operations whose action you are unsure about. Use
AlibabaCloud___SearchApis with a natural-language description. Keep to one parallel batch.
Read API definitions to confirm exact parameter names, types, and which are required. Use
AlibabaCloud___GetApiDefinition with product, action, and version. Do not skip this step
for unfamiliar APIs.
Build jsonApiParameters from the API definition before generating the command. Prefer
user-provided values. For missing values needed to make a useful suggestion, create reasonable
mock values from the parameter structure returned by GetApiDefinition:
PageSize: 10, MaxItems: 10, or max-keys: 10) only if those
parameters exist in the definition.cn-hangzhou.i-test1234567890, vpc-test1234567890, vsw-test1234567890, sg-test1234567890, or
eipalloc-test1234567890.test-vpc, test-sg, or
updated by static cli test.10.0.0.0/8, 10.0.1.0/24, or 203.0.113.0/24.tcp, accept, PayByTraffic, EcsInstance, or false.1, 5, or 10.jsonApiParameters; do not flatten them into guessed CLI flags.<instance-id> and mention that it must be replaced.Treat mock values as examples only. Do not execute generated commands unless the user explicitly asks.
Generate the command with AlibabaCloud___GenerateCLICommand (product, version, action,
params). From the response, take unifiedCli verbatim as the aliyun ... string for
MCP CallCLI. If unifiedCli is empty, take cli instead. Do NOT manually rewrite,
re-case, or word-split either field — GenerateCLICommand already emits the correct subcommand
and parameter names (avoiding proper-noun mistakes like Vpc, Ipv6, SLB). Only supply
parameter values in the GenerateCLICommand request from the user's input and the API
definition. When multiple independent calls are needed, batch the MCP lookups in parallel.
Never repeat the same tool call with identical arguments.
Write the command string(s) to /tmp/aliyun-cli-commands.sh (one per line) and validate with
the local checker:
cat > /tmp/aliyun-cli-commands.sh <<'SHEOF'
<aliyun command strings here, one per line>
SHEOF
python3 <SKILL_DIR>/script/check_cli.py /tmp/aliyun-cli-commands.sh
Where <SKILL_DIR> is the directory containing this SKILL.md file.
If validation fails, read the -> fix suggestion for each violation, fix ONLY the listed
issues, and re-validate. Maximum 3 rounds. If violations persist, show them to the user.
After validation passes, output the command string(s) in a single code block — each line is a
value you would pass as the command argument of MCP CallCLI. Optionally add a one-line note
about required parameters or --help. Do not execute them.
Enforced by script/check_cli.py (local pre-check). On failure, read each violation's
-> fix line; for broader CLI syntax, auth, or troubleshooting, see alibabacloud-cli-guidance.
| Rule ID | Category | Rule |
|---|---|---|
| — | Command source | After GenerateCLICommand, use the returned unifiedCli as the CallCLI command string. If unifiedCli is empty, use cli. Take the chosen field verbatim — do NOT hand-rewrite casing or split words. Only parameter values are supplied in the GenerateCLICommand request. |
| REQ-3001 | CallCLI string | Each line is one aliyun ... command string to pass to MCP CallCLI. It must start with aliyun — no echo, env prefixes, or leading subshell. |
| SEC-2002 | No shell constructs | CallCLI runs a single command with no shell. No pipes |, redirects >/<, operators &&/||/;, or substitution $(...)/backticks. Use --cli-query to filter instead of piping to grep/jq. Operators inside quoted values (JMESPath, JSON) are fine. |
| SEC-2003 | No local files | The MCP server is remote: no file:// / fileb:// paths. File-based commands (e.g. oss cp) must run with the local Bash tool, not CallCLI. |
| — | Dependent steps | Chain dependent operations by showing separate command lines with a <placeholder> for values carried on a previous command's output — never wire them with $(...). |
| — | OSS / ossutil | OSS has custom commands (aliyun oss cp/ls/mb, aliyun ossutil sync), not OpenAPI actions. File operations (cp, sync) need local filesystem access and must use the Bash tool, not CallCLI. |
| — | Structured params | Lists are space-separated (--security-group-ids sg-1 sg-2); repeatable key-values use repeated flags (--tag Key=env Value=prod); complex structures use single-quoted JSON (--data-disk '{"Size":100}'). |
| — | Output filtering | Use --cli-query "<jmespath>" to filter, --output table, json, or cols=... to format, --pager / --page-size for pagination, --waiter expr='Status' to='Available' to wait. |
| — | No auto-exec | Suggest the command string(s) only. Do not call MCP CallCLI or run aliyun locally unless the user explicitly asks. |
| — | Output format | Output the command string(s) in one code block. Keep prose minimal — at most a one-line note about required params or --help. |
Each line below is a command string for MCP CallCLI. These are illustrative shapes —
the actual command must come from GenerateCLICommand's unifiedCli (or cli when
unifiedCli is empty), not from copying the examples here.
Single command (one operation):
aliyun ecs describe-instances --biz-region-id cn-hangzhou --page-size 50
Sequential (dependent steps — use a placeholder, not shell substitution):
# 1) Create the VPC, note the returned VpcId
aliyun vpc create-vpc --biz-region-id cn-hangzhou --cidr-block 10.0.0.0/8
# 2) Create a VSwitch in that VPC (replace <vpc-id> with the value from step 1)
aliyun vpc create-vswitch --biz-region-id cn-hangzhou --vpc-id <vpc-id> --cidr-block 10.0.0.0/16 --zone-id cn-hangzhou-a
Do not chain with shell substitution or pipes (SEC-2002):
# ❌ aliyun vpc create-vswitch --vpc-id $(aliyun vpc create-vpc ... --cli-query VpcId)
# ❌ aliyun ecs describe-instances --biz-region-id cn-hangzhou | grep Running
Pagination (list everything):
aliyun ecs describe-instances --biz-region-id cn-hangzhou --pager path='Instances.Instance[]' PageNumber=PageNumber PageSize=PageSize
Filtered output (project specific fields):
aliyun ecs describe-instances --biz-region-id cn-hangzhou --cli-query "Instances.Instance[?Status=='Running'].{ID:InstanceId,Name:InstanceName}" --output table
Wait for state:
aliyun vpc describe-vpc-attribute --biz-region-id cn-shanghai --vpc-id <vpc-id> --waiter expr='Status' to='Available'
aliyun ... command string(s) only. Do not call MCP CallCLI or run them locally
unless the user explicitly asks.unifiedCli from GenerateCLICommand as the CallCLI command; if empty, use cli.
Do not rewrite either field. Only supply parameter values in the GenerateCLICommand request;
do not invent flags or values.alibabacloud-core server for API discovery.check_cli.py before output. Do not skip validation.<placeholder> values instead of asking.script/check_cli.py — local CallCLI constraint checker (REQ-3001, SEC-2002, SEC-2003).alibabacloud-cli-guidance — CLI syntax, auth, install, plugin system, and troubleshooting.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/alibabacloud-cli-cost-estimationPre-execution cost estimation for Alibaba Cloud CLI operations. Use this skill whenever a user asks "how much will this cost", before executing any chargeable operation (create / resize / renew / bandwidth change), or when planning a multi-step workflow whose total cost should be known up front. Covers the --estimate-cost flag (quote without executing), --estimate-cost-context (usage assumptions and future-state overrides for multi-step workflows), reading the quote JSON correctly (pricingMode, pricingUnit, delta amounts), and reconciling quotes against actual bills.
/alibabacloud-cli-guidanceGuide for Alibaba Cloud CLI (aliyun) command syntax, plugin system, parameter naming, and best practices. Use this skill to generate correct CLI commands, understand plugin vs built-in command differences, structured parameter syntax, output filtering, pagination, and error troubleshooting. This skill is a CLI knowledge reference — when MCP tools (AlibabaCloud___CallCLI, etc.) are available, always prefer MCP tools for execution rather than running aliyun commands locally in the shell.
/alibabacloud-find-skillsUse this skill when users want to search, discover, browse, or find Alibaba Cloud (阿里云) agent skills. Triggers include: "find a skill for X", "search alicloud skills", "阿里云有什么 skill","阿里云", "搜索阿里云技能", "有没有管理 ECS/RDS/OSS 的 skill", "阿里云 skills 有哪些类目", "帮我找一个 skill", "browse alicloud skills", "list alicloud skill categories", "is there an alicloud skill that can...", "what alicloud skills are available", "XX Skill 的内容是什么", "我想了解阿里云 XX Skill 具体做什么","帮我安装阿里云 Skill","使用阿里云相关的skill", "阿里云 agent skill 市场", "搜一下阿里云的 skill", "建一个数据分析项目有没有相关 skill".
npx claudepluginhub aliyun/alibabacloud-agent-toolkit --plugin alibabacloud-coreOther plugins' skills for the same job