Command Palette

Search for a command to run...

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

huawei-cloud-dcs-list

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

1. List Huawei Cloud DCS (Distributed Cache Service, Redis / Memcached) instances in a tenant region through KooCLI (hcloud DCS ListInstances — read-only GET…

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

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

Huawei Cloud DCS Instance List

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 — resource_path: "/v2/{project_id}/instances", method: "GET"). The skill is aimed at DCS inventory inspection, daily operations patrol, and as a pre-query step for other DCS skills that need an instance_id.

Architecture:

agent → python3 scripts/list_dcs.py → hcloud DCS ListInstances --cli-region=<region>
      → Huawei Cloud DCS OpenAPI (dcs.<region>.myhuaweicloud.com) → parsed JSON → names list / table / --json / markdown (+ optional --md-output file) / csv (+ optional --csv-output file, --csv-bom)

(hcloud binary missing) → fallback: huaweicloudsdkdcs v2 DcsClient.list_instances

Key properties:

  • Read-only by design — the only API ever invoked is ListInstances (GET). A write-intent guard scans 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.
  • CLI first, SDK fallback — KooCLI is the primary execution path; when the hcloud binary is absent, the script falls back to the official huaweicloudsdkdcs v2 SDK (DcsClient.list_instances). Credentials are always read by the CLI profile / whitelisted SDK environment variables — never handled by the script.
  • Name list by default — the default output mode is the compact instance-name list (「DCS 实例名称列表」); --table renders the full-field table, --json the raw response array, and --md / --format md a Markdown table.
  • Markdown output shares the export contract — --md prints a fixed ten-column GitHub-flavored table (名称/ID/引擎/版本/容量/规格/状态/连接地址/ 端口/可用区) identical to the DCS export-markdown 口径; missing fields render -, | is escaped as \| and line breaks collapse to a space, so a value can never break the table. --md-output <path> additionally writes exactly that text through a temp file + atomic rename (失败非零退出、不留 残缺文件); an empty list prints only the friendly hint — no header, no file.
  • CSV output is RFC4180 — --csv / --format csv prints the same ten columns (名称/ID/引擎/版本/容量/规格/状态/连接地址/端口/可用区) with missing fields as an empty string; commas, double quotes and line breaks are quoted by the standard csv module (QUOTE_MINIMAL, CRLF line endings), never hand-escaped. --csv-output [<path>] writes exactly the stdout bytes atomically (temp file + fsync + rename, parent dirs created); without a path (or when pointing at a directory) the default name dcs_instances_<region>_<timestamp>.csv is used. --csv-bom prepends the UTF-8 BOM (EF BB BF) to both stdout and the file for spreadsheet tools. --csv is a standalone mode: combining it with --md / --json / --table / --names-only / a different --format exits 1. --csv-output / --csv-bom outside CSV mode also exit 1.
  • Server-side filters & automatic paging — --name / --instance_id / --ip / --status / --tags are real ListInstances query parameters (verified against hcloud DCS ListInstances --help); paging uses --limit (1~1000) + --offset and is fetched automatically until instance_num is reached.
  • Optional client-side ordering — --sort-by name orders the fully paged (and locally filtered) result by instance name, case-insensitive (missing name falls back to instance_id); --sort-by created orders by created_at ascending (ISO8601, missing values last). Both are stable and applied to every output mode (names / table / json / md / csv); without --sort-by the API order is kept unchanged. Ordering is client-side only — it is never sent to the service.
  • Offline-testable — every code path (filters, paging, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating DCS action (create / delete / resize / restart / flush / clear data / restore backup / reset password / upgrade / IP exchange). Those require a dedicated write-capable skill and explicit user confirmation.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkdcs to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (run the KooCLI configure command in your terminal, or set 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 / SDK environment.
  3. project_id (SDK fallback only) — the DCS REST path is
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. List Huawei Cloud DCS (Distributed Cache Service, Redis / Memcached) instances in a tenant region through KooCLI (hcloud DCS ListInstances — read-only GET /v2/{project_id}/instances), with an automatic fallback to the official huaweicloudsdkdcs v2 SDK when hcloud is not installed. 2. Default output is the compact instance-name list (名称列表, also available via --names-only); --table renders the full-field table (名称/ID/引擎/版本/容量/规格/状态/连接地址/端口/可用区), --json outputs the raw response array, --md / --format md prints a GitHub-flavored Markdown table with the same fixed ten columns as export-markdown 口径 (缺失字段渲染 `-`, `|` 转义为 `\|`, 换行转空格), and --csv / --format csv prints an RFC4180 CSV table with the same ten columns (缺失字段为空字符串, 逗号/双引号/换行由标准 csv 模块 转义, CRLF 行尾). --md-output <path> / --csv-output [<path>] 可把表格原子 落盘(内容与 stdout 一致);--csv-output 省略路径或传目录时用默认文件名 dcs_instances_<region>_<timestamp>.csv;--csv-bom 输出 UTF-8 BOM. 3. Supports --name (server-side fuzzy query, plus --name-equal exact match), --instance-id / --ip / --status / --tags filtering (all real server-side ListInstances query parameters), region override, optional --sort-by name|created (client-side ascending order: case-insensitive instance name or created_at, missing values last, stable), and automatic limit/offset paging. 4. Explicit error hints for empty instance lists (「当前区域无 DCS 实例」), 403 / insufficient IAM permission (「无权限访问分布式缓存服务(DCS)」), missing or invalid AK/SK credentials, missing project_id on the SDK fallback, and hcloud not installed. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / flush / clear / restore / backup / freeze) or any operation other than ListInstances is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list DCS instances", "DCS instance list", "查询 DCS 实例列表", "DCS 实例列表", "Redis 实例列表", "缓存实例列表", "查询缓存实例", "DCS inventory", "list cache instances", "华为云 DCS 列表", "DCS 实例 Markdown 表格", "导出 DCS 实例 Markdown", "DC

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

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

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

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

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

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