Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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-devот 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

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md.
  2. Active credential profile — configure credentials out-of-band (hcloud configure in 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.
  3. IAM permission — read-only mrs:cluster:list; least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess).
  5. Outbound HTTPS access to *.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4); every MRS call is region-scoped.
  2. Confirm hcloud readiness (optional, read-only): hcloud configure list.
  3. Run the list script with the desired output mode and filters.
  4. Read the result — table for humans, --json for downstream tooling, --names-only for a compact inventory.
  5. 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 --operation value for mutating vocabulary (create, delete, update, scale, restart, terminate, and MRS operation names such as CreateCluster, 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 by build_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=
Полный SKILL.md на ClawHub

Установить 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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-mrs-list с