huawei-cloud-mrs-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud MapReduce Service (MRS) clusters in a tenant region through KooCLI (hcloud MRS ListClusters — read-only GET…
от wlc-dev456 установок в других каталогахОб этом скилле
Huawei Cloud MRS Cluster List
Overview
Query the MRS cluster list of a tenant region through KooCLI hcloud MRS ListClusters
(official read-only GET /v1.1/{project_id}/cluster_infos, verified in the
huaweicloudsdkmrs v1 client _list_clusters_http_info metadata). The skill is aimed at
MRS inventory inspection, daily operations patrol, and as a pre-query step for other MRS
skills that need a cluster_id.
Architecture:
agent → python3 scripts/list_mrs.py → hcloud MRS ListClusters --cli-region=<region>
→ Huawei Cloud MRS OpenAPI (regional endpoint) → parsed JSON → table / --json / --names-only
Key properties:
- Read-only by design — the only API ever invoked is
ListClusters(GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / scale / restart / terminate / submit job ...) are rejected with an explicit message before any command runs. - Full-field table output — the default table renders the union of all fields returned by ListClusters (clusterId, clusterName, clusterState, billingType, version, node counts, enterprise project, tags, ...), not a trimmed subset.
- Offline-testable — every code path (paging, filters, error classification, guard) is covered by unit tests that mock the hcloud subprocess.
Out of scope: every mutating MRS action (create / delete / scale-out / scale-in / restart / patch / submit or stop jobs). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. - 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. - IAM permission — read-only
mrs:cluster:list; 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 region (default
cn-north-4); every MRS call is region-scoped. - Confirm hcloud readiness (optional, read-only):
hcloud configure list. - Run the list script with the desired output mode and filters.
- Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory. - Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, and missing AK/SK).
Core Commands
# Full-field table (default)
python3 scripts/list_mrs.py --region cn-north-4
# Raw JSON of every returned field
python3 scripts/list_mrs.py --json
# Compact cluster-name list only
python3 scripts/list_mrs.py --names-only
# Filter by cluster state
python3 scripts/list_mrs.py --cluster-state running
# Combine filters
python3 scripts/list_mrs.py --region cn-south-1 --cluster-state running --names-only
Equivalent direct KooCLI command (the script wraps exactly this call, with paging):
hcloud MRS ListClusters --cli-region=cn-north-4 --pageSize=10 --currentPage=1
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
--region / -r |
No | Huawei Cloud region (default cn-north-4) |
cn-south-1 |
--json |
No | Output the raw cluster array as JSON | — |
--names-only |
No | Output cluster names only | — |
--cluster-state |
No | Filter by cluster state | running, terminated, failed, abnormal |
--cluster-name |
No | Filter by cluster name | mrs-demo-01 |
--page-size |
No | Page size for ListClusters (default 10) | 10 |
--operation |
No | hcloud MRS operation name; only ListClusters is allowed |
ListClusters |
Output-mode precedence: --names-only → --json → table (default).
Write-Intent Guard
- The script scans all user arguments plus the
--operationvalue for mutating vocabulary (create,delete,update,scale,restart,terminate, and MRS operation names such asCreateCluster,DeleteCluster,ScaleOut). - Any hit raises
GuardError, prints[错误] 检测到写操作意图 ... 已被守卫拦截, and exits with code 1 before a single hcloud command is executed. - Only
hcloud MRS ListClusters(GET) is ever constructed bybuild_command()— there is no code path that can issue a mutating MRS API call.
KooCLI Command Format Standard
hcloud <Service> <Operation> --cli-region=<region> [--key=value ...]
- Service name — exact KooCLI title-case service name:
MRS. - Operation name — PascalCase:
ListClusters. - Region parameter —
--cli-region=<value>, e.g. `--cli-region=
Установить huawei-cloud-mrs-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-mrs-list?
1. List Huawei Cloud MapReduce Service (MRS) clusters in a tenant region through KooCLI (hcloud MRS ListClusters — read-only GET /v1.1/{project_id}/cluster_infos). 2. Three output modes: full-field table (default, every returned field), --json (raw response array), and --names-only (compact cluster-name list). 3. Supports --cluster-state filtering (running / terminated / failed / abnormal ...), --cluster-name filtering, region override, and automatic currentPage paging. 4. Explicit error hints for empty cluster lists, 403 / insufficient IAM permission, missing or invalid AK/SK credentials, and hcloud not installed. 5. Built-in write-intent guard: any mutating intent (create / delete / update / scale / restart / terminate) or any operation other than ListClusters is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list MRS clusters", "MRS cluster list", "MRS 集群列表", "查询MRS集群", "MRS inventory", "list MapReduce Service clusters", "华为云MRS列表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, paging, error scenarios, and the write-intent guard.
Как установить скилл huawei-cloud-mrs-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-mrs-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic