huawei-cloud-rds-export-markdown
БесплатноЗапускает вложенные скриптыНе проверен1. Query the Huawei Cloud RDS (Relational Database Service) instance list of a tenant region through KooCLI (`hcloud RDS ListInstances`, the official…
от wlc-dev279 установок в других каталогахОб этом скилле
Huawei Cloud RDS Instance List → Markdown Export
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), then render the instance name list as a Markdown table and write it
to a local .md file. The skill is aimed at RDS inventory / asset export,
daily operations patrol, handover reports and any "save the instance list as a
Markdown file" request.
Architecture:
agent → python3 scripts/list_rds_export_markdown.py → hcloud RDS ListInstances --cli-region=<region> --limit=N --offset=O
→ Huawei Cloud RDS OpenAPI (regional endpoint) → parsed JSON → Markdown table → local .md file
(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 validates the operation name and scans the arguments; mutating intents (create / delete / update / resize / restart / stop / restore ...) are rejected with an explicit message before any command runs. The.mdfile is generated on the local filesystem only — no RDS write happens and no user confirmation can make this skill issue a write. - 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. - Local sorting —
--sort-by name|createdorders the rows in memory after the full (paged) list has been fetched; the ListInstances API has no ordering parameter.namecompares case-insensitively with an id fallback,createdcompares parsed timestamps oldest-first (ISO-8601,Z/+0800offsets and space-separated values all accepted). Records whose sort key is missing are always placed last, unparseable timestamps fall back to text comparison, and the stable sort keeps ties in their original order. Omit--sort-byto keep the API order unchanged. - Empty result is not an error — an empty instance list (or a filter that
matches nothing) still produces a valid
.mdfile with the table header and an explicit "no instances" note, and exits0. - Atomic local file — the Markdown body is written to a temporary file and renamed into place, so an interrupted write never leaves a corrupt / partial file behind.
- Offline-testable — every code path (paging, filters, rendering, atomic write, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.
Capability boundary: this skill lists instances only and exports them locally; it does not manage the instance lifecycle (create / delete / resize / restart / stop / restore backup / change password / read-replica management), and it does not export to Excel / PDF / CSV. Those require a separate skill.
Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).
Differentiation from the plain RDS list skill
The repository keeps a terminal-oriented RDS instance-list skill and this Markdown-export skill side by side. They share the same read-only API but produce different artifacts, and they are not runtime dependencies of each other.
| Dimension | Plain RDS instance-list skill | This export skill |
|---|---|---|
| Deliverable | Terminal output (table / JSON / names-only) | A local Markdown file (default rds_instances.md) |
| Persistence | None — printed to stdout only | Atomic file write + automatic parent-directory creation |
| Purpose | Interactive inspection / pre-query an instance_id for downstream use |
Markdown report export for inventory, patrol, handover |
Per-service "query + export to a file" capabilities are an established repository convention and are kept as their own skill, separate from the plain list skill and named by the export format (a sibling compute service exports to Excel, a sibling storage service exports to Excel/PDF). This skill continues that convention for RDS with Markdown as the output format. Use the plain RDS instance-list skill to view instances in the terminal; use this skill when the instance list must be saved as a distributable / archivable Markdown document.
Prerequisites
- Python 3.8+ — the Markdown export uses only the Python standard library.
For the hcloud-absent fallback, run
python3 scripts/ensure_env.pyto installhuaweicloudsdkcore/huaweicloudsdkrdsautomatically. See references/cli-installation-guide.md. - KooCLI (
hcloud) installed — the primary path. See [references/cli-installation-guide.md]
Установить huawei-cloud-rds-export-markdown в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-rds-export-markdown?
1. Query the Huawei Cloud RDS (Relational Database Service) instance list of a tenant region through KooCLI (`hcloud RDS ListInstances`, the official read-only GET /v3/{project_id}/instances), with an automatic fallback to the official huaweicloudsdkrds v3 SDK (`RdsClient.list_instances`) when hcloud is not installed. 2. Export the instance name list (plus ID / status / engine / version / flavor / private IP / availability zone / created time) into a well-formed local Markdown table file — strictly local file generation, nothing is ever written back to the cloud. `--output` sets the file path (default `rds_instances.md` in the current directory); the parent directory is created automatically and the file is written via a temp file + atomic rename. 3. Region aware: `--region` (default cn-north-4); `--project_id` is mapped to the KooCLI global `--cli-project-id`. Optional `--name` server-side filter and `--status` client-side filter (the real ListInstances API has no status parameter, so the full list is fetched first and filtered locally). Optional `--sort-by name|created` orders the exported rows locally, after the filters: `name` compares instance names case-insensitively (id fallback), `created` compares creation timestamps oldest-first. The API has no ordering parameter, so sorting is always client-side; omitting `--sort-by` keeps the API order and the previous output unchanged. 4. Explicit error classification: empty instance list (still writes the file), missing AK/SK credentials (「缺少 AK/SK 凭证」), 403 / insufficient IAM permission (「无权限访问 RDS,请检查 IAM 权限」), hcloud not installed (falls back to the SDK, else a clear hint), KooCLI usage errors, and generic API/network failures. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / stop / restore ...) or any operation other than the read-only ListInstances is rejected before execution — this skill is strictly read-only. 6. Triggers include: "查询RDS生成md文件", "导出RDS实例清单为md", "
Как установить скилл huawei-cloud-rds-export-markdown?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-rds-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