Command Palette

Search for a command to run...

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

huawei-cloud-gaussdb-list

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

1. List Huawei Cloud GaussDB (云数据库 GaussDB for MySQL) instances in a tenant region through KooCLI (`hcloud GaussDB ListGaussMySqlInstances`, the official…

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

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

Huawei Cloud GaussDB Instance List

Overview

Query the GaussDB (云数据库 GaussDB for MySQL, the TaurusDB-compatible service) instance list of a tenant region through KooCLI hcloud GaussDB ListGaussMySqlInstances (official read-only GET /v3/{project_id}/instances, verified in the huaweicloudsdkgaussdb v3 client _list_gauss_my_sql_instances_http_info metadata). The skill is aimed at GaussDB inventory inspection, daily operations patrol, and as a pre-query step for other GaussDB skills that need an instance_id.

Architecture:

agent → python3 scripts/list_gaussdb.py
      → hcloud GaussDB ListGaussMySqlInstances --cli-region=<region> --limit=N --offset=O
      → Huawei Cloud GaussDB OpenAPI (gaussdb.<region>.myhuaweicloud.com)
      → parsed JSON instances → local status filter → table / --json / Markdown file

(hcloud binary missing) → fallback: huaweicloudsdkgaussdb v3 GaussDBClient.list_gauss_my_sql_instances

Key properties:

  • Read-only by design — the only API ever invoked is ListGaussMySqlInstances (GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / resize / restart / stop / backup / restore / bind / unbind ...) are rejected with an explicit message before any command runs.
  • CLI first, SDK fallback — KooCLI is the primary execution path; when the KooCLI binary is absent, the script falls back to the official huaweicloudsdkgaussdb v3 SDK. Credentials are always read by the CLI profile / whitelisted SDK environment variables — never handled by the script.
  • Table by default, JSON / Markdown on demand — the default output is an aligned table with the common GaussDB fields; --json prints the raw instance array for downstream tooling; --format md / -o FILE writes the same fields as a Markdown table file (atomic write, pipe/newline escaping, default name gaussdb_instances_<region>_<timestamp>.md).
  • Server-side fuzzy name filter & automatic paging — --name is the real ListGaussMySqlInstances query parameter; the API only performs fuzzy matching when the value starts with *, so the script adds the leading * automatically. Paging uses --limit (1~100) + --offset and is fetched automatically until total_count is reached.
  • Read-only smoke cases included — templates/test-vars.json lists the three read-only hcloud GaussDB ListGaussMySqlInstances smoke cases (instance list / name filter / paging) used for verification.

Out of scope: every mutating GaussDB action (create / delete / specification change / restart / backup / restore / password reset / database or user management). The GaussDB(for openGauss) variant is covered by a separate skill and is intentionally not duplicated here.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkgaussdb 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 GaussDB REST path is /v3/{project_id}/instances; when falling back to the SDK, supply the project id via --project-id or the HUAWEICLOUD_SDK_PROJECT_ID / HUAWEI_PROJECT_ID environment variables. The KooCLI path resolves it from the profile automatically.
  4. IAM permission — read-only gaussdb:instance:list; least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only — argparse / json / subprocess).
  6. Outbound HTTPS access to gaussdb.cn-north-4.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4).
  2. Confirm KooCLI readiness (optional, read-only) by listing the active credential profile.
  3. Run the list script with the desired output mode and filters.
  4. Read the result — table for humans, --json for downstream tooling.
  5. Handle the empty / error cases per the Error Handling table below (the script prints an explicit hint for empty region, 403, and missing AK/SK).

Core Commands

In production, wrap every hcloud invocation with skill-quality-cli run --skill-name huawei-cloud-gaussdb-list -- — bare hcloud calls are reserved for the read-only smoke runner.

# Default: full-field table of the region's GaussDB instances
python3 scripts/list_gaussdb.py --region cn-north-4

# Raw JSON array of every returned field
python3 scripts/list_gaussdb.py --json

# Server-side fuzzy name filter (leading * added automatically → *gauss-demo)
python3 scripts/list_gaussdb.p
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. List Huawei Cloud GaussDB (云数据库 GaussDB for MySQL) instances in a tenant region through KooCLI (`hcloud GaussDB ListGaussMySqlInstances`, the official read-only GET /v3/{project_id}/instances), with an automatic fallback to the official `huaweicloudsdkgaussdb` v3 SDK (`GaussDBClient.list_gauss_my_sql_instances`) when KooCLI is not installed. 2. Default output is an aligned Chinese-header table (名称/实例ID/状态/引擎/引擎版本/规格/CPU内存/存储类型/存储/私网IP/公网IP/ 端口/类型/区域/VPC/子网/创建时间); `--json` prints the raw instance array; `--format md` / `-o FILE` exports the same fields as a Markdown table file (default `gaussdb_instances_<region>_<timestamp>.md`). 3. Supports `--region` override (default cn-north-4), `--name` server-side fuzzy filtering (a leading `*` is added when missing), `--status` client-side exact filtering (the real API has no status parameter), and automatic `limit`/`offset` paging until the reported total is reached. 4. Ambiguous / empty results are explained explicitly: 「当前区域(<x>)无 GaussDB 实例」, 403 / insufficient IAM permission, missing AK/SK credentials, and network / API failures. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / stop / backup / restore / bind / unbind ...) or any operation other than `ListGaussMySqlInstances` is rejected before a single command runs — this skill is strictly read-only. 6. Triggers include: "查询 GaussDB 实例列表", "GaussDB 实例列表", "GaussDB inventory", "list GaussDB instances", "华为云 GaussDB 实例", "GaussDB MySQL 实例清单", "查询云数据库 GaussDB 实例", "GaussDB list".

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

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

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

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

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

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