agentleFS
skyvanguardskyvanguard/infra-ops/skills/ssl-checker/SKILL.md

ssl-checker

Skill1 starsChanged 10 months agoMITView on GitHub

Use when the user has SSL/TLS certificate issues, needs to verify certificate expiration, debug HTTPS errors, or check certificate chain validity.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    NEVER attempt to decrypt or extract private keys

    line 205
  2. Distinctive:

    NEVER modify certificate stores without explicit permission

    line 206
  3. Distinctive:

    ALWAYS use -servername (SNI) for accurate results on shared hosting

    line 207
  4. Distinctive:

    Use timeouts on all network operations

    line 208
  5. Distinctive:

    If openssl is not available, inform user and suggest installation

    line 209
  6. Distinctive:

    Check SAN (Subject Alternative Names) not just CN for domain validation

    line 211

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SSL/TLS Certificate Checker

Overview

Diagnose SSL/TLS certificate issues including expiration, chain problems, misconfiguration, and protocol/cipher weaknesses. Supports both remote endpoints and local certificate files.

Process

Step 1: Identify the Target

Determine what to check:

  • Remote endpoint: host:port (default port 443)
  • Local certificate file: .pem, .crt, .cer, .pfx
  • Certificate store: system trust store

Step 2: Check Remote Certificate

Basic certificate info:

# Full certificate details
echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | openssl x509 -noout -text

# Quick summary (subject, issuer, dates)
echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | openssl x509 -noout -subject -issuer -dates -fingerprint

# Check expiration specifically
echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | openssl x509 -noout -enddate

Windows alternative:

# Check remote certificate
$req = [Net.HttpWebRequest]::Create("https://[host]")
$req.AllowAutoRedirect = $false
$req.Timeout = 10000
try { $req.GetResponse() | Out-Null } catch {}
$cert = $req.ServicePoint.Certificate
[PSCustomObject]@{
    Subject = $cert.Subject
    Issuer = $cert.Issuer
    NotAfter = $cert.GetExpirationDateString()
    NotBefore = $cert.GetEffectiveDateString()
}

Step 3: Certificate Chain Verification

# Show full chain
echo | openssl s_client -connect [host]:443 -servername [host] -showcerts 2>/dev/null

# Verify chain
echo | openssl s_client -connect [host]:443 -servername [host] -verify_return_error 2>&1 | grep -E "verify|depth|error"

# Check specific CA bundle
echo | openssl s_client -connect [host]:443 -servername [host] -CAfile [ca-bundle.crt] 2>&1 | grep "Verify return code"

Chain issues to check:

IssueIndicatorFix
Incomplete chain"unable to get local issuer certificate"Add intermediate certs
Self-signed"self signed certificate"Install CA or add exception
Expired intermediateIntermediate cert past notAfterUpdate intermediate
Wrong orderCerts not in order leaf→intermediate→rootReorder chain

Step 4: Expiration Analysis

# Days until expiration
echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2 | xargs -I{} date -d {} +%s | xargs -I{} echo $(( ({} - $(date +%s)) / 86400 )) days remaining

Expiration thresholds:

Days RemainingSeverityAction
> 30OKNo action needed
15-30WARNINGPlan renewal
7-14HIGHRenew immediately
1-7CRITICALEmergency renewal
0 or expiredEXPIREDService likely broken

Step 5: Protocol and Cipher Check

Supported TLS versions:

# Check TLS 1.0 (should be disabled)
echo | openssl s_client -connect [host]:443 -tls1 2>&1 | grep -i "protocol\|error\|alert"

# Check TLS 1.1 (should be disabled)
echo | openssl s_client -connect [host]:443 -tls1_1 2>&1 | grep -i "protocol\|error\|alert"

# Check TLS 1.2
echo | openssl s_client -connect [host]:443 -tls1_2 2>&1 | grep "Protocol\|Cipher"

# Check TLS 1.3
echo | openssl s_client -connect [host]:443 -tls1_3 2>&1 | grep "Protocol\|Cipher"

Cipher strength:

# Currently negotiated cipher
echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | grep "Cipher\|Protocol"

Weak configurations to flag:

IssueRiskRecommendation
TLS 1.0 enabledHIGHDisable
TLS 1.1 enabledMEDIUMDisable
RC4 cipherHIGHRemove from config
DES/3DES cipherHIGHRemove from config
No TLS 1.3LOWEnable if possible
SHA-1 signatureMEDIUMReissue with SHA-256
Key < 2048 bitsHIGHReissue with 2048+

Step 6: Local Certificate Inspection

Read local cert file:

# PEM format
openssl x509 -in [file.pem] -noout -text

# DER format
openssl x509 -in [file.der] -inform DER -noout -text

# PKCS12 / PFX
openssl pkcs12 -in [file.pfx] -nokeys -info 2>/dev/null

Windows cert store:

# List certificates expiring within 30 days
Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.NotAfter -lt (Get-Date).AddDays(30)} | Select Subject, NotAfter, Thumbprint

# All certs in store
Get-ChildItem Cert:\LocalMachine\My | Select Subject, NotAfter, Issuer | Sort NotAfter

Step 7: Common Issues Diagnosis

SymptomLikely CauseVerification
"NET::ERR_CERT_DATE_INVALID"Expired certCheck enddate
"NET::ERR_CERT_AUTHORITY_INVALID"Unknown CA or self-signedCheck issuer chain
"NET::ERR_CERT_COMMON_NAME_INVALID"Wrong domain in certCheck SAN/CN
"SSL_ERROR_NO_CYPHER_OVERLAP"No shared ciphersCheck cipher list
"ERR_SSL_VERSION_OR_CIPHER_MISMATCH"Protocol mismatchCheck TLS versions
Mixed content warningsHTTP resources on HTTPS pageCheck page resources
HSTS errorCached strict policyCheck HSTS header

Subject Alternative Names check:

echo | openssl s_client -connect [host]:443 -servername [host] 2>/dev/null | openssl x509 -noout -ext subjectAltName

Step 8: Present Report

## SSL/TLS Certificate Report
**Target:** [host]:443 | **Checked:** [timestamp]

### Certificate Details
| Field | Value |
|-------|-------|
| Subject | [CN] |
| Issuer | [issuer] |
| Valid From | [date] |
| Valid Until | [date] (**[N] days remaining**) |
| Serial | [serial] |
| Signature Alg | [alg] |
| Key Size | [bits] |
| SANs | [domain list] |

### Chain Status
| # | Subject | Issuer | Expires | Status |
|---|---------|--------|---------|--------|
| 0 | [leaf] | [issuer] | [date] | [OK/WARN] |
| 1 | [intermediate] | [issuer] | [date] | [OK/WARN] |
| 2 | [root] | [self] | [date] | [OK/WARN] |

### Protocol & Cipher
| Protocol | Status | Rating |
|----------|--------|--------|
| TLS 1.0 | [enabled/disabled] | [OK/FAIL] |
| TLS 1.1 | [enabled/disabled] | [OK/FAIL] |
| TLS 1.2 | [enabled/disabled] | [OK] |
| TLS 1.3 | [enabled/disabled] | [OK/WARN] |

### Issues Found
- [Issue 1 with severity]
- [Issue 2 with severity]

### Recommendations
1. [Priority actions]

Rules

  • NEVER attempt to decrypt or extract private keys
  • NEVER modify certificate stores without explicit permission
  • ALWAYS use -servername (SNI) for accurate results on shared hosting
  • Use timeouts on all network operations
  • If openssl is not available, inform user and suggest installation
  • Report exact error messages from OpenSSL for debugging
  • Check SAN (Subject Alternative Names) not just CN for domain validation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.