安装与下载
1 ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install huawei-cloud-ecs-lifecycle
2 手动安装
将技能文件夹复制到以下位置之一
~/.openclaw/skills/
{'/skills/'}
优先级:工作区 › 全局 › 内置
3 提示词安装
将此提示词复制到 Openclaw 即可自动安装。
请帮我使用 Clawhub 安装 skill-huawei-cloud-ecs-lifecycle。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
基本信息
huawei-cloud-ecs-lifecycle
安装指南
- ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install huawei-cloud-ecs-lifecycle - 手动安装
将技能文件夹复制到以下位置之一
全局模式
~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置 - 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 huawei-cloud-ecs-lifecycle。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
下载技能 (.zip)
什么是
华为云 ECS 生命周期管理是一款 Openclaw Skills 工具,可通过华为云 KooCLI 操作弹性云服务器实例,并可在需要时使用 huaweicloudsdkecs Python SDK 作为备用方案。它支持通过筛选条件和分页列出实例、查询详细信息、创建实例、批量启动/停止/重启、批量重命名和删除,还能直接回答基本的 ECS 问题。
该工作流优先保障云操作安全:只读查询可直接执行,而每项变更操作都必须先获得用户明确确认。此技能还会处理区域和目标解析、报告操作结果,并建议在操作完成后验证状态变更。
应用场景
按名称、状态、规格、IP 地址、标签或企业项目查找 ECS 实例,并浏览分页结果。
在准备维护或诊断实例时查看服务器详情。
确认请求的规格、镜像、VPC、磁盘和网络设置后,创建一个或多个按需付费 ECS 实例。
启动、正常停止或重启单台或多台服务器,并提示强制操作和未保存数据的相关风险。
重命名服务器或删除实例,并在确认后清楚处理 EIP 和数据卷释放选项。
提出有关规格、计费模式、登录方式和服务器状态的基本 ECS 问题。
工作原理
将请求分类为 ECS 知识问题、只读查询或状态变更操作。
根据请求或当前 KooCLI 配置解析区域,并使用提供的 ID 或列表查询确定目标服务器。
对于查询,构造并运行带有请求筛选条件、分页设置和参数的相应 KooCLI ECS 命令。
对于变更,展示确切操作及参数,说明计费或数据丢失等相关风险,并等待用户明确确认。
通过 KooCLI 执行已确认的操作。如果 CLI 失败,则在可用时使用华为云 ECS Python SDK 备用方案。
返回结果,例如实例详情、受影响的 ID 或作业 ID;建议后续执行列表查询以验证状态变更。
配置指南
按照技能的 references/cli-installation-guide.md 安装并认证华为云 KooCLI(hcloud)。
确保已认证的 IAM 身份具有 references/iam-policies.md 中说明的最低权限 ECS 权限。
选择账户的华为云区域。明确传入 --cli-region,或使用当前 CLI 配置文件的默认区域。
仅在 SDK 备用路径中,安装 Python 3.8+ 和 huaweicloudsdkecs 软件包。
向技能提供所需的资源标识符和配置,例如服务器 ID、镜像和规格 ID、VPC 和子网 ID,以及创建实例所需的安全组 ID。
只读查询示例:
hcloud ECS ListServersDetails --cli-region=cn-north-4 --limit=25 --name=my-ecs --status=ACTIVE
详情查询示例:
hcloud ECS ShowServer --cli-region=cn-north-4 --server_id=
在用户明确确认确切操作和参数之前,不得执行变更命令。在本地测试期间,可设置 SKILL_QUALITY_DISABLE=1 以禁用非阻塞质量报告。
数据架构
此技能使用华为云 ECS 资源和 KooCLI 命令参数;输入未指定单独的持久化实例数据库或生成的基础设施状态文件。
数据或元数据 组织方式和用途
服务器身份 server_id 中的 ECS UUID,或 servers.1.id 等索引批量字段
区域和项目 传入 --cli-region 或从当前配置文件读取;根据凭证自动解析 project_id
查询筛选条件 可选的名称、状态、规格、IP、标签、企业项目和分页参数
创建配置 名称、规格、镜像、VPC、系统盘类型、子网、安全组、可选可用区、数量和登录配置
生命周期设置 批量服务器 ID;停止和重启类型(SOFT 或 HARD);删除公有 IP 和卷的选项
质量报告元数据 跟踪 ID、成功/失败/取消状态、错误代码、耗时,以及已屏蔽的输入/输出;报告采用静默失败方式,并可通过环境变量配置
参考文档位于 references/ 下,包括 IAM 策略、CLI 安装、操作验证、数据流图和验收标准。质量报告由 scripts/skill_quality_sdk.py 实现。
高级特性
批量操作支持启动、停止、重启、重命名和删除多台服务器,但须遵守相应操作文档规定的限制。
列表功能支持筛选和分页,包括页大小、偏移量、标记、状态、名称、规格、IP、标签和企业项目。
主要通过 KooCLI 执行;如果 CLI 执行失败(例如认证或权限错误),可回退到
huaweicloudsdkecs
。
支持正常(
SOFT
)和强制(
HARD
)停止/重启模式,并明确警告可能丢失未保存数据。
对于文档所述支持的创建和重命名命令,提供
--dry_run
预检查选项。
删除时可选择释放已绑定的公有 IP 和已附加的数据卷;删除卷可能导致数据丢失。
集成可选的质量报告功能,可配置端点、超时、技能名称和禁用开关;报告不会阻塞操作,并采用静默失败方式。
可处理未知服务器 ID、冲突的筛选条件、缺失的网络配置、过大的分页限制和未指定区域等边缘情况。
name: huawei-cloud-ecs-lifecycle
description: |
Manage the full lifecycle of Huawei Cloud ECS (Elastic Cloud Server) instances — create, list, show
details, start, stop, reboot, rename, and delete cloud servers — plus basic ECS knowledge Q&A.
Covers CRUD plus power-state orchestration (start/stop/reboot) with batch support, pagination,
and filters. All mutating operations require explicit user confirmation before execution.
Triggers include: "创建云服务器", "删除云服务器", "启动云服务器", "停止云服务器", "重启云服务器",
"修改云服务器名称", "查询云服务器列表", "查询云服务器详情", "ECS生命周期管理", "ECS运维",
"create ecs", "delete ecs", "start ecs", "stop ecs", "reboot ecs", "ecs lifecycle",
"弹性云服务器管理", "云服务器增删改查".
tags: [huawei-cloud, ecs, lifecycle, management, computing]
Huawei Cloud ECS Lifecycle Management
Full lifecycle management for Huawei Cloud Elastic Cloud Server (ECS) — from provisioning to decommissioning, including power-state orchestration and instance queries.
Overview
This Skill manages the complete lifecycle of ECS (Elastic Cloud Server) instances on Huawei Cloud using the KooCLI ECS service (with the huaweicloudsdkecs Python SDK as fallback):
Capability Operations Actions
Query ListServersDetails, ShowServer List instances with filters/pagination; show instance detail
Create CreateServers Create one or more pay-per-use cloud servers
Power state BatchStartServers, BatchStopServers, BatchRebootServers Start / stop / reboot (batch)
Update BatchUpdateServersName Rename one or more servers
Delete DeleteServers Delete one or more servers (optional EIP/data volume release)
Knowledge — Basic ECS FAQ (flavors, billing, auth, network, disk) answered inline
Scope note: All mutating operations (create / delete / start / stop / reboot / rename) are executed only after explicit user confirmation. Query operations are safe to run anytime.
Prerequisites
KooCLI (hcloud) installed and authenticated — see references/cli-installation-guide.md
Region — pass --cli-region=cn-north-4 (use the account's region; e.g. cn-north-4), or the active CLI profile default is used
IAM permissions — the authenticated account needs the ECS permissions listed in references/iam-policies.md (least privilege)
Python 3.8+ with huaweicloudsdkecs (only needed for the SDK fallback path)
Quality Reporting Environment Variables
Environment Variable Required Description
SKILL_QUALITY_ENDPOINT No 上报地址,默认 https://skillsapi.developer.myhuaweicloud.com/api/quality/report
SKILL_QUALITY_GUEST_ENDPOINT No Guest (unauthenticated) report endpoint
SKILL_QUALITY_NAME No Skill name (auto-detected)
SKILL_QUALITY_DISABLE No Set 1 to disable reporting (local debugging)
SKILL_QUALITY_TIMEOUT No Report timeout in seconds (default 3)
Workflow
Classify the request — knowledge question (answer inline from the Overview/FAQ below and official docs) or an ECS operation.
Resolve the target server(s) — for instance-specific operations, get server_id from the user, or list instances first (ListServersDetails) if the ID is unknown.
Query operations — build the command with the requested filters and execute directly.
Mutating operations — present the exact command and parameters to the user, wait for explicit confirmation, then execute. If the CLI fails (e.g. SDK/permission error), fall back to the huaweicloudsdkecs SDK equivalent.
Report — return the operation result (job ID, affected instance IDs, or detailed instance info) and, for state-change operations, suggest verifying with ListServersDetails.
Core Commands
All commands below use --cli-region=cn-north-4 as the example region; use the authenticated account's region instead (or rely on the CLI profile default). Required parameters are always shown; the most common optional parameters are included. Parameter names were verified against the KooCLI --help output of each ECS operation. Example names/IDs are placeholders to be replaced with real values from the user's environment.
List ECS instances
hcloud ECS ListServersDetails --cli-region=cn-north-4 --limit=25 --name=my-ecs --status=ACTIVE
Parameter Required Type Description
--cli-region Yes (auto) string Region, agent fills automatically --project_id Yes (auto) string Project ID, auto-resolved from credentials --limit No integer Page size, default 25, max 1000 --offset No integer Page number, >= 0 (0 == page 1), default 1 --name No string Instance name, fuzzy match (e.g. --name=my-ecs) --status No string ACTIVE / BUILD / SHUTOFF / REBOOT / ERROR / ... --flavor No string Flavor ID filter --ip / --ip_eq No string IPv4 fuzzy / exact match --server_id No string Exact IDs, comma-separated (