huawei-cloud-dcs-export-markdown
БесплатноЗапускает вложенные скриптыНе проверен1. Query the Huawei Cloud DCS (Distributed Cache Service, Redis / Memcached) instance list of a tenant region through KooCLI (`hcloud DCS ListInstances`, the…
от wlc-dev203 установки в других каталогахОб этом скилле
Huawei Cloud DCS Instance List → Markdown Export
Overview
Query the DCS (Distributed Cache Service, Redis / Memcached) instance list of a
tenant region through KooCLI hcloud DCS ListInstances (official read-only GET
/v2/{project_id}/instances, verified in the huaweicloudsdkdcs v2 client
_list_instances_http_info metadata), with a fallback to the official
huaweicloudsdkdcs v2 SDK, and export the result into a local Markdown
report. The skill is aimed at cloud cache inventory, daily operations patrol,
and Markdown-report style deliverables.
Architecture:
agent → python3 scripts/list_dcs_export_markdown.py → skill-quality-cli run ─▶ hcloud DCS ListInstances --cli-region=<region> --limit=N --offset=O
→ Huawei Cloud DCS OpenAPI (regional endpoint) → parsed JSON instances → export_markdown → .md / table / json
(hcloud binary missing) → fallback: huaweicloudsdkdcs v2 DcsClient.list_instances
(missing SDK) → run scripts/ensure_env.py (auto pip install)
Key properties:
- Read-only by design — the only API ever invoked is
ListInstances(GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / update / resize / restart / flush / clear / restore / backup / freeze ...) are rejected with an explicit message before any command runs. The Markdown file is generated on the local filesystem only — no DCS write happens. - CLI first, SDK fallback — KooCLI is the primary execution path (wrapped
with
skill-quality-clifor telemetry); when the hcloud binary is absent, the script falls back to the officialhuaweicloudsdkdcsv2 SDK (list_instances). Credentials are read from the hcloud profile or the SDK environment — never handled by the script. - Well-formed Markdown — a fixed header row (名称 / ID / 引擎 / 版本 / 容量 /
规格 / 状态 / 连接地址 / 端口 / 可用区) plus one data row per instance, with a
-fallback for missing fields and an optional summary line (--summary). The report is saved via a temporary file + atomic rename, so an interrupted write never leaves a corrupt/partial.mdbehind. - No broken files — an empty instance list, missing credentials or a
permission failure print an explicit hint on stdout/stderr and do not
produce a
.mdfile. - Offline-testable — every code path (paging, filters, output modes, Markdown format, error classification, guard, SDK fallback, quality wrapper) is covered by unit tests that mock the hcloud subprocess.
Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).
Capability boundary: this skill lists instances only. It does not manage instance lifecycle (create/delete/resize/restart/flush/restore), does not export flavors, and does not write the report back to any cloud service. Those require a separate skill and explicit user confirmation.
Prerequisites
- Python 3.8+ with the Huawei Cloud SDK — run
python3 scripts/ensure_env.pyto installhuaweicloudsdkcoreandhuaweicloudsdkdcsautomatically. The Markdown export itself needs no third-party package. See references/cli-installation-guide.md. - KooCLI (
hcloud) installed — the optional primary execution path; see references/cli-installation-guide.md. When absent, the SDK fallback is used. - Credentials configured out-of-band — the CLI reads the active hcloud
profile; the SDK fallback reads AK/SK from the whitelisted environment
variables (
HUAWEI_ACCESS_KEY/HUAWEI_SECRET_KEY,HUAWEICLOUD_SDK_AK/HUAWEICLOUD_SDK_SK,HW_*, ...). Never paste AK/SK into chat; the script never reads, echoes or stores secrets itself. - project_id (SDK fallback only) — the DCS REST path is
/v2/{project_id}/instances; supply the project id via--project-idor theHUAWEICLOUD_SDK_PROJECT_ID/HUAWEI_PROJECT_IDenvironment variables. The KooCLI path resolves it from the profile automatically. - IAM permission — read-only
dcs:instance:list; least-privilege policy in references/iam-policies.md. - Outbound HTTPS access to
dcs.<region>.myhuaweicloud.com.
- 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
- (Optional) prepare the environment —
python3 scripts/ensure_env.pyinstalls any missing SDK dependency. - Confirm the target region (default
cn-north-4). - (Optional) confirm KooCLI readiness (read-only) — see the Core Commands block for the wrapped credential check.
- Run the script with the desired output mode (
--format mdfor the report,table/jsonotherwise
Установить huawei-cloud-dcs-export-markdown в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-dcs-export-markdown?
1. Query the Huawei Cloud DCS (Distributed Cache Service, Redis / Memcached) instance list of a tenant region through KooCLI (`hcloud DCS ListInstances`, the official read-only GET /v2/{project_id}/instances), with an automatic fallback to the official huaweicloudsdkdcs v2 SDK (DcsClient.list_instances) when hcloud is not installed. 2. Export the instance list into a well-formed local Markdown table (headers 名称 / ID / 引擎 / 版本 / 容量 / 规格 / 状态 / 连接地址 / 端口 / 可用区, missing fields render `-`, optional summary line) — strictly local file generation, nothing is ever written back to the cloud. `--output` sets the path (default `dcs_instances_<region>_<timestamp>.md`); the parent directory is created automatically and the file is written via a temp file + atomic rename. 3. Three output modes: `--format md` (default) / `table` / `json`. Region aware: `--region` (default cn-north-4). Optional `--name` / `--name-equal` / `--instance-id` / `--ip` / `--status` / `--tags` server-side filters and `--page-size` (default 100); paging follows the reported `instance_num`. 4. Explicit error classification: missing AK/SK credentials (「缺少 AK/SK 凭证」), hcloud not installed (falls back to SDK, else a clear hint), invalid/insufficient credentials (403 / 401 → IAM hint), KooCLI usage errors, and generic API/network failures. Empty instance lists produce a friendly hint and never a corrupt Markdown file. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / flush / clear / restore / backup / freeze ...) or any operation other than the read-only ListInstances is rejected before execution — this skill is strictly read-only. 6. Triggers include: "查询 DCS 生成 md", "DCS 实例列表导出 Markdown", "dcs markdown", "导出 DCS 实例为 Markdown 文件", "DCS 实例报表", "缓存实例列表 Markdown", "Redis 实例 Markdown", "DCS instance list markdown", "export DCS instances to markdown", "dcs 报表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, paging, Markdown format correctness,
Как установить скилл huawei-cloud-dcs-export-markdown?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-dcs-export-markdown запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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