huawei-cloud-ecs-show
БесплатноЗапускает вложенные скриптыНе проверен1. Show the full detail of one Huawei Cloud ECS (Elastic Cloud Server) instance by its instance ID through KooCLI (hcloud ECS ShowServer — read-only GET…
от wlc-dev384 установки в других каталогахОб этом скилле
Huawei Cloud ECS Instance Detail (Show)
Overview
Query the full detail of a single ECS instance by its instance ID through
KooCLI hcloud ECS ShowServer --cli-region=<region> --server_id=<id> (official
read-only GET /v1/{project_id}/cloudservers/{server_id}, verified in the
huaweicloudsdkecs v2 client _show_server_http_info metadata). The skill is
aimed at instance-level inspection, troubleshooting, and as a pre-query step for
other ECS workflows that need a specific server's attributes.
Architecture:
agent → python3 scripts/show_ecs.py --instance-id <server_id> [--md-file <path>]
→ hcloud ECS ShowServer --cli-region=<region> --server_id=<id>
→ Huawei Cloud ECS OpenAPI (regional endpoint) → parsed JSON
→ detail block / --json (stdout) | --md-file (Markdown written to a local file)
(hcloud binary missing) → fallback: huaweicloudsdkecs v2 EcsClient.show_server
Key properties:
- Read-only by design — the only API ever invoked is
ShowServer(GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / update / rebuild / resize / reboot / start / stop / attach / detach ...) are rejected with an explicit message before any command runs. - CLI first, SDK fallback — KooCLI is the primary execution path; when the
hcloud binary is absent, the script falls back to the official
huaweicloudsdkecsv2 SDK (show_server). Credentials are always read by the CLI profile / SDK environment — never handled by the script. - Instance-level detail output — ID / 名称 / 状态 / 规格 / 镜像 / 私网+公网
IP / 可用区 / 创建时间 / 标签 are rendered explicitly (missing fields show
-);--jsonreturns the raw server object. - Optional Markdown export —
--md-file <path>renders the same key fields as a Markdown document and writes it to the given local file (existing file is overwritten); a short confirmation is printed to stdout. This is the only code path that writes a file. - Stdout by default — without
--md-filethe script prints to stdout in every mode; it creates no file. - Offline-testable — every code path (validation, error classification, guard, SDK fallback, rendering, Markdown export) is covered by unit tests that mock the hcloud subprocess.
Out of scope: listing instances (use a list skill), cloud-side export jobs (OBS/镜像导出等), and every mutating ECS action (create / delete / start / stop / restart / resize flavor / rebuild / attach-detach volume / change image / change password). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkecsto enable the SDK fallback path. - Active credential profile — configure credentials out-of-band
(
hcloud configurein your terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself — authentication is delegated entirely to the hcloud profile / SDK environment. - IAM permission — read-only
ecs:cloudServers:get(akaecs:servers:get); least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
*.myhuaweicloud.com.
Workflow
- Confirm the target instance ID (
--instance-id, required) and the region (defaultcn-north-4); every ECS call is region-scoped. - Confirm hcloud readiness (optional, read-only):
hcloud configure list. - Run the show script with the instance ID and the desired output mode.
- Read the result — the key/detail block for humans,
--jsonfor downstream tooling, or--md-file <path>to write a Markdown document. Without--md-fileoutput is printed to stdout only; the script writes no file. - Handle the error cases per the Error Handling table below (the script prints an explicit hint for a missing ID, a 404, 403, and missing AK/SK).
Core Commands
# Key/detail block (default)
python3 scripts/show_ecs.py --instance-id 8f7c1d6a-0e2b-4a01-9c11-abcdef012345
# Raw JSON of the server object
python3 scripts/show_ecs.py --instance-id 8f7c1d6a-0e2b-4a01-9c11-abcdef012345 --json
# Export the instance detail as a Markdown document
python3 scripts/show_ecs.py --instance-id 8f7c1d6a-0e2b-4a01-9c11-abcdef012345 \
--md-file ./ecs-detail.md
# Override the region
python3 scripts/show_ecs.py --instance-id 8f7c1d6a-0e2b-4a01-9c11-abcdef012345 --region cn-south-1
# Optional project id (SDK fallback path)
python3 scripts/show_ecs.py --instance-id 8f7c1d6a-0e2b-4a01-9c11-abcdef012345 --project-id 0a1b2c3d4e5f
Equivalent direct KooCLI call (the script wraps exactly this operation):
hcloud ECS ShowServer --cli-region=cn-north
Установить huawei-cloud-ecs-show в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-ecs-show?
1. Show the full detail of one Huawei Cloud ECS (Elastic Cloud Server) instance by its instance ID through KooCLI (hcloud ECS ShowServer — read-only GET /v1/{project_id}/cloudservers/{server_id}), with an automatic fallback to the official huaweicloudsdkecs v2 SDK when hcloud is not installed. 2. Input: a single --instance-id (required); region override (--region, default cn-north-4) and an optional --project-id (SDK fallback path). 3. Output modes: key/detail block (default) covering ID / 名称 / 状态 / 规格(flavor) / 镜像 / 私网+公网 IP / 可用区 / 创建时间 / 标签, --json (raw server object) on stdout, and --md-file <path> to export the same key fields as a Markdown document to a local file. Without --md-file all output goes to stdout only — the script writes no file. 4. Explicit error hints for a missing / malformed instance ID (「实例 ID 不能 为空」), a non-existent ID (「未找到该 ECS 实例」, 404), 403 / insufficient IAM permission (「无权限访问 ECS,请检查 IAM 权限」), and missing or invalid AK/SK credentials. 5. Built-in write-intent guard: any mutating intent (create / delete / update / rebuild / resize / reboot / start / stop / attach / detach) or any operation other than ShowServer is rejected before execution — this skill is strictly read-only. 6. Triggers include: "show ECS instance", "ECS instance detail", "query ECS by id", "ECS 实例详情", "根据ID查询ECS", "查询云服务器详情", "ECS 详情", "查看ECS实例", "云服务器详情", "华为云 ECS 详情". 7. Offline unit tests (mocked hcloud subprocess) cover detail / JSON output, Markdown export, error scenarios, SDK fallback, the write-intent guard, and instance-ID validation.
Как установить скилл huawei-cloud-ecs-show?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-ecs-show запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic