huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis

Claude Code and agent skill by huaweicloud/huaweicloud-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Diagnose CDN domain DNS resolution issues using hcloud CLI and Python DNS probes. Query the CDN domain detail to obtain the expected CNAME, probe the actual DNS resolution of the domain via scripts/dns_resolve.py (dnspython) to collect resolved IP addresses, and verify the IP attribution against Huawei Cloud CDN via ShowIpInfo/v2 to determine whether the domain has been correctly resolved to Huawei Cloud CDN. Use this skill when the user wants to: (1) diagnose CDN DNS resolution failures, (2) check why a domain is not resolved to Huawei Cloud CDN, (3) verify DNS configuration for CDN domain access, (4) troubleshoot DNS anomaly or resolution timeout issues. Triggers include: "DNS解析诊断", "DNS异常", "域名解析失败", "CDN解析异常", "DNS配置", "DNS diagnosis", "resolution diagnosis". User utterance examples: "域名解析不到华为云CDN", "CNAME 配置了但没生效", "DNS 解析超时了", "解析出来的 IP 不是华为云的", "域名没解析到 CDN". Do NOT use for: HTTPS certificate errors, origin-pull failures, domain ownership verification, or any CDN/DNS configuration change (this skill is strictly read-only).

Install

npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis

SKILL.md

The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis.

CDN DNS Resolution Diagnosis

Overview

This skill diagnoses CDN domain DNS resolution issues. It queries the CDN domain detail via hcloud CLI to obtain the expected CNAME, probes the actual DNS resolution of the domain via scripts/dns_resolve.py (dnspython) to collect the IP list, and verifies the IP attribution via ShowIpInfo/v2 to determine whether the domain has been correctly resolved to Huawei Cloud CDN, helping users identify the root cause of DNS configuration anomalies, resolution not taking effect, false positives, and other issues.

Key Features:

  • Domain permission validation and CNAME retrieval (ShowDomainDetailByName)
  • DNS resolution probing to obtain the IP list (python scripts/dns_resolve.py, JSON output with data.resolved_ips inside the {result, data, error_msg} envelope)
  • IP attribution check (ShowIpInfo/v2, up to 20 IPs)
  • False positive identification (partial resolution scenarios prompt multi-region probing)
  • Structured diagnosis report with remediation suggestions

Tools: hcloud CLI (KooCLI) + python scripts/dns_resolve.py (dnspython >= 2.1) Probe Timeout: 10 seconds (enforced by dns_resolve.py --timeout 10) IP Query Limit: 20 IPs Core Principle: Read-only diagnosis, no configuration changes

Scope

In scope: This skill diagnoses only DNS resolution issues for CDN domains, including:

  • Validating that the domain belongs to the current account and retrieving the expected CNAME (ShowDomainDetailByName)
  • Probing the actual A-record resolution of the domain (python scripts/dns_resolve.py, dnspython)
  • Verifying whether the resolved IPs belong to Huawei Cloud CDN (ShowIpInfo/v2, up to 20 IPs per call)
  • Detecting "partial resolution / false positive" scenarios and producing a structured diagnosis report with remediation suggestions

Out of scope:

  • ❌ No write/modify/delete operations (this skill is read-only; see the 55 prohibited operations in ⛔ Prohibited Operations)
  • ❌ No DNS record changes, no CDN configuration changes, no cache refresh/preheat
  • ❌ No diagnosis of other directions: HTTPS certificate, origin-pull failures, domain ownership verification (hand off via the Related Skills section)
  • ❌ No handling of requests that require configuration changes (refuse and direct the user to the console or manual hcloud CLI usage)

Applicable scenarios:

  • DNS resolution failure / CNAME not taking effect / resolution timeout
  • Domain resolving to non-Huawei-Cloud IPs / resolution result not matching the expected CNAME
  • DNS configuration anomaly troubleshooting, false-positive investigation (partial regional switchover)

Triggers

Trigger phrases: "DNS解析诊断", "DNS异常", "域名解析失败", "CDN解析异常", "DNS配置", "DNS diagnosis", "resolution diagnosis", "CDN 域名解析", "DNS resolution issue".

User utterance examples — use this skill when the user says something like:

  1. "帮我看看 www.example.com 为什么解析不到华为云 CDN" (Why is www.example.com not resolving to Huawei Cloud CDN?)
  2. "CNAME 配置了但没生效,域名还是没解析到 CDN" (CNAME is configured but not taking effect; the domain still does not resolve to CDN)
  3. "DNS 解析超时了,怎么排查" (DNS resolution timed out; how do I troubleshoot?)
  4. "解析出来的 IP 不是华为云的,是什么问题" (The resolved IPs are not Huawei Cloud's; what is wrong?)
  5. "这个域名 DNS 解析异常,帮我诊断一下" (This domain has a DNS resolution anomaly; please diagnose it)

If the user's request matches a Near-miss scenario (certificate / origin / ownership / configuration change), hand off to the corresponding skill or refuse — see Near-miss / Do NOT use.

Near-miss / Do NOT use

Do not use this skill in the following scenarios; handle them as shown:

User requestCorrect handling
HTTPS certificate errors / expired or invalid certificate / HTTPS access failure (DNS resolves correctly)Hand off to huawei-cloud-cdn-certificate-diagnosis
Page returns 502/504 / origin-pull failures (already resolved to Huawei Cloud CDN)Hand off to huawei-cloud-cdn-origin-diagnosis
Domain cannot be added/onboarded to CDN / ownership verification failureHand off to huawei-cloud-cdn-domain-ownership-verification
User asks to modify CDN configuration, delete domains, refresh/preheat cache, or perform any other write operationRefuse (this skill is read-only) and direct the user to the CDN console or manual hcloud CLI
User asks to modify DNS records (CNAME/A records)Refuse and direct the user to the DNS service console
For multi-direction diagnosis with the other skills, see Related Skills; the three related skills are independent and read-only, and can be
chained in any order.

⛔ Prohibited Operations (Security Constraints)

This skill strictly forbids all non-GET (write/modify/delete) CDN operations, regardless of user requests.

Total: 55 prohibited operations (24 POST + 25 PUT + 6 DELETE).

For the complete list of all 55 prohibited non-GET operations with risk descriptions, see references/prohibited-operations.md.

Representative prohibited operations (full list in the reference doc):

Prohibited OperationAPI/CommandReason
❌ Create domainCreateDomain (v1/v2), CreateDomainByDuplicateWrite operation; creates production resource
❌ Delete domainDeleteDomain (v1/v2)Irreversible; removes domain from CDN
❌ Modify domain configUpdateDomainFullConfig (v1/v2), UpdateDomainOrigin, UpdateCacheRules, etc.Write operations; may affect production traffic
❌ Enable/Disable domainEnableDomain (v1/v2), DisableDomain (v1/v2)Affects production traffic
❌ Modify billing modeSetChargeModesFinancial impact; requires explicit authorization
❌ Create refresh/preheat tasksCreateRefreshTasks (v1/v2), CreatePreheatingTasks (v1/v2)Write operations; affects edge cache
❌ Modify DNS configurationAny DNS write operation (e.g., nsupdate)Write operation; may affect global resolution
If a user requests a prohibited operation, you must refuse and inform:
"Per security constraints, this skill does not allow write/delete/modify operations. This skill is for DNS resolution diagnosis only. Please use the Huawei Cloud CDN console, DNS service
console, or run hcloud CLI manually for configuration changes. The complete list of 55 prohibited operations is documented in references/prohibited-operations.md."

Architecture

CDN DNS Resolution Diagnosis
├── hcloud configure list (Credential validation)
├── ShowDomainDetailByName (Domain permission validation + obtain CNAME)
├── python scripts/dns_resolve.py (DNS resolution probe, JSON output)
│ --domain <domain_name>
│ [--timeout 10]
│ ├── data.resolved_ips non-empty → Continue to Step 3
│ └── data.resolved_ips empty / error → Not resolved, generate report
├── ShowIpInfo/v2 --ips=<IP1,IP2> (IP attribution check, up to 20 IPs)
│ ├── All belongs=true → Resolved to Huawei Cloud
│ ├── All belongs=false → Not resolved to Huawei Cloud
│ └── Mixed belongs → Partial resolution + false positive prompt
└── Generate diagnosis report
API Call Budget
StepAPI/CommandRate LimitEst. Duration
1hcloud configure list—<1s
2ShowDomainDetailByName—<2s
3python scripts/dns_resolve.py—≤10s
4ShowIpInfo/v2—<2s

Total Est. Duration: < 15 seconds

KooCLI Command Format Standard

All hcloud CDN commands follow this standard format:

bash
hcloud CDN <Operation> --cli-region=<region> [--parameter=value ...]

Format Rules:

  • Service name: CDN (uppercase)
  • Operation name: PascalCase (e.g., ShowDomainDetailByName, ShowIpInfo/v2)
  • Region parameter: --cli-region=<region> (recommended, use cn-north-1 for CDN)
  • Parameter format: --key=value (equals sign, no space)

Examples:

bash
# Correct
hcloud CDN ShowDomainDetailByName --cli-region=<region> --domain_name=www.example.com
# Incorrect (space-separated)
hcloud CDN ShowDomainDetailByName --cli-region <region>

Prerequisites

Prerequisite check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0 required
Run hcloud version to verify the version. If not installed or version is too low,
bash
hcloud version
Prerequisite check: Python >= 3.8 and dnspython >= 2.1 available
The DNS resolution probe runs via python scripts/dns_resolve.py, which depends on the
dnspython library (>= 2.1). If the import fails, the probe exits with code 2 and an
data.error.reason = "missing_library" JSON output. Install with pip install dnspython>=2.1.
bash
python -c "import dns.resolver; print('dnspython ok')"
Prerequisite check: hcloud credentials configured
Before performing CDN operations, you must verify hcloud credentials are configured:
```bash
hcloud configure list
```
If no valid credentials exist, stop and guide the user to configure credentials.
⚠️ hcloud parameter format requirements
hcloud (KooCLI) all parameters must use the `--param=value` format (connected with equals sign); space-separated format is not supported.
✅ Correct: hcloud CDN ShowDomainDetailByName --cli-region=<region>
❌ Incorrect: hcloud CDN ShowDomainDetailByName --cli-region <region>
⚠️ CDN API region requirements
CDN APIs only support two regions: cn-north-1 (Beijing) and ap-southeast-1 (Singapore).
Query results are region-independent (CDN is a global service).
Recommended: use `cn-north-1`.
⚠️ IP query limit
ShowIpInfo/v2 queries at most 20 IPs per call. If dns_resolve.py returns more than 20 IPs in data.resolved_ips, only the first 20 are taken and noted in the report.

Authentication

Prerequisite check: Huawei Cloud credentials required
Security rules (must be followed):
- Prohibited from reading, echoing, or printing AK/SK values
- Prohibited from asking the user to input AK/SK directly in the conversation
- Prohibited from using hcloud configure set to pass plaintext credential values
- Prohibited from accepting AK/SK directly provided by the user in the conversation
- Only allowed to read credentials from environment variables or configured CLI config files
⚠️ Important: Handling user-provided credentials
If a user attempts to provide AK/SK directly (e.g., "my AK is xxx, SK is yyy"):
- Stop immediately - Do not execute any commands
- Politely refuse and return the following message:
```
For account security, please do not provide Huawei Cloud Access Key ID and Access Key Secret directly in the conversation.
After configuration is complete, please retry your request.
```
- Do not continue executing any Huawei Cloud operations until credentials are configured
Check CLI configuration:
```bash
hcloud configure list
```
Check whether the output contains valid configuration (AK/SK, IAM, etc.).
If no valid credentials exist, stop here.

IAM Permission Policies

Ensure the IAM user has the required permissions. See references/iam-policies.md for details.

Minimum required permissions:

  • cdn:*:query* — All CDN query-class actions used by this skill (ListDomains/v2, ShowDomainDetailByName, ShowIpInfo/v2)
  • cdn:configuration:queryDomains — List CDN domains (listed explicitly alongside the wildcard)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis/badge)](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis)

Something wrong with this skill or its page? Tell us.