huawei-cloud-rds-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud RDS (cloud database) instances in a tenant region through KooCLI (hcloud RDS ListInstances — read-only GET /v3/{project_id}/instances)…
от wlc-dev590 установок в других каталогахОб этом скилле
Huawei Cloud RDS Instance List
Overview
Query the RDS instance list of a tenant region through KooCLI
hcloud RDS ListInstances (official read-only GET /v3/{project_id}/instances,
verified in the huaweicloudsdkrds v3 client _list_instances_http_info
metadata). The skill is aimed at RDS inventory inspection, daily operations
patrol, and as a pre-query step for other RDS skills that need an instance_id.
Architecture:
agent → python3 scripts/list_rds.py → hcloud RDS ListInstances --cli-region=<region>
→ Huawei Cloud RDS OpenAPI (regional endpoint) → parsed JSON
→ table / --json / --names-only / Markdown or CSV file
(--format md|csv / --output)
(hcloud binary missing) → fallback: huaweicloudsdkrds v3 RdsClient.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 / stop / restore ...) 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
huaweicloudsdkrdsv3 SDK (list_instances). Credentials are always read by the CLI profile / SDK environment — never handled by the script. - Full-field table output — the default table renders the union of all
fields returned by ListInstances, with
datastoreflattened into engine/engineVersion andprivate_ipsjoined for readability. - Optional Markdown export —
--format md(or--output <path>, which implies md) writes a valid Markdown table (Chinese headers + separator + rows) to a local file, atomically (temp file +os.replace). Omitting the export flags keeps the existing terminal output byte-for-byte unchanged. - Optional CSV export —
--format csv(or--output <path>.csv, which implies csv) writes the same columns behind the same Chinese headers as the Markdown export, encoded UTF-8 with BOM (utf-8-sig, so Excel andpandas.read_csvdetect the encoding without extra flags), CRLF row endings, and standardcsv-module escaping for commas / double quotes / newlines. Empty results still write the header row (exit 0), and writes are atomic exactly like the Markdown path (CSV 文件写出失败on failure, no partial file left behind). - Offline-testable — every code path (paging, filters, error classification, guard, SDK fallback, Markdown/CSV render/write) is covered by unit tests that mock the hcloud subprocess.
Out of scope: every mutating RDS action (create / delete / resize / restart / stop / restore backup / change password / read-replica management). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkrdsto enable the SDK fallback path. - Active credential profile — configure credentials out-of-band
(
hcloud configurein your terminal, or 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. - IAM permission — read-only
rds:instance:list; least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
*.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4); every RDS call is region-scoped. - Confirm hcloud readiness (optional, read-only):
hcloud configure list. - Run the list script with the desired output mode and filters.
- Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory,--format md/--outputfor a Markdown report file,--format csv/--output *.csvfor a CSV file (Excel / pandas ready; inventory / patrol / handover). - Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, missing AK/SK, and Markdown / CSV write failures).
Core Commands
# Full-field table (default)
python3 scripts/list_rds.py --region cn-north-4
# Raw JSON of every returned field
python3 scripts/list_rds.py --json
# Compact instance-name list only
python3 scripts/list_rds.py --names-only
# Filter by instance status (client-side: full list fetched, then filtered
# locally — the RDS ListInstances API has no status query parameter)
python3 scripts/list_rds.py --status ACTIVE
# Filter by engine / name
python3 scripts/list_rds.py --datastore-type MySQL --name rds-demo
# Combine filters
python3 scripts/list_rds.py -
Установить huawei-cloud-rds-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-rds-list?
1. List Huawei Cloud RDS (cloud database) instances in a tenant region through KooCLI (hcloud RDS ListInstances — read-only GET /v3/{project_id}/instances), with an automatic fallback to the official huaweicloudsdkrds v3 SDK when hcloud is not installed. 2. Four output modes: full-field table (default, every returned field including 名称/ID/状态/引擎/规格/私网IP/可用区), --json (raw response array), --names-only (compact instance-name list), plus two local file exports: Markdown (--format md / --output <path>.md) and CSV (--format csv / --output <path>.csv, UTF-8 BOM + standard CSV escaping, Excel/pandas friendly), both with the same Chinese headers for inventory/patrol/ handover reports. 3. Supports --status / --name / --datastore-type / --instance-id filtering, region override, and automatic offset paging. --name / --datastore-type / --instance-id are real ListInstances query parameters; --status is applied client-side (full list fetched first, then filtered locally) because the real RDS ListInstances API has no status parameter. 4. Explicit error hints for empty instance lists (「当前区域无 RDS 实例」), 403 / insufficient IAM permission (「无权限访问 RDS,请检查 IAM 权限」), missing or invalid AK/SK credentials, and hcloud not installed. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / stop / restore) or any operation other than ListInstances is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list RDS instances", "RDS instance list", "RDS 实例列表", "查询RDS实例", "云数据库列表", "RDS inventory", "list cloud database instances", "华为云RDS列表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, paging, error scenarios, SDK fallback, Markdown/CSV export (BOM, escaping, atomic write, empty table, extension inference), and the write-intent guard.
Как установить скилл huawei-cloud-rds-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-rds-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