huaweicloud/huaweicloud-skills/huawei-cloud-cdn-certificate-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.

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-diagnosis

SKILL.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.py only 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>:443 only
  • 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 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
❌ Modify certificate configUpdateDomainMultiCertificates (v1/v2), UpdateHttpsInfoWrite operations; may interrupt HTTPS service
❌ Create refresh/preheat tasksCreateRefreshTasks (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 run
hcloud CLI manually for certificate configuration changes. The complete list of 55 prohibited operations is documented in references/prohibited-operations.md."

Architecture

CDN Certificate Diagnosis
├── hcloud configure list (credential validation)
├── ShowDomainDetailByName (domain permission validation + basic info)
├── ShowCertificatesHttpsInfo/v2 (certificate configuration query)
│ ├── Match https[] element by domain_name (response is wrapped in total/https)
│ ├── https_status=0 → certificate not configured; stop and report
│ ├── https_status=2 → certificate configuring; prompt to wait
│ └── https_status=3 → certificate configured; continue probing
├── python scripts/cert_probe.py (actual certificate status probe)
│ ├── Parse JSON: data.tls.subject_cn, data.tls.issuer_cn, data.tls.not_before, data.tls.not_after, data.tls.san_list (wrapped in {result, data, error_msg})
│ └── Compare data.tls.not_after against API-returned expiration_time
├── python scripts/cert_expiry_check.py (days remaining calculation)
│ ├── data.days_remaining > 30 → normal
│ ├── 0 < data.days_remaining ≤ 30 → warning
│ └── data.days_remaining ≤ 0 → expired
└── Generate diagnosis report
API Call Budget
StepAPI/CommandRate LimitEst. Duration
1hcloud configure list—<1s
2ShowDomainDetailByName—<2s
3ShowCertificatesHttpsInfo/v2—<2s
4python scripts/cert_probe.py --domain <domain> --timeout 10—≤10s
5python scripts/cert_expiry_check.py—<1s

Total est. duration: < 16 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, ShowCertificatesHttpsInfo/v2)
  • Region parameter: --cli-region=<region> (recommended; CDN uses cn-north-1)
  • Parameter format: --key=value (equals sign, no space)

Examples:

bash
# Correct
hcloud CDN ShowCertificatesHttpsInfo/v2 --cli-region=<region> --domain_name=www.example.com
# Incorrect (space-separated)
hcloud CDN ShowCertificatesHttpsInfo/v2 --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 available
Python is required to run the certificate probe script scripts/cert_probe.py
and the days-remaining calculation script scripts/cert_expiry_check.py.
The probe uses only the Python standard library (ssl, socket),
so no third-party packages need to be installed.
bash
python --version
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 ShowCertificatesHttpsInfo/v2 --cli-region=<region>
❌ Incorrect: hcloud CDN ShowCertificatesHttpsInfo/v2 --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`.

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 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"):
1. Stop immediately - Do not execute any commands
2. 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 file
Method 2: Environment variable configuration
export 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 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, 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

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-certificate-diagnosis/badge)](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cdn-certificate-diagnosis)

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