huawei-cloud-cdn-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud CDN (Content Delivery Network) accelerated domains in a tenant through KooCLI (hcloud CDN ListDomains — read-only GET /v1.0/cdn/domains)…
от wlc-dev326 установок в других каталогахОб этом скилле
Huawei Cloud CDN (Content Delivery Network) Accelerated Domain List
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). The
skill is aimed at CDN inventory inspection, daily operations patrol, and as a
pre-query step for other CDN workflows that need a domain name or CNAME.
Architecture:
agent → python3 scripts/list_cdn.py → hcloud CDN ListDomains --cli-region=<region>
→ Huawei Cloud CDN OpenAPI → parsed JSON → table / --json / --names-only
(hcloud binary missing) → fallback: huaweicloudsdkcdn v1 CdnClient.list_domains
Key properties:
- Read-only by design — the only API ever invoked is
ListDomains(GET). A write-intent guard scans 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. - CLI first, SDK fallback — KooCLI is the primary execution path; when the
KooCLI binary is absent, the script falls back to the official
huaweicloudsdkcdnv1 SDK (list_domains). 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 ListDomains, with
tagsflattened for readability and the key columns (域名/加速域名状态/CNAME/业务类型) first. - Offline-testable — every code path (paging, filters, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.
Out of scope: every mutating CDN action (create / delete / enable / disable / update a domain, origin or config changes, refresh / preheat tasks, certificate 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 huaweicloudsdkcdnto enable the SDK fallback path. - 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.
- IAM permission — read-only
cdn:domain:list; least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
cdn.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4); CDN accelerated domains are queried through the CDN endpoint, and the credential project is region-scoped. - Confirm KooCLI readiness (optional, read-only) by listing the active credential profile.
- 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. - 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 (default)
python3 scripts/list_cdn.py --region cn-north-4
# Raw JSON of every returned field
python3 scripts/list_cdn.py --json
# Compact accelerated-domain name list only
python3 scripts/list_cdn.py --names-only
# Filter by accelerated-domain status (server-side query parameter)
python3 scripts/list_cdn.py --domain-status online
# Filter by accelerated domain name / business type
python3 scripts/list_cdn.py --domain-name www.example.com
python3 scripts/list_cdn.py --business-type web
# Combine filters
python3 scripts/list_cdn.py --region cn-north-4 --domain-status online --names-only
Equivalent direct KooCLI command (the script wraps exactly this call, with page_number paging):
hcloud CDN ListDomains --cli-region=cn-north-4 --page_size=100 --page_number=1
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
--region / -r |
No | Huawei Cloud region (default cn-north-4) |
cn-south-1 |
--json |
No | Output the raw domain array as JSON | — |
--names-only |
No | Output accelerated-domain names only | — |
--domain-name |
No | Filter by accelerated domain name — real server-side query parameter (fuzzy match) | www.example.com |
--domain-status |
No | Filter by accelerated-domain status — real server-side query parameter | online |
--business-type |
No | Filter by business type — real server-side query parameter | web |
--service-area |
No |
Установить huawei-cloud-cdn-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-cdn-list?
1. List Huawei Cloud CDN (Content Delivery Network) accelerated domains in a tenant through KooCLI (hcloud CDN ListDomains — read-only GET /v1.0/cdn/domains), with an automatic fallback to the official huaweicloudsdkcdn v1 SDK when hcloud is not installed. 2. Three output modes: full-field table (default, every returned field including 域名/加速域名状态/CNAME/业务类型), --json (raw response array), and --names-only (compact accelerated-domain name list). 3. Supports --domain-name / --domain-status / --business-type / --service-area / --enterprise-project-id 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, and hcloud not installed. 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: "list CDN domains", "cdn list", "加速域名列表", "查询 CDN", "查询加速域名", "CDN 域名列表", "CDN 域名盘点", "list cdn domains", "accelerated domain inventory", "华为云 CDN". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, page_number paging, error scenarios, SDK fallback, and the write-intent guard.
Как установить скилл huawei-cloud-cdn-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-cdn-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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