huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
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-diagnosisSKILL.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 withdata.resolved_ipsinside 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:
- "帮我看看 www.example.com 为什么解析不到华为云 CDN" (Why is www.example.com not resolving to Huawei Cloud CDN?)
- "CNAME 配置了但没生效,域名还是没解析到 CDN" (CNAME is configured but not taking effect; the domain still does not resolve to CDN)
- "DNS 解析超时了,怎么排查" (DNS resolution timed out; how do I troubleshoot?)
- "解析出来的 IP 不是华为云的,是什么问题" (The resolved IPs are not Huawei Cloud's; what is wrong?)
- "这个域名 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 request | Correct 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 failure | Hand off to huawei-cloud-cdn-domain-ownership-verification | |
| User asks to modify CDN configuration, delete domains, refresh/preheat cache, or perform any other write operation | Refuse (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 bechained 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 Operation | API/Command | Reason | |
|---|---|---|---|
| ❌ Create domain | CreateDomain (v1/v2), CreateDomainByDuplicate | Write operation; creates production resource | |
| ❌ Delete domain | DeleteDomain (v1/v2) | Irreversible; removes domain from CDN | |
| ❌ Modify domain config | UpdateDomainFullConfig (v1/v2), UpdateDomainOrigin, UpdateCacheRules, etc. | Write operations; may affect production traffic | |
| ❌ Enable/Disable domain | EnableDomain (v1/v2), DisableDomain (v1/v2) | Affects production traffic | |
| ❌ Modify billing mode | SetChargeModes | Financial impact; requires explicit authorization | |
| ❌ Create refresh/preheat tasks | CreateRefreshTasks (v1/v2), CreatePreheatingTasks (v1/v2) | Write operations; affects edge cache | |
| ❌ Modify DNS configuration | Any 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 serviceconsole, or run hcloud CLI manually for configuration changes. The complete list of 55 prohibited operations is documented in references/prohibited-operations.md."
Architecture
API Call Budget
| Step | API/Command | Rate Limit | Est. Duration | |
|---|---|---|---|---|
| 1 | hcloud configure list | — | <1s | |
| 2 | ShowDomainDetailByName | — | <2s | |
| 3 | python scripts/dns_resolve.py | — | ≤10s | |
| 4 | ShowIpInfo/v2 | — | <2s |
Total Est. Duration: < 15 seconds
KooCLI Command Format Standard
All hcloud CDN commands follow this standard format:
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:
Prerequisites
Prerequisite check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0 requiredRunhcloud versionto verify the version. If not installed or version is too low,
Prerequisite check: Python >= 3.8 and dnspython >= 2.1 availableThe DNS resolution probe runs viapython scripts/dns_resolve.py, which depends on thednspythonlibrary (>= 2.1). If the import fails, the probe exits with code 2 and andata.error.reason = "missing_library"JSON output. Install withpip install dnspython>=2.1.
Prerequisite check: hcloud credentials configuredBefore performing CDN operations, you must verify hcloud credentials are configured:```bashhcloud configure list```If no valid credentials exist, stop and guide the user to configure credentials.
⚠️ hcloud parameter format requirementshcloud (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 requirementsCDN APIs only support two regions:cn-north-1(Beijing) andap-southeast-1(Singapore).Query results are region-independent (CDN is a global service).Recommended: use `cn-north-1`.
⚠️ IP query limitShowIpInfo/v2queries at most 20 IPs per call. Ifdns_resolve.pyreturns more than 20 IPs indata.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 usinghcloud configure setto 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 credentialsIf 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 configuredCheck CLI configuration:```bashhcloud 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
- SKILL.md in the repositoryCheckingskills/edge/cdn/huawei-cloud-cdn-dns-resolution-diagnosis/SKILL.md
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
[](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cdn-dns-resolution-diagnosis)