agentleFS
HambaobaoHambaobao/hambaobao-skills/skills/aliyun-cli/SKILL.md

aliyun-cli

Skill2 starsChanged 8 months agoMITView on GitHub

Manage Alibaba Cloud resources using the Aliyun CLI tool. Use this skill whenever the user wants to manage any Alibaba Cloud resource via the aliyun CLI, including: ECS instances, VPC networking, OSS object storage, RDS databases, SLB/CLB load balancers, RAM users/roles/policies, DNS records, or aliyun CLI setup and authentication. If the user mentions "阿里云", "Alibaba Cloud", "aliyun", "ECS", "VPC", "OSS", "RDS", "SLB", "RAM", "ACR", "Container Registry", or any Alibaba Cloud service, use this skill.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. felixzhang-glitch/AliyunCli-SKILLS★ 6same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the relevant reference file before responding to a request.

    line 43
  2. Very specific:

    Every aliyun command follows this structure:

    line 47
  3. Distinctive:

    Before constructing any command:

    line 61
  4. Very specific:

    If the user hasn't specified a region, ask or use aliyun configure get to find the default.

    line 66
  5. Distinctive:

    If the user hasn't provided one, first run a Describe/List command to find it.

    line 69
  6. Very specific:

    Use --PageSize 100 and --PageNumber to retrieve more.

    line 72
  7. Distinctive:

    Default: JSON (structured, good for parsing)

    line 80
  8. Very specific:

    zsh gotcha: If you use rows=Instances.Instance[], the [] will be interpreted as a glob by zsh and cause a "no matches found" error.

    line 86
  9. Distinctive:

    When the user asks to perform an operation on a named resource (e.g., "restart my server called web-prod"):

    line 96
  10. Very specific:

    If the user has not yet installed or configured the CLI, read references/setup.md and guide them through it before attempting any commands.

    line 118
  11. Distinctive:

    Never expose or log AccessKey secrets — remind users to use RAM roles or environment variables instead of hardcoding credentials

    line 127
  12. Distinctive:

    When the user needs to operate on multiple resources (e.g., "list all instances in all regions"), you can run several commands and combine …

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Aliyun CLI Skill

This skill teaches you how to use the Aliyun CLI to manage Alibaba Cloud resources. You will construct and explain aliyun commands, interpret their output, and guide users through cloud resource management tasks.

Quick Reference

ResourceReference FileCommon Operations
Setup & Authreferences/setup.mdinstall, configure, switch profiles
ECS (Elastic Compute Service)references/ecs.mdlist, start/stop/reboot, resize disk, create snapshot
VPC (Virtual Private Cloud)references/vpc.mdmanage VPCs, VSwitches, EIPs, NAT gateways, route tables
OSS (Object Storage Service)references/oss.mdbuckets, upload/download, sync, presigned URLs
RDS (Relational Database Service)references/rds.mdinstances, databases, accounts, backups, IP whitelist
SLB / CLB (Load Balancer)references/slb.mdcreate LB, manage listeners, add/remove backend servers
RAM (Resource Access Management)references/ram.mdusers, groups, roles, policies, access keys
DNS (AliDNS)references/dns.mdlist domains, add/update/delete records
ACR (Container Registry)references/acr.mdinstances, namespaces, repositories, image tags, docker login

Read the relevant reference file before responding to a request.

CLI Syntax Pattern

Every aliyun command follows this structure:

aliyun <Product> <Operation> [--Parameter Value ...]
  • Product: service name in PascalCase or lowercase (e.g., ecs, oss, vpc, rds, ram)
  • Operation: API action name in PascalCase (e.g., DescribeInstances, StartInstance)
  • Parameters: prefixed with -- (e.g., --RegionId cn-hangzhou, --InstanceId i-xxxx)

OSS is an exception — it uses a subcommand style like aliyun oss ls, aliyun oss cp.

Always Check These First

Before constructing any command:

  1. Region — Most operations require --RegionId. Common regions:
    • cn-hangzhou (Hangzhou), cn-beijing (Beijing), cn-shanghai (Shanghai)
    • cn-shenzhen (Shenzhen), ap-southeast-1 (Singapore), us-west-1 (US West)
    • If the user hasn't specified a region, ask or use aliyun configure get to find the default.
  2. Resource IDs — Most mutating operations (start, stop, delete) need a specific resource ID. If the user hasn't provided one, first run a Describe/List command to find it.
  3. Pagination — Describe* APIs return paginated results. Default page size is typically 10. Use --PageSize 100 and --PageNumber to retrieve more. Mention this if results seem incomplete.
  4. Dry run — Aliyun CLI does not have a universal dry-run flag. For destructive operations, always confirm resource IDs with the user before executing.

Output Formats

The CLI supports multiple output formats via the --output flag:

  • Default: JSON (structured, good for parsing)
  • --output cols=<col1>,<col2> — tabular output for quick scanning
  • --output table — aligned table

For human-readable summaries, use --output cols=InstanceId,InstanceName,Status style where available.

zsh gotcha: If you use rows=Instances.Instance[], the [] will be interpreted as a glob by zsh and cause a "no matches found" error. Quote the argument to avoid this:

aliyun ecs DescribeInstances \
  --output 'cols=InstanceId,InstanceName,Status' 'rows=Instances.Instance[]'

Or simply omit rows= and use the default JSON output when tabular formatting isn't critical.

Common Workflow Pattern

When the user asks to perform an operation on a named resource (e.g., "restart my server called web-prod"):

  1. Discover — Run a Describe command to find the resource ID
    aliyun ecs DescribeInstances --RegionId cn-hangzhou
  2. Confirm — Show the result and confirm the target with the user if there's any ambiguity
  3. Act — Run the mutating command with the confirmed resource ID
  4. Verify — Optionally run another Describe to confirm the new state

Error Handling

Common errors and what to do:

ErrorCauseSolution
InvalidAccessKeyIdWrong or expired credentialsRun aliyun configure to reconfigure
Forbidden.RAMInsufficient RAM permissionsCheck RAM policy for required action
IncorrectInstanceStatusWrong instance state for operationDescribe instance status first
InvalidRegionIdUnsupported region for this productCheck product availability in that region
ThrottlingAPI rate limit hitAdd a brief delay and retry

If the user has not yet installed or configured the CLI, read references/setup.md and guide them through it before attempting any commands.

Safety Guidelines

  • For destructive operations (delete instance, release EIP, drop RDS database), always:
    1. Show the user what will be deleted with a Describe command first
    2. Explicitly ask for confirmation before running the delete command
  • For cost-incurring operations (create ECS, purchase bandwidth), mention the cost implications
  • Never expose or log AccessKey secrets — remind users to use RAM roles or environment variables instead of hardcoding credentials

Parallelism

When the user needs to operate on multiple resources (e.g., "list all instances in all regions"), you can run several commands and combine the results. For shell loops:

for region in cn-hangzhou cn-beijing cn-shanghai cn-shenzhen ap-southeast-1; do
  echo "=== $region ==="
  aliyun ecs DescribeInstances --RegionId $region
done

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.