Command Palette

Search for a command to run...

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

huawei-cloud-dns-list

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

1. List Huawei Cloud DNS (云解析服务) zones and record sets in a tenant through KooCLI (hcloud DNS ListPublicZones / ListPrivateZones / ListRecordSets — read-only…

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

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

Huawei Cloud DNS (云解析服务) Zone / Record-Set List

Overview

Query the DNS (云解析服务) zone and record-set inventory of a tenant through KooCLI hcloud DNS ListPublicZones / ListPrivateZones / ListRecordSets (official read-only GET /v2/zones and /v2/recordsets, verified in the huaweicloudsdkdns v2 client _list_public_zones_http_info / _list_private_zones_http_info / _list_record_sets_http_info metadata). The skill is aimed at DNS inventory inspection, daily operations patrol, and as a pre-query step for other skills that need a zone id or a domain name.

Architecture:

agent → python3 scripts/list_dns.py → hcloud DNS ListPublicZones --cli-region=<region>
      → Huawei Cloud DNS OpenAPI (dns.<region>.myhuaweicloud.com) → parsed JSON → table / --json / --names-only
      → (--output) atomic UTF-8 Markdown file (dns_zones.md / dns_recordsets.md)

(hcloud binary missing) → fallback: huaweicloudsdkdns v2 DnsClient.list_public_zones / list_private_zones / list_record_sets

Key properties:

  • Read-only by design — the only APIs ever invoked are the list operations (ListPublicZones / ListPrivateZones / ListRecordSets, all GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / associate / transfer / enable / disable / import / export / batch) 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 huaweicloudsdkdns v2 SDK. 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 the list API (public/private zones carry name / zone_type / status / record_num / email / ttl; record sets carry name / type / ttl / records / zone_name).
  • Markdown export (additional, opt-in) — --output / -o [FILE] renders the same columns as the default table into a UTF-8 Markdown table and writes it atomically (temp file + os.replace). The stdout modes are unchanged; the export is skipped for --json / --names-only. Default file names are dns_zones.md (zone view) and dns_recordsets.md (--recordsets view); an empty result still produces a header-only file.
  • Global resource note — public zones are a global resource; call them in cn-north-4 (default). Private zones and record sets are regional.
  • Offline-testable — every code path (marker paging, filters, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating DNS action (create / update / delete a zone or record set, transfer, enable/disable, batch import/export). 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 huaweicloudsdkdns 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 DNS REST paths are /v2/zones and /v2/recordsets; 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 dns:zone:list (and dns:recordset:list for --recordsets); least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only — argparse / json / subprocess).
  6. Outbound HTTPS access to dns.cn-north-4.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4; public zones are a global resource served from 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, --names-only for a compact inventory; add --output [FILE] to also save the table view as a Markdown file for patrol records / delivery.
  5. Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, and missing AK/SK).

Core Commands

# Full-field table of public zones (default)
python3 scripts/list_dns.py --region cn-north-4

# Private zones
py
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. List Huawei Cloud DNS (云解析服务) zones and record sets in a tenant through KooCLI (hcloud DNS ListPublicZones / ListPrivateZones / ListRecordSets — read-only GET /v2/zones and /v2/recordsets), with an automatic fallback to the official `huaweicloudsdkdns` v2 SDK when hcloud is not installed. 2. Three output modes: full-field table (default, every returned field including 域名/ID/类型/状态/记录集数/邮箱/TTL), --json (raw response array), and --names-only (compact domain-name list). 3. Markdown export: --output / -o [FILE] writes the current table view to a UTF-8 Markdown file (zone view default dns_zones.md, --recordsets view default dns_recordsets.md), atomically (temp file + rename) and prints the absolute path; an empty result still writes a header-only file. 4. Supports --type public|private, --recordsets, --id / --name / --record-type filtering (all real server-side ListZones / ListRecordSets query parameters), region override, and automatic marker paging. 5. Explicit error hints for empty lists (「当前区域无 DNS 域名」), 403 / insufficient IAM permission (「无权限访问云解析服务(DNS)」), API error bodies returned on stdout with exit code 0 (`DNS.1802` / `not authorized` / `no identity-based policy` envelopes are never reported as an empty list), missing or invalid AK/SK credentials, missing project_id on the SDK fallback, hcloud not installed, and Markdown write failure. 6. Built-in write-intent guard: any mutating intent (create / delete / update / associate / transfer / enable / disable / import / export / batch) or any operation other than the three list operations is rejected before execution — this skill is strictly read-only. The --output value is caller data and is excluded from the guard scan. 7. Triggers include: "list DNS zones", "DNS 域名列表", "查询 DNS", "云解析", "公网域名列表", "私网域名列表", "DNS 记录集", "dns zone inventory", "list public zones", "list record sets", "华为云 DNS", "导出 DNS 清单", "DNS Markdown 导出", "export DNS to markdown". 8. Offline unit tests (mocked hcloud subprocess) cover output modes

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

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

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

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

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

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