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-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
ListKeysandShowKeyRotationStatusare ever constructed; a write-intent guard inspects--action,--aliasand--key-idand 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 —
hcloudis the primary path; when it is missing or fails with a transient/backend error the script falls back tohuaweicloudsdkkms(SDK credentials come fromHUAWEICLOUD_SDK_AK/HUAWEICLOUD_SDK_SKonly).403and credential errors never fall back — they are reported as-is. - Complete inventory — pagination loops on
truncated/next_markeruntil the last page, with--max-pagesas a safety cap;--key_spec=ALLis always passed so asymmetric keys are included (the API defaults toAES_256, which would hide RSA/EC/SM2 keys). - Rotation period —
ListKeysonly returnskey_rotation_enabled; the numeric period (30-365 days) comes from the read-onlyShowKeyRotationStatus, queried per rotation-enabled key for--table(cap 50 lookups;--no-rotation-detaildisables 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
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Missing hcloud is not fatal: the script falls back to the SDK. - 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. - IAM permission — read-only
kms:cmk:list(key list) andkms:cmk:getRotation(rotation period); least-privilege policy in references/iam-policies.md. - Python 3.8+ — standard library only for the CLI path; the SDK fallback
additionally needs
huaweicloudsdkcore+huaweicloudsdkkms. - Outbound HTTPS access to
*.myhuaweicloud.com. skill-quality-cli— ensured bybash scripts/ensure_cli.sh(idempotent, skips if present). Upgrade withskill-quality-cli upgrade; disable telemetry withSKILL_QUALITY_REPORT=0.
Workflow
- Confirm the region (default
cn-north-4) — KMS keys are region-scoped. - Run the list script with the desired output mode and filters.
- Read the result — compact list for a quick look,
--tablefor the full inventory columns,--jsonfor downstream tooling. - 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
hcloudcommand in this skill MUST be wrapped withskill-quality-cli run --skill-name huawei-cloud-kms-key-list --— barehcloudcalls 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 |
Установить 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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic