Command Palette

Search for a command to run...

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

huawei-cloud-cdm-list

БесплатноЗапускает вложенные скриптыНе проверен

1. Query the Huawei Cloud CDM (Cloud Data Migration) clusters of the current account through KooCLI (`hcloud CDM ListClusters --cli-region=<region>`; official…

wlc-devот wlc-dev195 установок в других каталогах

Об этом скилле

Huawei Cloud CDM Cluster List

Overview

Query the Huawei Cloud CDM (Cloud Data Migration, 云数据迁移) clusters of the current account through KooCLI hcloud CDM ListClusters --cli-region=<region> (official read-only GET /v1.1/{project_id}/clusters, verified in the huaweicloudsdkcdm v1 client _list_clusters_http_info metadata), plus single-cluster details via hcloud CDM ShowClusterDetail --cluster_id=<uuid>. The skill is aimed at daily ops inspection / 巡检, pre-migration cluster inventory (迁移前盘点), and troubleshooting failed or frozen clusters.

Architecture:

agent → python3 scripts/list_cdm_clusters.py → skill-quality-cli ─▶ hcloud CDM ListClusters | ShowClusterDetail --cli-region=<region>
      → Huawei Cloud CDM OpenAPI → parsed JSON → table / json / markdown / csv

(hcloud binary missing) → fallback: huaweicloudsdkcdm v1 CdmClient (BasicCredentials; project_id auto-resolved via IAM)
(missing SDK)           → run scripts/ensure_env.py  (auto pip install)

Key properties:

  • Read-only by design — the only operations ever constructed are ListClusters and ShowClusterDetail (both GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / update / restart / resize / start / stop / expand ...) and CDM write operations (CreateCluster / DeleteCluster / RestartCluster / StartCluster / StopCluster / ModifyCluster ...) are rejected with an explicit message before any command runs.
  • CLI first, SDK fallback — KooCLI is the primary execution path (wrapped with skill-quality-cli for telemetry); when the hcloud binary is absent, the script falls back to the official huaweicloudsdkcdm v1 SDK. Credentials are always read by the CLI profile / SDK environment — never handled by the script. BasicCredentials may omit the project id: the SDK queries IAM and resolves it for the region automatically.
  • No fake paging — the official ListClusters API takes no query parameters (verified: ListClustersRequest.attribute_map == {}), so one call returns the full list; --max-calls is only a defensive ceiling and is never sent to the API. Repeated calls return the same page, so records are de-duplicated by cluster id and the loop stops once a call adds nothing new.
  • Client-side filtering — --name and repeatable --status (code or Chinese meaning, multi-value = union) filter the returned clusters locally.
  • Offline-testable — the guard, command construction, error classification (including the permission envelope returned on stdout with rc=0), client-side filters, SDK fallback, renderers, atomic export and a real-subprocess fake hcloud binary are covered by offline unit tests (no credentials, no network).

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Capability boundary: this skill lists/queries CDM clusters and their details only. It does not create, delete, restart, resize or reconfigure clusters, does not touch CDM jobs/links (作业/连接), and never writes anything back to the cloud. Those require a separate skill and explicit user confirmation (确认).

Prerequisites

  1. KooCLI (hcloud) installed — the primary execution path; see references/cli-installation-guide.md. When absent, the SDK fallback is used.
  2. Python 3.8+ with the Huawei Cloud SDK — run python3 scripts/ensure_env.py to install huaweicloudsdkcore and huaweicloudsdkcdm automatically. Rendering itself needs only the standard library.
  3. Credentials configured out-of-band — the CLI reads the active hcloud profile; the SDK fallback reads AK/SK from the whitelisted environment variables (HUAWEICLOUD_SDK_AK / HUAWEICLOUD_SDK_SK, CLOUD_SDK_AK / CLOUD_SDK_SK, HUAWEI_* / HW_* / HWC_*, plus optional HUAWEICLOUD_SDK_PROJECT_ID). Never paste AK/SK into chat; the script never reads, echoes or stores secrets itself.
  4. IAM permission — read-only cdm:cluster:list (ListClusters) and cdm:cluster:get (ShowClusterDetail); least-privilege policy in references/iam-policies.md.
  5. Region — cn-north-4 by default (CDM endpoint https://cdm.<region>.myhuaweicloud.com).
  6. Outbound HTTPS access to the CDM OpenAPI endpoint.
  • skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Workflow

  1. (Optional) prepare the environment — python3 scripts/ensure_env.py installs any missing SDK dependency.
  2. Pick filters — --name for a name substring, repeatable --status for status codes or Chinese meanings (e.g. --status 300 --status 303, --status 冻结); combine freely.
  3. Run the script with the
Полный SKILL.md на ClawHub

Установить huawei-cloud-cdm-list в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-cdm-list?

1. Query the Huawei Cloud CDM (Cloud Data Migration) clusters of the current account through KooCLI (`hcloud CDM ListClusters --cli-region=<region>`; official read-only GET /v1.1/{project_id}/clusters), with an automatic fallback to the huaweicloudsdkcdm v1 SDK (CdmClient) when KooCLI is absent. 2. Two read-only views: the project-wide cluster list (default, ListClusters) and single-cluster details incl. instance status (ShowClusterDetail, GET /v1.1/{project_id}/clusters/{cluster_id}) via --cluster-id. 3. Four output modes: aligned key-field table (default: id / name / status / status_detail / status_meaning / version / instance_count / instances / flavor_name / az_name / public_endpoint / is_frozen / created / updated), `--json` (raw API records), `--markdown` (GitHub-flavored table) and `--csv`; `--output` writes a file via a temp file + atomic rename. 4. Filters: `--name` (case-insensitive substring) and repeatable `--status` (status code 100/200/300/303/500/800/900/910/920 or Chinese meaning such as 正常/失败/冻结), both applied client-side — the official ListClusters API takes no query parameters at all (verified against ListClustersRequest.attribute_map being empty), so one call returns the whole list. 5. Explicit error hints for empty cluster lists, 403 / missing `cdm:cluster:list` permission, missing AK/SK credentials, a missing KooCLI backend, and bad export paths. 6. Built-in write-intent guard: any mutating intent (create / delete / update / restart / resize / start / stop / expand ...) or any operation outside the two read-only ones is rejected before execution — this skill is strictly read-only. 7. Triggers include: "CDM 集群列表", "查询云数据迁移集群", "CDM 集群巡检", "cdm list clusters", "CDM cluster status", "迁移前集群盘点", "CDM 集群详情", "华为云 CDM 集群".

Как установить скилл huawei-cloud-cdm-list?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-cdm-list запускает скрипты?

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

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

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