← 返回 Skills 市场
Aliyun Ecs Skill
作者
leo-jiqimao
· GitHub ↗
· v1.0.0
· MIT-0
40
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install aliyun-ecs-skill
功能描述
Manage Alibaba Cloud ECS (Elastic Compute Service) — query instances, monitoring, firewall, snapshots, remote execution. Use when user asks about ECS, 阿里云服务器...
使用说明 (SKILL.md)
Aliyun ECS 云服务器运维
管理阿里云ECS(弹性计算服务)实例。
首次使用 — 自动设置
当用户首次要求管理阿里云服务器时,按以下流程操作:
步骤 1:检查当前状态
{baseDir}/scripts/setup.sh --check-only
如果输出显示一切 OK(SDK 已安装、config 已配置、ECS 已就绪),跳到「调用格式」。
步骤 2:如果未配置,引导用户提供密钥
告诉用户:
我需要你的阿里云 API 密钥来连接 ECS 服务器。请提供:
- AccessKey ID — 阿里云 API 密钥 ID
- AccessKey Secret — 阿里云 API 密钥 Secret
你可以在 阿里云控制台 > 访问控制 > AccessKey管理 获取。
⚠️ 建议使用子账号,只授予ECS相关权限(ecs:*)
步骤 3:用户提供密钥后,运行自动设置
{baseDir}/scripts/setup.sh --access-key-id "\x3C用户提供的AccessKeyId>" --access-key-secret "\x3C用户提供的AccessKeySecret>"
脚本会自动:
- 检查并安装阿里云SDK(如未安装)
- 创建
~/.aliyun/config.json配置文件 - 写入 ECS 配置和密钥
- 验证连接
设置完成后即可开始使用。
调用格式
所有命令使用以下格式:
aliyun-ecs \x3Ccommand> [options]
或直接使用 Node.js 脚本:
node {baseDir}/src/index.js \x3Ccommand> [options]
工具总览
| 类别 | 说明 |
|---|---|
| 地域查询 | 获取可用地域列表 |
| 实例管理 | 查询、启动、停止、重启实例 |
| 监控与告警 | 获取多指标监控数据 |
| 快照管理 | 创建、删除、回滚快照 |
| 安全组 | 规则增删改查 |
| 远程命令 | 在实例上执行命令 |
常用操作
获取地域列表
aliyun-ecs regions
实例管理
# 查询实例列表
aliyun-ecs list --region cn-hangzhou
# 查询指定实例
aliyun-ecs info --region cn-hangzhou --id i-xxxxxxxxxx
# 启动实例
aliyun-ecs start --region cn-hangzhou --id i-xxxxxxxxxx
# 停止实例
aliyun-ecs stop --region cn-hangzhou --id i-xxxxxxxxxx
# 重启实例
aliyun-ecs restart --region cn-hangzhou --id i-xxxxxxxxxx
监控与告警
# 获取监控数据(CPU、内存、网络)
aliyun-ecs monitor --region cn-hangzhou --id i-xxxxxxxxxx --metrics CPUUtilization,MemoryUtilization
# 支持的监控指标:
# CPUUtilization - CPU使用率
# MemoryUtilization - 内存使用率
# InternetInRate - 公网入带宽
# InternetOutRate - 公网出带宽
# DiskReadIOPS - 磁盘读IOPS
# DiskWriteIOPS - 磁盘写IOPS
快照管理
# 创建快照
aliyun-ecs snapshot create --region cn-hangzhou --id i-xxxxxxxxxx --name "backup-20260312"
# 列出快照
aliyun-ecs snapshot list --region cn-hangzhou --id i-xxxxxxxxxx
# 删除快照
aliyun-ecs snapshot delete --region cn-hangzhou --snapshot-id s-xxxxxxxxxx
# 回滚快照
aliyun-ecs snapshot rollback --region cn-hangzhou --id i-xxxxxxxxxx --snapshot-id s-xxxxxxxxxx
安全组(防火墙)
# 查询安全组规则
aliyun-ecs security-group list --region cn-hangzhou --group-id sg-xxxxxxxxxx
# 添加安全组规则(开放80端口)
aliyun-ecs security-group add --region cn-hangzhou --group-id sg-xxxxxxxxxx --port 80 --protocol tcp
# 删除安全组规则
aliyun-ecs security-group remove --region cn-hangzhou --group-id sg-xxxxxxxxxx --port 80 --protocol tcp
远程命令执行 (云助手)
# 在 Linux 实例上执行命令
aliyun-ecs exec --region cn-hangzhou --id i-xxxxxxxxxx --command "uptime && df -h && free -m"
# 在 Windows 实例上执行命令
aliyun-ecs exec --region cn-hangzhou --id i-xxxxxxxxxx --command "Get-Process | Sort-Object CPU -Descending | Select-Object -First 10" --windows
使用规范
- Region 参数规则: 除
regions外,所有操作都必须传入--region参数 - 首次使用流程: 先调用
regions获取地域列表 → 再调用list获取实例列表 → 记住 InstanceId 和 Region 供后续使用 - 危险操作前先确认: 安全组修改、实例停止/重启、快照回滚等,先向用户确认
- 错误处理: 如果调用失败,先用
setup.sh --check-only诊断问题 - 建议子账号: 为了安全,建议用户使用子账号AccessKey,只授予ECS相关权限
安全使用建议
Install only if you want an agent to help administer Alibaba Cloud ECS. Use a dedicated RAM user with least privilege, avoid broad ecs:* if possible, review every stop/restart/snapshot/security-group action before approval, restrict firewall source CIDRs, and know that the skill stores your AccessKey in ~/.aliyun/config.json.
功能分析
Type: OpenClaw Skill
Name: aliyun-ecs-skill
Version: 1.0.0
The skill bundle is a legitimate administrative tool for managing Alibaba Cloud ECS instances using official SDKs (@alicloud/openapi-client). It facilitates environment setup via `scripts/setup.sh`, which correctly stores credentials locally in `~/.aliyun/config.json` and performs a connection test. The `SKILL.md` provides clear instructions for the AI agent, including security best practices like confirming dangerous operations and recommending RAM sub-accounts. While the tool handles sensitive API keys and provides broad infrastructure control, its logic is entirely consistent with its stated purpose, and no evidence of data exfiltration or malicious intent was found.
能力评估
Purpose & Capability
The artifacts are broadly coherent with the stated ECS management purpose: they use Alibaba Cloud ECS SDK calls for regions, instances, monitoring, snapshots, and security groups. These are legitimate but high-impact cloud administration capabilities.
Instruction Scope
The skill documents a confirmation rule for dangerous operations, but the CLI code shown directly performs actions such as stopping instances once invoked. Firewall rule creation also defaults to a world-open source CIDR.
Install Mechanism
Installation uses npm dependencies with version ranges. This is expected for a Node-based cloud SDK skill, but there is no lockfile shown and the install metadata under-declares the ECS SDK package used by the code.
Credentials
Registry requirements declare no primary credential or config path, while the skill asks for Alibaba Cloud AccessKey credentials and stores them in a local Aliyun config profile for ongoing use.
Persistence & Privilege
The setup script writes AccessKey ID and Secret to ~/.aliyun/config.json. Even with chmod 600, this creates persistent cloud account authority that can affect ECS instances, disks, snapshots, and security groups.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install aliyun-ecs-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/aliyun-ecs-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of aliyun-ecs-skill.
- Manage Alibaba Cloud ECS: query instances, monitor metrics, manage security groups, snapshots, and execute remote commands.
- Guides users through first-time setup, including SDK installation and API key configuration.
- Provides detailed CLI usage examples for all major ECS operations.
- Includes safety best practices: region parameter enforcement, user confirmation for critical actions, and error diagnosis steps.
- Documentation available in both Chinese and English for key workflows and best practices.
元数据
常见问题
Aliyun Ecs Skill 是什么?
Manage Alibaba Cloud ECS (Elastic Compute Service) — query instances, monitoring, firewall, snapshots, remote execution. Use when user asks about ECS, 阿里云服务器... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 40 次。
如何安装 Aliyun Ecs Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install aliyun-ecs-skill」即可一键安装,无需额外配置。
Aliyun Ecs Skill 是免费的吗?
是的,Aliyun Ecs Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Aliyun Ecs Skill 支持哪些平台?
Aliyun Ecs Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Aliyun Ecs Skill?
由 leo-jiqimao(@leo-jiqimao)开发并维护,当前版本 v1.0.0。
推荐 Skills