Install
openclaw skills install @sdk-team/alibabacloud-tls-cert-diagnosisDiagnose TLS/SSL certificate problems for a user-provided domain - trust chain verification, hostname/SAN matching, expiration check - with automatic DNS resolution and TCP connectivity root-cause analysis when a check fails. Use when the user reports a browser certificate error, HTTPS access fails and needs certificate-layer diagnosis, wants to verify a domain's TLS configuration, or asks for a certificate expiration check. Read-only diagnostics. Only checks domains the user explicitly provides. No write operations, no credentials required. Triggers: "certificate expired", "certificate not trusted", "SSL handshake failed", "hostname mismatch", "certificate check", "TLS certificate diagnosis", "HTTPS certificate error", "certificate validity check", "SAN mismatch", "certificate chain verification".
openclaw skills install @sdk-team/alibabacloud-tls-cert-diagnosisDiagnose TLS/SSL certificate problems for a user-provided domain: certificate not trusted, hostname/SAN mismatch, expiration issues, and HTTPS access failures. The check flow resolves DNS, tests TCP connectivity, then verifies the certificate trust chain, hostname match, and validity period. When a check fails, a network pre-check and DNS diagnosis run automatically to pinpoint the root cause.
| Module | Purpose | File |
|---|---|---|
| DNS Diagnosis | DNS status codes and diagnostic commands | references/dns_diagnosis.md |
| Prerequisites | System dependencies, OS compatibility, CA certificate setup | references/prerequisites.md |
| Output Schema | Formal JSON Schema for script output | references/output_schema.md |
Load references on demand. Do not read all reference files unless the task requires them.
MANDATORY:
scripts/check_tls.py. Do not hand-assemble diagnostic command chains.Set the skill directory once, then run the entry script:
SKILL_DIR=~/.qoderwork/skills/alibabacloud-tls-cert-diagnosis
cd $SKILL_DIR && python3 scripts/check_tls.py example.com --pretty
cd $SKILL_DIR && python3 scripts/check_tls.py example.com --port 8443 --pretty
Create a file with one domain per line (lines starting with # are ignored), then run:
cd $SKILL_DIR && python3 scripts/check_tls.py --file domains.txt --pretty
| # | Capability | Description |
|---|---|---|
| C1 | Single-Domain Full-Chain Check | DNS resolution -> TCP connectivity -> trust chain verification, hostname/SAN matching, expiration check |
| C2 | Abnormal Certificate Diagnosis | Detect and report certificate expired, certificate not trusted, and hostname mismatch, with the specific reason for each issue |
| C3 | DNS Failure Root-Cause Diagnosis | When a check fails, classify the DNS failure (NXDOMAIN / SERVFAIL / REFUSED / TIMEOUT / CNAME-only) per references/dns_diagnosis.md |
| C4 | Custom Port Check | Check a TLS endpoint on a non-default port via --port |
| C5 | Batch Check | Check multiple domains from a file via --file, one domain per line |
| C6 | Structured JSON Output | Machine-readable JSON result per references/output_schema.md |
Platform-specific tool selection (macOS / Linux / Windows) and CA bundle paths are handled automatically by the entry script; see references/prerequisites.md for details.
Domain input
|
v
Run certificate check (openssl s_client)
|
+-- OK -> output cert details (trust / hostname match / expiry)
|
+-- FAIL -> run network pre-check (nc on macOS, telnet on Linux, Test-NetConnection on Windows)
|
+-- if DNS fails -> run dig / nslookup DNS diagnosis
|
+-- NXDOMAIN: domain does not exist
+-- SERVFAIL: DNS server failure
+-- REFUSED: DNS query refused
+-- TIMEOUT: DNS server no response
+-- NOERROR no A record: only CNAME, follow CNAME chain
Domain : example.com
Port : 443
Status : OK
Trust : trusted
Hostname : match
Validity : 2025-01-15 ~ 2026-01-15
Days left : 245
Issuer : DigiCert TLS RSA SHA256 2020 CA1
Subject : CN=www.example.org
SAN : www.example.org, example.org, example.com, www.example.com
Domain : expired.example.com
Port : 443
Status : abnormal (3 issues)
Trust : trusted
Hostname : mismatch
Validity : 2023-01-15 ~ 2024-01-15
Days left : expired 134 days
Issuer : Let's Encrypt R3
Issues :
- certificate expired
- verification failed: certificate has expired
- hostname mismatch: SAN does not contain target domain
Domain : nonexistent.example.com
Port : 443
Status : abnormal (1 issue)
Network : unreachable
Issue : network unreachable - TCP connection failed;
dig: domain does not exist (NXDOMAIN)
The entry script outputs JSON. See references/output_schema.md for the formal schema.
| Check Item | Description | On Failure |
|---|---|---|
| DNS Resolve | Query A / AAAA records | Report NXDOMAIN / SERVFAIL / REFUSED / TIMEOUT |
| TCP Reachable | Test port connectivity on resolved IPs | Report connection failure reason |
| TLS Handshake | Fetch server certificate | Report "no certificate received" |
| Trust Chain | Verify certificate chain against system CA bundle | Verify code 0 = trusted; otherwise report error |
| Hostname Match | Match domain against certificate SAN (wildcard restricted to one level) | Report mismatch |
| Expiry | Parse notBefore / notAfter | Report expired or not yet valid |
Example 1: User: "My browser says the certificate for shop.myshop.com is not trusted, please check it."
cd $SKILL_DIR && python3 scripts/check_tls.py shop.myshop.com --pretty
Example 2: User: "Our API runs TLS on port 8443, can you verify the certificate expires soon?"
cd $SKILL_DIR && python3 scripts/check_tls.py api.example.com --port 8443 --pretty
Example 3: User: "Check the certificates for all domains in this list file."
cd $SKILL_DIR && python3 scripts/check_tls.py --file domains.txt --pretty
nslookup for DNS, PowerShell Test-NetConnection for TCP, and openssl (requires standalone OpenSSL for Windows). Windows CA auto-detection checks the OpenSSL-Win64 install path.openssl, dig, nc, and telnet. Windows uses openssl, nslookup, and PowerShell Test-NetConnection. No external Python libraries are required.--timeout-ms for high-latency networks.*.example.com against only one-level subdomains (e.g. a.example.com). Reject multi-level matches (e.g. a.b.example.com). This follows RFC 6125 Section 6.4.3, which restricts wildcard certificates to a single label to prevent overly broad matching that could violate the subscriber's intended scope.