with one click
cli
阿里云 CLI (aliyun) 安装配置、ECS 管理、OSS 操作、安全组、DNS、SLB 常用命令
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
阿里云 CLI (aliyun) 安装配置、ECS 管理、OSS 操作、安全组、DNS、SLB 常用命令
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | 阿里云 CLI 操作 |
| description | 阿里云 CLI (aliyun) 安装配置、ECS 管理、OSS 操作、安全组、DNS、SLB 常用命令 |
| version | 1.0.0 |
# macOS
brew install aliyun-cli
# Linux
curl -fsSL https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz | tar xz
sudo mv aliyun /usr/local/bin/
# 配置认证(交互式)
aliyun configure
# 需要 AccessKey ID、AccessKey Secret、Region(如 cn-hangzhou)
# 验证
aliyun ecs DescribeRegions --output cols=RegionId,LocalName
AccessKey 建议使用 RAM 子账号而非主账号,并遵循最小权限原则。
# 列出实例
aliyun ecs DescribeInstances --RegionId cn-hangzhou \
--output cols=InstanceId,InstanceName,Status,PublicIpAddress
# 启动/停止/重启
aliyun ecs StartInstance --InstanceId i-xxx
aliyun ecs StopInstance --InstanceId i-xxx
aliyun ecs RebootInstance --InstanceId i-xxx
# 查看实例详情
aliyun ecs DescribeInstanceAttribute --InstanceId i-xxx
# 查看实例监控
aliyun cms DescribeMetricLast --Namespace acs_ecs_dashboard \
--MetricName CPUUtilization --Dimensions '[{"instanceId":"i-xxx"}]'
# 列出安全组
aliyun ecs DescribeSecurityGroups --RegionId cn-hangzhou \
--output cols=SecurityGroupId,SecurityGroupName
# 查看规则
aliyun ecs DescribeSecurityGroupAttribute --SecurityGroupId sg-xxx
# 添加入方向规则(开放 8080 端口)
aliyun ecs AuthorizeSecurityGroup \
--SecurityGroupId sg-xxx \
--IpProtocol tcp \
--PortRange 8080/8080 \
--SourceCidrIp 0.0.0.0/0 \
--Description "Allow 8080"
# 删除规则
aliyun ecs RevokeSecurityGroup \
--SecurityGroupId sg-xxx \
--IpProtocol tcp \
--PortRange 8080/8080 \
--SourceCidrIp 0.0.0.0/0
# 安装 ossutil(独立工具,操作更方便)
curl -fsSL https://gosspublic.alicdn.com/ossutil/install.sh | bash
ossutil config # 配置 Endpoint、AccessKey
# 列出 Bucket
ossutil ls
# 上传/下载
ossutil cp localfile.tar.gz oss://mybucket/backups/
ossutil cp oss://mybucket/backups/file.tar.gz ./
ossutil cp -r ./dist/ oss://mybucket/static/ --update # 增量同步目录
# 列出文件
ossutil ls oss://mybucket/backups/ --limited-num 20
# 删除
ossutil rm oss://mybucket/old-backup.tar.gz
# 列出域名
aliyun alidns DescribeDomains --output cols=DomainName,DomainStatus
# 查看解析记录
aliyun alidns DescribeDomainRecords --DomainName example.com \
--output cols=RecordId,RR,Type,Value,TTL
# 添加 A 记录
aliyun alidns AddDomainRecord \
--DomainName example.com \
--RR www \
--Type A \
--Value 1.2.3.4 \
--TTL 600
# 修改记录
aliyun alidns UpdateDomainRecord \
--RecordId xxx \
--RR www \
--Type A \
--Value 5.6.7.8
# 删除记录
aliyun alidns DeleteDomainRecord --RecordId xxx
# 列出实例
aliyun slb DescribeLoadBalancers --RegionId cn-hangzhou \
--output cols=LoadBalancerId,LoadBalancerName,Address,LoadBalancerStatus
# 查看后端服务器
aliyun slb DescribeHealthStatus --LoadBalancerId lb-xxx
# 添加后端服务器
aliyun slb AddBackendServers --LoadBalancerId lb-xxx \
--BackendServers '[{"ServerId":"i-xxx","Weight":"100"}]'
# 本月账单
aliyun bssopenapi QueryBill --BillingCycle "$(date +%Y-%m)"
生成或审计模块的 SPEC.md。使用场景:用户要求"给 XX 模块写 spec"、"审计所有 spec"、"检查 spec 是否过期"。
Automates SailFish release workflow: fix build/type errors, update CHANGELOG (EN + CN), run npm version with pre/post hooks. Use when the user asks to release, 发版, 发布, bump version, or update changelog.
后端代码修改后,通过 CLI 测试验证功能正确性。使用场景:修改了 electron/services/ 下的代码需要测试、准备提交代码前跑回归、用户要求"跑测试"/"验证一下"。
完成新功能开发或较大修改后,使用本机 Claude CLI 进行代码审查。
使用 ts-morph 静态分析工具查询代码结构(类层次、方法签名、引用、依赖等),替代手动读源码。使用场景:需要了解类的方法/属性、继承链、符号引用、文件结构、依赖关系时。
When committing or staging changes, only include files related to the current task or conversation; do not stage or commit unrelated modifications. Use when the user asks to commit, stage, 提交, or when preparing to run git add/commit.