/ccc-harden — Production Hardening Audit
Audit a site across 11 hardening pillars to confirm it's safe to ship. Read-only by default. Apply safe auto-fixes with --fix.
What it checks
| Pillar |
What it verifies |
| 1. Vercel |
Project link, env vars, deploy headers, deploy protection, domain |
| 2. GitHub Linkage |
Remote URL, branch tracking, .gitignore coverage, working tree clean |
| 3. GitHub Org |
Branch protection on main, Dependabot enabled, secret scanning, CODEOWNERS |
| 4. Sentry |
SDK installed, DSN set, source maps uploading, alert rules, sample rate |
| 5. PostHog |
SDK installed, env vars set, autocapture config, event whitelist |
| 6. Plausible |
Script present, site ID, goals, funnels, recent traffic |
| 7. Clarity |
Script presence, project ID |
| 8. Google |
GA4, Search Console verified, sitemap submitted, Tag Manager |
| 9. Stripe |
Keys present, webhook configured, test/live separation |
| 10. Secrets & PII |
gitleaks scan, CSP/HSTS/X-Frame headers, .env audit, log scrubbing |
| 11. Cloudflare |
DNS health, TLS/SSL, bot management, caching, HTTP/3, WAF |
When to use
✅ Use when:
- Pre-launch checklist for a new site
- Before a security review or compliance audit
- Periodic monthly/quarterly health check
- After a major refactor that touched config files
- When you suspect a leaked secret
🚫 Don't use when:
- Project is pre-MVP / local-only (overkill)
- Quick fix that doesn't touch infra/config (use
/ccc-doctor instead)
Trigger flow
When the user invokes /ccc-harden:
Read .harden.json at project root. If missing, run bash ~/.claude/skills/harden-site/lib/tier.sh to auto-classify (production/staging/parked/personal) and generate it.
Ask the user via AskUserQuestion which mode:
- Audit only (read-only, default — recommended)
- Apply auto-fixes (writes to vercel.json, .gitignore, etc.)
- Single pillar (pick from list of 11)
Run pillars based on .harden.json enabled list:
for pillar in ~/.claude/skills/harden-site/pillars/*.sh; do
name=$(basename "$pillar" .sh | sed 's/^[0-9]*-//')
enabled=$(jq -r ".pillars[\"$name\"]" .harden.json)
[ "$enabled" = "true" ] && bash "$pillar" --audit
done
Aggregate results into a single summary:
- Total checks · pass · warn · fail · skipped
- Top 5 manual actions required
- Top 5 auto-fixable items
- Severity-ranked (CRITICAL → HIGH → MEDIUM → LOW)
Offer next step via AskUserQuestion:
- Apply auto-fixes now (re-runs with
--fix)
- Show full report (paginated output of all pillars)
- Create Linear issues for manual actions
- Done — I'll triage manually
Privacy guarantee (NO PII)
CC Commander's hardening audit never sends data to PostHog or any telemetry endpoint. Every check is:
- Local-only (reads files, runs
gh/vercel/fly/op CLIs)
- Reports rendered in the terminal
- Findings written to
.harden.report.md (gitignored by default)
Telemetry from /ccc-harden itself emits only:
skill_invoked with skill_id=ccc-harden
harden_audit_completed with { tier, pillars_run, pass, warn, fail } (counts only, no file paths, no findings)
Zero PII. Zero secrets. Zero file content. Ever.
Exit behavior
| Result |
Exit |
Next action |
| All pass |
0 |
"✅ Ready to ship." |
| Warnings only |
1 |
"🟡 Review warnings before launch." |
| Failures |
2 |
"🔴 Block launch until fixes applied." |
| Missing tokens |
3 |
"⏭️ Pillar skipped — set up op access." |
Setup (first run)
If the user has never run hardening before:
- Auto-classify the project:
bash ~/.claude/skills/harden-site/lib/tier.sh
- Edit
.harden.json to enable/disable pillars per their stack
- For pillars that need API tokens (Vercel, Cloudflare, PostHog management API):
- Verify tokens in 1Password Alfred vault (see
~/.claude/skills/harden-site/TOKENS.md)
- Run
op signin if not already authenticated
- First run is read-only — always show what would change before fixing
Related skills
/ccc-doctor — generic project health check (lighter weight, no API tokens)
/ccc-security — OWASP audit + threat modeling (deeper than infra hardening)
/ccc-deploy-check — pre-deploy gate (12 quick checks before pushing)
/ccc-deploy — actual deploy workflow (uses hardening output as a precondition)
Vendor sources
This skill wraps ~/.claude/skills/harden-site/ (Kevin's site-hardening skill, a fork of the upstream "harden" pattern). The 11 pillars and auto-fix logic live there; this plugin skill is the UX layer that makes them discoverable inside CC Commander.
To update the underlying logic, edit ~/.claude/skills/harden-site/pillars/*.sh — this skill re-reads them every invocation.
⚙️ Fable contract: plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state — rules/fable-method.md
1---2name: ccc-harden3description: Production hardening audit across 11 pillars (Vercel, GitHub, Sentry, PostHog, Stripe, Cloudflare, Secrets/PII). Read-only; --fix applies safe auto-fixes. Use pre-launch. NO PII.4---56# /ccc-harden — Production Hardening Audit78Audit a site across **11 hardening pillars** to confirm it's safe to ship. Read-only by default. Apply safe auto-fixes with `--fix`.910## What it checks1112| Pillar | What it verifies |13|--------|-----------------|14| **1. Vercel** | Project link, env vars, deploy headers, deploy protection, domain |15| **2. GitHub Linkage** | Remote URL, branch tracking, .gitignore coverage, working tree clean |16| **3. GitHub Org** | Branch protection on main, Dependabot enabled, secret scanning, CODEOWNERS |17| **4. Sentry** | SDK installed, DSN set, source maps uploading, alert rules, sample rate |18| **5. PostHog** | SDK installed, env vars set, autocapture config, event whitelist |19| **6. Plausible** | Script present, site ID, goals, funnels, recent traffic |20| **7. Clarity** | Script presence, project ID |21| **8. Google** | GA4, Search Console verified, sitemap submitted, Tag Manager |22| **9. Stripe** | Keys present, webhook configured, test/live separation |23| **10. Secrets & PII** | gitleaks scan, CSP/HSTS/X-Frame headers, .env audit, log scrubbing |24| **11. Cloudflare** | DNS health, TLS/SSL, bot management, caching, HTTP/3, WAF |2526## When to use2728✅ **Use when:**29- Pre-launch checklist for a new site30- Before a security review or compliance audit31- Periodic monthly/quarterly health check32- After a major refactor that touched config files33- When you suspect a leaked secret3435🚫 **Don't use when:**36- Project is pre-MVP / local-only (overkill)37- Quick fix that doesn't touch infra/config (use `/ccc-doctor` instead)3839## Trigger flow4041When the user invokes `/ccc-harden`:42431. **Read `.harden.json`** at project root. If missing, run `bash ~/.claude/skills/harden-site/lib/tier.sh` to auto-classify (production/staging/parked/personal) and generate it.44452. **Ask the user** via AskUserQuestion which mode:46 - **Audit only** (read-only, default — recommended)47 - **Apply auto-fixes** (writes to vercel.json, .gitignore, etc.)48 - **Single pillar** (pick from list of 11)49503. **Run pillars** based on `.harden.json` enabled list:51 ```bash52 for pillar in ~/.claude/skills/harden-site/pillars/*.sh; do53 name=$(basename "$pillar" .sh | sed 's/^[0-9]*-//')54 enabled=$(jq -r ".pillars[\"$name\"]" .harden.json)55 [ "$enabled" = "true" ] && bash "$pillar" --audit56 done57 ```58594. **Aggregate results** into a single summary:60 - Total checks · pass · warn · fail · skipped61 - Top 5 manual actions required62 - Top 5 auto-fixable items63 - Severity-ranked (CRITICAL → HIGH → MEDIUM → LOW)64655. **Offer next step** via AskUserQuestion:66 - **Apply auto-fixes now** (re-runs with `--fix`)67 - **Show full report** (paginated output of all pillars)68 - **Create Linear issues** for manual actions69 - **Done — I'll triage manually**7071## Privacy guarantee (NO PII)7273CC Commander's hardening audit **never** sends data to PostHog or any telemetry endpoint. Every check is:74- Local-only (reads files, runs `gh`/`vercel`/`fly`/`op` CLIs)75- Reports rendered in the terminal76- Findings written to `.harden.report.md` (gitignored by default)7778Telemetry from `/ccc-harden` itself emits **only**:79- `skill_invoked` with `skill_id=ccc-harden`80- `harden_audit_completed` with `{ tier, pillars_run, pass, warn, fail }` (counts only, no file paths, no findings)8182Zero PII. Zero secrets. Zero file content. Ever.8384## Exit behavior8586| Result | Exit | Next action |87|--------|------|-------------|88| All pass | 0 | "✅ Ready to ship." |89| Warnings only | 1 | "🟡 Review warnings before launch." |90| Failures | 2 | "🔴 Block launch until fixes applied." |91| Missing tokens | 3 | "⏭️ Pillar skipped — set up `op` access." |9293## Setup (first run)9495If the user has never run hardening before:96971. Auto-classify the project: `bash ~/.claude/skills/harden-site/lib/tier.sh`982. Edit `.harden.json` to enable/disable pillars per their stack993. For pillars that need API tokens (Vercel, Cloudflare, PostHog management API):100 - Verify tokens in 1Password Alfred vault (see `~/.claude/skills/harden-site/TOKENS.md`)101 - Run `op signin` if not already authenticated1024. First run is read-only — always show what would change before fixing103104## Related skills105106- `/ccc-doctor` — generic project health check (lighter weight, no API tokens)107- `/ccc-security` — OWASP audit + threat modeling (deeper than infra hardening)108- `/ccc-deploy-check` — pre-deploy gate (12 quick checks before pushing)109- `/ccc-deploy` — actual deploy workflow (uses hardening output as a precondition)110111## Vendor sources112113This skill wraps `~/.claude/skills/harden-site/` (Kevin's site-hardening skill, a fork of the upstream "harden" pattern). The 11 pillars and auto-fix logic live there; this plugin skill is the UX layer that makes them discoverable inside CC Commander.114115To update the underlying logic, edit `~/.claude/skills/harden-site/pillars/*.sh` — this skill re-reads them every invocation.116117---118119> ⚙️ **Fable contract:** plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state — `rules/fable-method.md`