Command Palette

Search for a command to run...

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

huawei-cloud-kms-key-list

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

1. Query the Huawei Cloud KMS (Data Encryption Workshop / 数据加密服务) master keys (CMK) of the current account in one region, strictly read-only. Primary path…

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

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

Huawei Cloud KMS Key List

Overview

Inventory the KMS master keys (CMK) of a tenant region through KooCLI hcloud KMS ListKeys, returning alias, key ID, state, usage, type, rotation status and creation time. Aimed at key inventory (密钥盘点), compliance review (合规核对), daily patrol (日常巡检), and as a pre-query step for other KMS tasks that need a key ID.

Operation REST path Method Purpose
KMS ListKeys /v1.0/{project_id}/kms/list-keys POST list all CMKs of the region
KMS ShowKeyRotationStatus /v1.0/{project_id}/kms/get-key-rotation-status POST rotation interval of one CMK

Architecture:

agent → python3 scripts/list_kms_keys.py [--region=<region>] [--table|--json]
      → hcloud KMS ListKeys --cli-region=<region> --limit=<n> [--marker=<m>]
        └─ (hcloud missing / failed) → huaweicloudsdk KMS SDK ListKeys
      → Huawei Cloud KMS OpenAPI → parsed JSON → compact list / table / JSON

Key properties:

  • Read-only by design — only ListKeys and ShowKeyRotationStatus are ever constructed; a write-intent guard inspects --action, --alias and --key-id and rejects mutating intent (create / enable / disable / schedule-deletion / cancel-deletion / rotate / create-grant ...) before any command runs. Write operations (if ever needed) require a dedicated write-capable skill and explicit user confirmation.
  • CLI first, SDK fallback — hcloud is the primary path; when it is missing or fails with a transient/backend error the script falls back to huaweicloudsdkkms (SDK credentials come from HUAWEICLOUD_SDK_AK / HUAWEICLOUD_SDK_SK only). 403 and credential errors never fall back — they are reported as-is.
  • Complete inventory — pagination loops on truncated / next_marker until the last page, with --max-pages as a safety cap; --key_spec=ALL is always passed so asymmetric keys are included (the API defaults to AES_256, which would hide RSA/EC/SM2 keys).
  • Rotation period — ListKeys only returns key_rotation_enabled; the numeric period (30-365 days) comes from the read-only ShowKeyRotationStatus, queried per rotation-enabled key for --table (cap 50 lookups; --no-rotation-detail disables it, failures degrade to 开启 instead of aborting).
  • No files written — everything goes to stdout; secrets are delegated to the KooCLI profile or environment.
  • Offline-testable — all code paths are covered by unit tests that mock the hcloud subprocess and inject a fake SDK client.

Out of scope: creating / enabling / disabling / deleting / scheduling deletion of keys, rotation changes, grant management, cross-region aggregation, and key-material export.

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

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Missing hcloud is not fatal: the script falls back to the SDK.
  2. Active credential profile — configure credentials out-of-band (run the KooCLI configure command in your terminal, or export HUAWEICLOUD_SDK_AK / HUAWEICLOUD_SDK_SK). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself.
  3. IAM permission — read-only kms:cmk:list (key list) and kms:cmk:getRotation (rotation period); least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ — standard library only for the CLI path; the SDK fallback additionally needs huaweicloudsdkcore + huaweicloudsdkkms.
  5. Outbound HTTPS access to *.myhuaweicloud.com.
  6. skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present). Upgrade with skill-quality-cli upgrade; disable telemetry with SKILL_QUALITY_REPORT=0.

Workflow

  1. Confirm the region (default cn-north-4) — KMS keys are region-scoped.
  2. Run the list script with the desired output mode and filters.
  3. Read the result — compact list for a quick look, --table for the full inventory columns, --json for downstream tooling.
  4. Handle the empty / error cases per the Edge Cases table (the script prints an explicit, actionable hint for each of them).

Core Commands

⚠️ Mandatory: every hcloud command in this skill MUST be wrapped with skill-quality-cli run --skill-name huawei-cloud-kms-key-list -- — bare hcloud calls are strictly forbidden.

List keys (default compact output)

skill-quality-cli run --skill-name huawei-cloud-kms-key-list -- python3 scripts/list_kms_keys.py --region={region}

Under the hood the skill runs:

`hcloud KMS ListKeys --cli-region=<region> --limit=<n> --key_spec=ALL [--marker=<m>]`
Parameter Required Description
--cli-region
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. Query the Huawei Cloud KMS (Data Encryption Workshop / 数据加密服务) master keys (CMK) of the current account in one region, strictly read-only. Primary path: KooCLI `hcloud KMS ListKeys` (read-only POST /v1.0/{project_id}/kms/list-keys); when hcloud is unavailable or fails, fall back to the official `huaweicloudsdk` KMS SDK (huaweicloudsdkkms). 2. Output modes: a compact list of 别名 | 密钥ID | 状态 (default), a full 8-column table with --table (密钥ID / 别名 / 状态 / 密钥用途 / 密钥类型 / 轮转周期 / 创建时间 / region), and --json for the raw merged response body. 3. Filters: --alias (exact match, --fuzzy for substring), --key-id, --state (client-side; 1-5 or enabled/disabled/pending-deletion/pending-import/ pending-activation), --region (default cn-north-4). 4. Pagination: --limit 1-200 with automatic paging driven by the response fields truncated / next_marker / total. 5. Built-in read-only guard: any mutating intent (create / enable / disable / schedule-deletion / cancel-deletion / rotate / create-grant / delete / update ...) is rejected before execution with exit code 1 — this skill never writes to KMS. 6. Explicit error hints for an empty key list, 403 / insufficient IAM permission, missing credentials, missing hcloud, and KooCLI [USE_ERROR]. 7. Triggers include: "list KMS keys", "KMS 密钥列表", "查询KMS密钥", "密钥盘点", "CMK 列表", "密钥轮转状态", "KMS 巡检", "kms key inventory", "list cmk", "华为云KMS密钥". 8. Offline unit tests cover routing, pagination, output modes, filters, error classification and the write-intent guard (mock hcloud subprocess + fake SDK client).

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

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

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

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

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

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