aliyun/alibabacloud-aiops-skills/alibabacloud-ack-cli
Claude Code and agent skill by aliyun/alibabacloud-aiops-skills
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when the user operates Alibaba Cloud Container Service for Kubernetes (ACK). Covers cluster lifecycle (create / modify / delete / upgrade), node pools & nodes (create, modify, delete, repair, fix CVE), addons (install / upgrade / uninstall), KubeConfig & RBAC (issue for RAM user, grant / revoke), security & policy (CVE scan/fix, policy governance, KMS, delete protection), logging / audit / alerting, intelligent O&M (check / inspect / diagnosis / auto-repair), async tasks (track / pause / resume / cancel), templates, autoscaling, tags & quotas. Triggers: create / upgrade / delete ACK cluster, migrate to Pro, scale nodepool, fix node CVE, install / remove addon, get / revoke kubeconfig, grant RBAC, enable audit log, run inspection, diagnose cluster, track task_id, debug cs error, Forbidden.RAM, kubectl cannot connect. Terms: ACK, container service, k8s cluster, nodepool, addon, AutoMode, Terway, Flannel, ForRegion, kubeconfig, RBAC, CVE.
Install
npx vskill@latest install aliyun/alibabacloud-aiops-skills/alibabacloud-ack-cliSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aliyun/alibabacloud-aiops-skills/alibabacloud-ack-cli.
ACK (Container Service) CLI Expert
Help users manage Alibaba Cloud Container Service for Kubernetes (ACK) from the terminal using the aliyun cs plugin. Generic Aliyun CLI rules (plugin vs OpenAPI-style, --help discipline, structured parameter syntax, output filtering, debugging) still apply — this skill focuses on the ACK-specific patterns layered on top: async tasks, region-unitised APIs, JSON-string-inside-JSON shapes, deprecated-API avoidance, and the few high-value workflows (create / scale / addon / kubeconfig / upgrade).
Version note. Concrete API/parameter lists below were captured againstaliyun-cli3.3.2 +csplugin 0.2.1. If your plugin is newer, re-run the self-discovery commands embedded throughout this skill to refresh:```bashaliyun cs --help | grep -- '-for-region' # §6 ForRegion listaliyun cs <cmd> --help | grep '废弃' # §7 deprecated check per command (CLI marks deprecation only in Chinese)aliyun cs --help | awk '/^ [a-z]/{print $1}' | while read c; do # §11 cursor-paginated commandsaliyun cs "$c" --help 2>&1 | grep -q -- '--next-token' && echo "$c"done```
Observability (MUST follow for every cs command)
Upon loading this skill, generate a random session ID — a 32-character lowercase hex string — once for the entire session. Use it as {session-id} below.
Rule: every `aliyun cs` command that calls a cloud API MUST carry the `--user-agent` flag, in exactly this form:
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ack-cli/{session-id}
{session-id} rules:
- Generate once per session, before the first business command — never per command:
uuidgen | tr -d '-' | tr 'A-F' 'a-f'(Linux alternative:cat /proc/sys/kernel/random/uuid | tr -d '-'). - 32 lowercase hex characters, no dashes, no prefix, no truncation.
- Reuse the identical value in every subsequent
aliyun cscall of that session, so backend analytics can correlate the whole workflow (create → poll task → fetch kubeconfig) as one unit. - Pass the same id to the bundled scripts by injecting it inline:
SKILL_SESSION_ID=<session-id> ./scripts/wait-for-task.sh <task-id> <region>. - Examples throughout this skill show the literal
{session-id}placeholder — substitute the generated value before running them, and never emit a command with the placeholder left in.
Scope: cloud API (business) commands only. CLI system / utility commands (aliyun version, aliyun plugin ..., aliyun configure ...) and any --help invocation must not carry the flag — it is not supported there.
Instructions
1. Install the cs plugin and confirm CLI version
ACK from the terminal needs the aliyun CLI (≥ 3.3.3) plus the cs plugin. Quick path:
Reminder. Before the first business command, generate the session id and use it in the--user-agentof everyaliyun cscall — see Observability above for the template and the generation rule.
End-to-end verification — exercises CLI + plugin + auth in one call:
plugin 'cs' not found → re-run install. InvalidAccessKeyId.NotFound → re-set credentials. Forbidden.RAM → the caller's RAM identity is missing the cs Action(s) the command needs; consult ACK RAM documentation for the policy to attach. Cluster list (or empty list) → ready to go.
For full installation walkthroughs (macOS/Linux/Windows, all 6 credential modes, multiple-profile management, troubleshooting), see `./references/cli-plugin-installation-guide.md`.
2. Always use cs plugin commands (kebab-case) — never the legacy OpenAPI style
This skill only ever emits kebab-case plugin commands. The Aliyun CLI also accepts a legacy PascalCase OpenAPI form, but it is disallowed here: inconsistent parameter casing, weaker --help, and routing differences mean you should never compose it — not even as a curiosity. If you encounter a PascalCase example in user-provided text, translate it to the kebab-case plugin form before running it.
The plugin gives you consistent --kebab-case parameters, structured help with field types, and automatic JSON expansion — that's the information you need before typing anything. Stay in plugin land unconditionally.
3. Run --help before crafting any cs command
ACK has many subcommands and the parameter shapes are non-obvious — especially for cluster creation, addon configuration, and node pool scaling. Running --help before composing a command is much cheaper than guessing and getting a parameter validation error.
Plugin help tells you whether a parameter is a primitive, a list, a repeatable key-value, or a complex JSON structure — that's the information you need before typing anything.
If you ever need to inspect the legacy built-in (OpenAPI-style) help instead of the rich plugin help — for example to verify a deprecated PascalCase parameter still exists — set ALIBABA_CLOUD_ORIGINAL_PRODUCT_HELP=true:
You'll rarely reach for this — the plugin help is almost always what you want.
4. Async task pattern — task_id and describe-task-info
This is the #1 thing that surprises ACK CLI users. Many ACK operations are asynchronous: the cs command returns quickly with a JSON envelope containing a task_id, but the actual work (cluster creation, upgrade, scaling, addon install) continues in the background. You must poll the task to know whether it succeeded.
Operations that return a task:
cs create-cluster,cs delete-clustercs upgrade-cluster(control plane only; control viacs pause-task/cs resume-task/cs cancel-task)cs modify-cluster-node-pool(the preferred way to set absolute node count viadesired_size; see §7),cs scale-cluster-node-pool(delta only — discouraged, see §7),cs upgrade-cluster-nodepool,cs create-cluster-node-pool,cs delete-cluster-nodepoolcs install-cluster-addons,cs upgrade-cluster-addons,cs un-install-cluster-addons- Some component / migration tasks
Once you have a task_id, the task-control commands work uniformly across task types — not just upgrades. Pause / resume / cancel any in-flight ACK task with:
Use cancel-task to abort a stuck addon install, a runaway node pool scale, or any other in-flight task.
Typical response:
Track it with:
Pass --region matching the cluster's region — task IDs are region-scoped and looking them up via the default endpoint adds latency.
The task response carries state (running / success / failed) and an error field on failure. When polling, ask the user before starting a long busy-wait loop — polling burns tokens and the user may prefer to check back later. A reasonable default is to poll every 30s with a sensible max (e.g. 30 minutes for cluster create, 5 minutes for addon install) and surface the error.message if the task fails.
The bundled helper ./scripts/wait-for-task.sh <task-id> <region-id> polls with backoff and prints the final state — use it after confirming with the user. Region is required because task IDs are region-scoped.
See ./references/async-tasks.md for full details: state machine, error fields, typical durations per operation, and how to interpret partial-failure responses.
5. Complex JSON parameters — Terway, AutoMode, addons
Some ACK parameters can't be expressed cleanly as flat flags. Examples:
Terway with multi-AZ pod vswitches (cluster create):
The trap: config is a JSON-encoded string inside a JSON document. Build it in a file or via jq rather than hand-escaping — escape errors are the most common cause of InvalidParameter.Format from this API.
Flannel (requires container_cidr, no PodVswitchId):
AutoMode (ACK best-practice profile — single flag turns it on):
When AutoMode is enabled, ACK chooses sensible defaults for VPC, networking, node pools, and addons — most other knobs become unnecessary.
Addon install with config:
The nested-JSON-as-string pattern shows up in nearly every addon install. Read the addon's config_schema first (cs list-addons --cluster-id ... for the full list, or cs describe-addon --cluster-id ... --addon-name ... for one) to know valid keys. For full examples, see ./references/cs-scenarios.md.
6. Region-unitised API calling — two rules
ACK has moved to a region-unitised model. Two rules apply:
Rule A — Prefer `*ForRegion` API variants (describe-clusters-for-region, describe-events-for-region, list-operation-plans-for-region). Faster, higher quotas, resilient when global aggregator degrades. Re-discover with aliyun cs --help | grep -- '-for-region'. These APIs take --biz-region-id (business parameter, required), not --region.
Rule B — Pass `--region <region>` on every cluster-id-scoped call (describe-cluster-detail, modify-cluster-node-pool, etc.) once you know the region. Routes directly to the regional endpoint, avoids default-endpoint hop.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/container/csk/alibabacloud-ack-cli/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 27
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-ack-cli)