huaweicloud/huaweicloud-skills/huawei-cloud-cdn-certificate-diagnosis
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
Checking that the SKILL.md file is still in the repository.
Triggers include: "certificate diagnosis", "certificate expiry", "HTTPS certificate", "certificate configuration", "SSL certificate", "cert expiry check". Diagnose CDN HTTPS certificate configuration and expiration status using hcloud CLI. Query the certificate configuration via ShowCertificatesHttpsInfo/v2, probe the actual certificate served by the CDN edge via a Python TLS probe script (scripts/cert_probe.py), and compute days remaining until expiration to identify certificate misconfiguration, impending expiry, or already-expired certificates. Use this skill when the user wants to: (1) diagnose CDN HTTPS certificate issues, (2) check certificate expiration status, (3) verify SSL/TLS certificate configuration on a CDN domain, (4) troubleshoot HTTPS certificate deployment failures. Do NOT use this skill for certificate configuration changes (upload/update/delete/renew), CDN domain management, or non-CDN domains — this is a read-only diagnosis skill.
Install
npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-cdn-certificate-diagnosisSKILL.md
The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-cdn-certificate-diagnosis.
CDN Certificate Diagnosis
Overview
This skill diagnoses CDN domain HTTPS certificate configuration and expiration status. It queries the certificate configuration on CDN via hcloud CLI (ShowCertificatesHttpsInfo/v2), probes the actual certificate served by the CDN edge node via a Python TLS probe script (python scripts/cert_probe.py), and computes days remaining until expiration via a Python script, helping users identify issues such as certificate not configured, configuring, impending expiry, or already expired.
Key Features:
- Automatically identifies certificate configuration status (not configured / configuring / configured)
- Retrieves the certificate name and expiration time configured on CDN
- Probes the actual served certificate chain via
scripts/cert_probe.py(expiration time, issuer, CN, SAN; JSON output) - Computes days remaining via Python (normal / warning / expired)
- Structured diagnosis report with a mandatory Certificate Summary block that explicitly prints the certificate's common info (name, status, issuer, CN, SAN, validity period, days
remaining) to the user
- Fix recommendations
Tool: hcloud CLI (KooCLI) + Python >= 3.8 (stdlib ssl + socket for the probe; no third-party dependency) Probe Timeout: 10 seconds (enforced by cert_probe.py via --timeout, default 10, range 1-30) Core Principle: Read-only diagnosis; no configuration changes are performed
Scope
This skill is scoped to CDN HTTPS certificate diagnosis only — one class of problem.
In scope:
- Querying CDN domain certificate configuration via
ShowCertificatesHttpsInfo/v2(https_status, cert_name, expiration_time) - Probing the certificate actually served by the CDN edge via
scripts/cert_probe.py(issuer, CN, SAN, validity period) - Computing days remaining until expiration via
scripts/cert_expiry_check.py - Generating a structured certificate diagnosis report with conclusion and fix recommendations
Out of scope (do not attempt):
- Certificate configuration changes (upload / update / delete / renew)
- CDN domain management (create / delete / enable / disable / origin / cache-rule / billing changes)
- TLS/HTTPS inspection of non-CDN domains or general websites
- Any non-GET CDN operation — see the Prohibited Operations section below
Applicable scenarios: the user asks to diagnose CDN HTTPS certificate issues, check certificate expiration status, verify SSL/TLS certificate configuration on a CDN domain, or troubleshoot HTTPS certificate deployment failures.
Triggers
Use this skill when the user's request matches any of the following:
- "diagnose the HTTPS certificate of www.example.com"
- "is the certificate expired?"
- "how many days until the certificate expires?"
- "check the certificate configuration of a CDN domain"
- "certificate diagnosis", "certificate expiry", "HTTPS certificate", "certificate configuration", "SSL certificate"
Near-miss / Do NOT use
Do NOT use this skill when:
- The user wants to configure, update, delete, or renew a certificate — refuse and direct to the Huawei Cloud CDN console or manual hcloud CLI (see the Prohibited Operations section below)
- The domain is not a CDN-accelerated domain —
cert_probe.pyonly probes CDN-accelerated domains via a TLS handshake - The user wants CDN domain management (create/delete/enable/disable domains, origin, cache rules, billing)
- The user wants general port scanning or network diagnostics — this skill performs a single TLS handshake against
<domain>:443only - The user wants CDN traffic statistics or monitoring
⛔ 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 | |
| ❌ Modify certificate config | UpdateDomainMultiCertificates (v1/v2), UpdateHttpsInfo | Write operations; may interrupt HTTPS service | |
| ❌ Create refresh/preheat tasks | CreateRefreshTasks (v1/v2), CreatePreheatingTasks (v1/v2) | Write operations; affects edge cache |
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 read-only for certificate diagnosis. Please use the Huawei Cloud CDN console or runhcloud CLI manually for certificate 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 | ShowCertificatesHttpsInfo/v2 | — | <2s | |
| 4 | python scripts/cert_probe.py --domain <domain> --timeout 10 | — | ≤10s | |
| 5 | python scripts/cert_expiry_check.py | — | <1s |
Total est. duration: < 16 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,ShowCertificatesHttpsInfo/v2) - Region parameter:
--cli-region=<region>(recommended; CDN uses cn-north-1) - 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 availablePython is required to run the certificate probe scriptscripts/cert_probe.pyand the days-remaining calculation scriptscripts/cert_expiry_check.py.The probe uses only the Python standard library (ssl,socket),so no third-party packages need to be installed.
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 ShowCertificatesHttpsInfo/v2 --cli-region=<region>❌ Incorrect:hcloud CDN ShowCertificatesHttpsInfo/v2 --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`.
Authentication
Prerequisite check: Huawei Cloud credentials
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"):1. Stop immediately - Do not execute any commands2. 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.Please use one of the following secure methods to configure credentials:Method 1: Interactive configuration (recommended)hcloud configure# Enter AK/SK as prompted; credentials will be securely stored in a local config fileMethod 2: Environment variable configurationexport HUAWEICLOUD_SDK_AK=<your-access-key-id>export HUAWEICLOUD_SDK_SK=<your-secret-key>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,ShowCertificatesHttpsInfo/v2)cdn:configuration:queryDomains— List CDN domains (listed explicitly alongside the wildcard)
Core Commands
Quick reference for all hcloud CDN commands, probe commands, and calculation commands used in this skill:
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-certificate-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-certificate-diagnosis)