huawei-cloud-cdn-export-domains
БесплатноЗапускает вложенные скриптыНе проверен1. Query the Huawei Cloud CDN (Content Delivery Network) accelerated-domain list of a tenant through KooCLI (`hcloud CDN ListDomains --cli-region=<region>`…
от wlc-dev219 установок в других каталогахОб этом скилле
Huawei Cloud CDN Accelerated-Domain List Export / Download
Overview
Query the CDN accelerated-domain list of a tenant through KooCLI
hcloud CDN ListDomains --cli-region=<region> (official read-only GET
/v1.0/cdn/domains, verified in the huaweicloudsdkcdn v1 client
_list_domains_http_info metadata), then export/download the result into a local
file (CSV / Markdown / JSON). The skill is aimed at CDN inventory inspection,
daily operations patrol, archival/hand-off of an accelerated-domain inventory,
and as a pre-query step for other CDN workflows.
Architecture:
agent → python3 scripts/export_cdn_domains.py → skill-quality-cli run ─▶ hcloud CDN ListDomains --cli-region=<region> --page_size=N --page_number=P
→ Huawei Cloud CDN OpenAPI (GET /v1.0/cdn/domains) → parsed JSON domains → render_csv/markdown/json → local file
(hcloud binary missing) → fallback: huaweicloudsdkcdn v1 CdnClient.list_domains
(missing SDK) → run scripts/ensure_env.py (auto pip install)
Key properties:
- Read-only by design — the only API ever invoked is
ListDomains(GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / update / modify / enable / disable / refresh / preheat ...) are rejected with an explicit message before any command runs. The export file is generated on the local filesystem only — no CDN write happens. - CLI first, SDK fallback — KooCLI is the primary execution path (wrapped
with
skill-quality-clifor telemetry); when the hcloud binary is absent, the script falls back to the officialhuaweicloudsdkcdnv1 SDK (list_domains). Credentials are always read by the CLI profile / SDK environment — never handled by the script. - Downloadable, name-first artifacts — CSV (union of every returned field,
domain_name/域名 first), Markdown (fixed columns with 域名 first) and JSON (raw records). A missing field renders as-; an empty domain list still produces a valid header-only artifact. Files are saved via a temporary file + atomic rename, so an interrupted write never leaves a corrupt/partial file. - Offline-testable — every code path (paging, filters, output modes, export formats, empty result, error classification, guard, SDK fallback, quality wrapper) is covered by unit tests that mock the hcloud subprocess.
Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).
Capability boundary: this skill lists and exports CDN accelerated domains only. It does not manage CDN lifecycle (create/delete/enable/disable/ update a domain, origin or config changes), refresh/preheat tasks or certificate management, and it does not write the export back to any cloud service (e.g. OBS). Those require a separate skill and explicit user confirmation (确认).
Prerequisites
- KooCLI (
hcloud) installed — the primary execution path; see references/cli-installation-guide.md. When absent, the SDK fallback is used. - Python 3.8+ with the Huawei Cloud SDK — run
python3 scripts/ensure_env.pyto installhuaweicloudsdkcoreandhuaweicloudsdkcdnautomatically. The file export itself needs no third-party package (standard library only). - Credentials configured out-of-band — the CLI reads the active hcloud
profile; the SDK fallback reads AK/SK from the whitelisted environment
variables (
HUAWEICLOUD_SDK_AK/HUAWEICLOUD_SDK_SK,HUAWEI_ACCESS_KEY/HUAWEI_SECRET_KEY,HW_*, ...). Never paste AK/SK into chat; the script never reads, echoes or stores secrets itself. - IAM permission — read-only
cdn:configuration:queryDomainList; least-privilege policy in references/iam-policies.md. - Region — CDN is global; KooCLI advertises
ListDomainsforcn-north-1andap-southeast-1(defaultcn-north-1). - Outbound HTTPS access to the CDN OpenAPI endpoint.
- skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
- Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
- Disable telemetry report: set SKILL_QUALITY_REPORT=0
Workflow
- (Optional) prepare the environment —
python3 scripts/ensure_env.pyinstalls any missing SDK dependency. - Confirm the target region (default
cn-north-1; valid valuescn-north-1/ap-southeast-1). - (Optional) confirm KooCLI readiness (read-only) — see the Core Commands block for the wrapped credential check.
- Run the export script with the desired
--formatand--output. - Read the result — for
csv/markdown/json, the printed path is the downloaded file; hand that path to the user. Fortable, display the result. - Handle the empty / error cases per the Error Handling table below.
Core Commands
Установить huawei-cloud-cdn-export-domains в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-cdn-export-domains?
1. Query the Huawei Cloud CDN (Content Delivery Network) accelerated-domain list of a tenant through KooCLI (`hcloud CDN ListDomains --cli-region=<region>`; the official read-only GET /v1.0/cdn/domains), with an automatic fallback to the official huaweicloudsdkcdn v1 SDK (CdnClient.list_domains) when hcloud is not installed. 2. Export/download the accelerated-domain list into a local file. Four output modes: `--format csv` (default, machine-readable), `markdown`/`md` (GitHub-flavored table with a **域名** column first), `json` (array of raw records) and `table` (stdout only). `--output`/`-o` sets the path (default `cdn_domains_<region>_<timestamp>.<ext>`); the parent directory is created automatically and the file is written via a temp file + atomic rename. Strictly local file generation — nothing is ever written back to the cloud. 3. Supports `--domain-name` / `--domain-status` / `--business-type` / `--service-area` / `--enterprise-project-id` / `--exact-match` / `--show-tags` filtering (all real server-side ListDomains query parameters), `--region` override and automatic `page_number` paging over the response `total` count. 4. Explicit error hints for empty domain lists (「当前区域无 CDN 加速域名」), 403 / insufficient IAM permission (「无权限访问内容分发网络(CDN)」), missing or invalid AK/SK credentials, hcloud not installed, and bad export paths. 5. Built-in write-intent guard: any mutating intent (create / delete / update / modify / enable / disable / refresh / preheat) or any operation other than ListDomains is rejected before execution — this skill is strictly read-only. 6. Triggers include: "下载CDN列表", "导出CDN加速域名", "CDN域名盘点导出", "导出/下载华为云 CDN 加速域名列表", "export cdn domains", "download cdn domain list", "CDN 加速域名导出", "cdn list export". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, page_number paging, error scenarios, the SDK fallback, the export formats and the write-intent guard.
Как установить скилл huawei-cloud-cdn-export-domains?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-cdn-export-domains запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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