Production Readiness Skill
Overview
Orchestrate deterministic OSS scanners across a multi-language repo (TypeScript/React, Python, containers, Helm/K8s manifests, IaC) and synthesize results into a single audit report. The skill installs missing tools on demand, runs the scanners in parallel where possible, parses their JSON/SARIF output, and writes a human-readable Markdown report plus machine-readable artifacts to .production-readiness/.
This skill differs from LLM-only readiness reviewers by relying on real CVE/secret/IaC databases (OSV, Trivy DBs, TruffleHog verifiers, Checkov policies). The LLM's role is triage and synthesis, not pattern detection.
Tools used (all OSS): Trivy, Semgrep CE, TruffleHog, Gitleaks, detect-secrets, OSV-Scanner, pip-audit, Bandit, Ruff, Hadolint, Dockle, Checkov, kube-score, Polaris, kubescape, OpenSSF Scorecard, Lighthouse CI, axe-core, OWASP ZAP (opt-in), k6 (opt-in), Playwright (opt-in).
When to invoke
Invoke on the signals in the Workflow Router table below (prod-ready check, PRR,
pre-release audit, Go/No-Go, ship-readiness scan). Do NOT invoke for narrow
questions ("is this one function safe?") — use security-review instead.
Workflow Router
Determine the audit scope before running. This skill has one workflow shape —
audit — but the scope varies. The router picks which phases run; every scope
converges on the same synthesize-and-verdict phase.
Is the user re-reading a prior audit, or running a new one?
|
RE-READ (--cached) --> CACHED REVIEW
| Phases: (verify HEAD unchanged) -> Present cached report
| Refuses if HEAD moved; tells the user to drop --cached.
|
NEW AUDIT --> What scope?
|
+-> Whole repo, default coverage (no scope flags)
| --> FULL AUDIT
| Phases: Detect -> Bootstrap -> [default parallel phases] -> Synthesize -> Present
|
+-> A named subset of phases (--only / --skip)
| --> SCOPED AUDIT
| Phases: Detect -> Bootstrap -> [selected phases] -> Synthesize -> Present
|
+-> Add runtime/expensive checks (--include=dast,load,visual)
--> DEEP AUDIT
Phases: Detect -> Bootstrap -> [default + opt-in phases] -> Synthesize -> Present
Signal detection:
| Signal in request |
Scope |
| "Is this prod-ready?", "run a PRR", "pre-release audit", "Go/No-Go" |
Full Audit |
| "Just check secrets and deps", "only scan K8s", "skip the frontend checks" |
Scoped Audit |
| "Include a DAST scan", "run load tests too", "capture visual screenshots" |
Deep Audit |
| "Show me the last report", "what did the audit say" (unchanged HEAD) |
Cached Review |
Stack detection (detect_stack.sh) further prunes phases automatically: a
backend-only repo skips frontend, a repo with no K8s manifests skips
k8s_iac, regardless of scope. The phase pipeline for each scope is detailed
in the sections below.
Phases
The skill runs default phases plus opt-in phases. Phases marked [parallel] run concurrently after detect/bootstrap.
| Phase script |
Tools |
Scope |
scripts/detect_stack.sh |
— |
Stack detection → .production-readiness/stack.json |
scripts/bootstrap_tools.sh |
brew/pipx/upstream installers |
Installs missing OSS scanners |
phases/secrets.sh [parallel] |
TruffleHog, Gitleaks, detect-secrets |
Git history + working tree |
phases/deps.sh [parallel] |
OSV-Scanner, pnpm/npm audit, pip-audit |
TS/JS + Python dependencies |
phases/sast.sh [parallel] |
Semgrep CE, Bandit, Ruff |
Source code (OWASP/typescript/react/python rule packs) |
phases/containers.sh [parallel] |
Trivy fs (vuln+secret+misconfig), Hadolint |
Dockerfiles + working tree |
phases/k8s_iac.sh [parallel] |
Checkov, kube-score, Polaris, kubescape |
environments/*.yaml, Helm |
phases/repo_posture.sh [parallel] |
OpenSSF Scorecard |
Repo metadata (GitHub remote required) |
phases/observability.sh [parallel] |
grep heuristics |
Logger, OTel, /healthz, structured logs |
phases/frontend.sh [parallel] |
Lighthouse CI |
Built SPA (perf/a11y/SEO/best-practices) |
phases/resilience.sh [parallel] |
Custom Semgrep rules |
Timeouts, retries, graceful shutdown, bare except |
phases/docs.sh [parallel] |
File presence checks |
README, RUNBOOK, ARCHITECTURE, ADRs |
phases/dast.sh [opt-in] |
OWASP ZAP (Docker) |
Requires --include=dast --target-url=URL |
phases/load.sh [opt-in] |
k6 OSS |
Requires --include=load and scripts under tests/load/ |
phases/visual.sh [opt-in] |
Playwright |
Requires --include=visual --target-url=URL; captures desktop+mobile screenshots |
scripts/render_report.py |
— |
Aggregates raw output → PRODUCTION_READINESS.md + findings.sarif |
Invocation
/production-readiness [--only=phase,phase] [--skip=phase,phase] [--include=dast,load,visual] [--target-url=URL] [--fresh] [--cached] [--no-bootstrap] [--out=PATH]
--only=secrets,deps,k8s_iac — run a subset (overrides defaults).
--skip=frontend,docs — skip listed default phases. Note: dast, load, visual are NOT default; --skip does not affect them. Use --include to opt them in.
--include=dast,visual — opt into expensive/runtime phases.
--target-url=http://localhost:5173 — base URL for dast and visual phases.
--fresh — invalidate cache, re-run every scanner.
--cached — display the previous report unchanged (refuses if HEAD has moved).
--out=docs/PRODUCTION_READINESS.md — output path (parent dir auto-created).
--no-bootstrap — skip the install step (assume tools already on $PATH).
Workflow
One command
scripts/scan.sh orchestrates everything. It runs detect → bootstrap → phases → render automatically. Steps below describe what scan.sh does internally; you don't normally invoke them yourself.
Step 1 — Detect stack
Calls scripts/detect_stack.sh. Writes .production-readiness/stack.json describing detected languages, package managers, container files, K8s manifests, frameworks. The orchestrator uses this to skip irrelevant phases automatically (e.g., skip the frontend phase on a backend-only repo).
Step 2 — Bootstrap tools
Calls scripts/bootstrap_tools.sh. It checks each scanner on $PATH and installs only what is missing, preferring brew on macOS, pipx for Python tools, falling back to upstream script: install URLs (printed for the user; never auto-piped). On Linux, apt is attempted only if passwordless sudo is available; otherwise the install is skipped with a warning. Pass --no-bootstrap to scan.sh to skip this step.
If a tool is unavailable, the orchestrator marks that phase as SKIPPED — tool unavailable rather than failing the whole run.
Host prerequisites:
- bash 3.2+ — works in practice on macOS's stock
/bin/bash. bash 4+ is recommended (and auto-picked-up via #!/usr/bin/env bash if installed via brew install bash).
jq — required for JSON post-processing in observability.sh and docs.sh. Auto-installed by bootstrap_tools.sh. If you pass --no-bootstrap, install jq yourself first.
timeout or gtimeout — recommended. macOS users should brew install coreutils for gtimeout. The orchestrator detects either automatically; if neither is found, phases run without a timeout (and emit a warning).
Step 3 — Run scanners
Run scripts/scan.sh with the user's flags. The orchestrator:
- Loads
.production-readiness/stack.json and the --only/--skip filters.
- Dispatches phase scripts in
scripts/phases/*.sh. Independent phases run in parallel via & + wait.
- Each phase writes
.production-readiness/raw/<phase>.<tool>.json.
- Per-phase exit codes are non-fatal; failures are recorded in
.production-readiness/errors.log.
- Cache: each scan is keyed by
git rev-parse HEAD. --cached short-circuits to the cached report only if HEAD matches .cache-key; otherwise it refuses and tells the user to drop --cached. --fresh deletes .production-readiness/raw/ first.
Step 4 — Synthesize report
Run scripts/render_report.py. It:
- Reads each
.production-readiness/raw/*.json and normalizes to a common finding schema (severity, tool, category, path, line, message, remediation).
- Deduplicates findings that multiple tools surface (e.g., a CVE in both
pnpm audit and OSV-Scanner).
- Applies the rubric in
references/report-format.md to compute the Go/No-Go verdict and per-category scores.
- Writes the report (default
PRODUCTION_READINESS.md) using assets/report-template.md as the skeleton.
- Also writes
.production-readiness/findings.sarif for GitHub code-scanning.
Step 5 — Present results
After the report is written, output to the user:
- The verdict (GO / NO-GO / GO WITH RISKS) and the top 3 blocking issues.
- The full report path.
- Suggested next skills to chain:
security-review for the diff, github-actions to wire CI gates, doc-authoring for missing runbooks, kanopy-drone-deployer to fix environments/*.yaml.
Rules
- Cite file:line for every finding that has one. If a tool does not emit a path/line, omit the cite — never print a placeholder.
- Differentiate intent. A
console.log inside a logger utility (logger.ts, logging/) is INFO, not WARN. The observability phase already excludes those paths.
- Respect
.gitignore. Never scan node_modules, dist, build, .venv, __pycache__, .production-readiness.
- Time-box. Default 600 s per phase, total wall clock left to user. Override via
PRR_PHASE_TIMEOUT_SEC.
- Always include "What's Good". The report's first content section lists conformant practices so the user sees signal, not just noise.
- Never run write-scope commands. No
kubectl apply, no terraform apply, no docker push. Read-only.
- OSS-only. Do not invoke paid/SaaS scanners (SonarCloud, Snyk Cloud, Datadog, Vanta, JFrog Xray) even if API keys are present.
- Verify before recommend. Before suggesting a tool's finding to the user, sanity-check: does the file/line actually exist in the current tree? If a finding is stale, drop it.
Files in this skill
production-readiness/
├── SKILL.md ← this file
├── scripts/
│ ├── bootstrap_tools.sh ← installs missing OSS scanners
│ ├── detect_stack.sh ← writes stack.json
│ ├── scan.sh ← phase orchestrator
│ ├── render_report.py ← finding aggregator + Markdown writer
│ ├── phases/*.sh ← one per phase row in the Phases table above
│ └── semgrep-rules/
│ └── resilience.yml
├── references/
│ ├── checklist.md ← full PRR checklist (12-Factor + SRE PRR + Well-Architected)
│ ├── tool-matrix.md ← tool ↔ dimension mapping with install commands
│ ├── report-format.md ← rubric, severities, verdict logic
│ └── cache-management.md ← cache key strategy, invalidation rules
└── assets/
└── report-template.md ← Markdown skeleton for the final report
When working in this skill, load references/checklist.md to answer "what does prod-ready mean for X?" and references/tool-matrix.md to answer "which tool covers Y?". Load references/report-format.md only when synthesizing or interpreting the report.
1---2name: production-readiness3description: Run an OSS-only production readiness audit of a codebase and emit a Markdown report with file:line citations, severity-ranked findings, a "What's Good" section, and a Go/No-Go verdict. Use when the user asks to audit production readiness, run a deployment readiness check, perform a pre-release audit, validate ship-readiness, generate a production readiness report (PRR), or scan for security/observability/scalability/reliability gaps before going live. Triggers on phrases like "production readiness", "PRR", "deployment readiness", "pre-release audit", "ship-readiness", "is this prod-ready", "production audit". Supports phase flags (--only, --skip), opt-in DAST/load/visual phases (--include), caching (--cached, --fresh), and parallel execution.4---56# Production Readiness Skill78## Overview910Orchestrate deterministic OSS scanners across a multi-language repo (TypeScript/React, Python, containers, Helm/K8s manifests, IaC) and synthesize results into a single audit report. The skill installs missing tools on demand, runs the scanners in parallel where possible, parses their JSON/SARIF output, and writes a human-readable Markdown report plus machine-readable artifacts to `.production-readiness/`.1112This skill differs from LLM-only readiness reviewers by relying on real CVE/secret/IaC databases (OSV, Trivy DBs, TruffleHog verifiers, Checkov policies). The LLM's role is triage and synthesis, not pattern detection.1314Tools used (all OSS): Trivy, Semgrep CE, TruffleHog, Gitleaks, detect-secrets, OSV-Scanner, pip-audit, Bandit, Ruff, Hadolint, Dockle, Checkov, kube-score, Polaris, kubescape, OpenSSF Scorecard, Lighthouse CI, axe-core, OWASP ZAP (opt-in), k6 (opt-in), Playwright (opt-in).1516## When to invoke1718Invoke on the signals in the Workflow Router table below (prod-ready check, PRR,19pre-release audit, Go/No-Go, ship-readiness scan). Do NOT invoke for narrow20questions ("is this one function safe?") — use `security-review` instead.2122## Workflow Router2324Determine the audit scope before running. This skill has one workflow shape —25audit — but the scope varies. The router picks which phases run; every scope26converges on the same synthesize-and-verdict phase.2728```29Is the user re-reading a prior audit, or running a new one?30 |31 RE-READ (--cached) --> CACHED REVIEW32 | Phases: (verify HEAD unchanged) -> Present cached report33 | Refuses if HEAD moved; tells the user to drop --cached.34 |35 NEW AUDIT --> What scope?36 |37 +-> Whole repo, default coverage (no scope flags)38 | --> FULL AUDIT39 | Phases: Detect -> Bootstrap -> [default parallel phases] -> Synthesize -> Present40 |41 +-> A named subset of phases (--only / --skip)42 | --> SCOPED AUDIT43 | Phases: Detect -> Bootstrap -> [selected phases] -> Synthesize -> Present44 |45 +-> Add runtime/expensive checks (--include=dast,load,visual)46 --> DEEP AUDIT47 Phases: Detect -> Bootstrap -> [default + opt-in phases] -> Synthesize -> Present48```4950**Signal detection:**5152| Signal in request | Scope |53|-------------------|-------|54| "Is this prod-ready?", "run a PRR", "pre-release audit", "Go/No-Go" | Full Audit |55| "Just check secrets and deps", "only scan K8s", "skip the frontend checks" | Scoped Audit |56| "Include a DAST scan", "run load tests too", "capture visual screenshots" | Deep Audit |57| "Show me the last report", "what did the audit say" (unchanged HEAD) | Cached Review |5859Stack detection (`detect_stack.sh`) further prunes phases automatically: a60backend-only repo skips `frontend`, a repo with no K8s manifests skips61`k8s_iac`, regardless of scope. The phase pipeline for each scope is detailed62in the sections below.6364## Phases6566The skill runs default phases plus opt-in phases. Phases marked **[parallel]** run concurrently after detect/bootstrap.6768| Phase script | Tools | Scope |69|---|---|---|70| `scripts/detect_stack.sh` | — | Stack detection → `.production-readiness/stack.json` |71| `scripts/bootstrap_tools.sh` | brew/pipx/upstream installers | Installs missing OSS scanners |72| `phases/secrets.sh` **[parallel]** | TruffleHog, Gitleaks, detect-secrets | Git history + working tree |73| `phases/deps.sh` **[parallel]** | OSV-Scanner, `pnpm/npm audit`, `pip-audit` | TS/JS + Python dependencies |74| `phases/sast.sh` **[parallel]** | Semgrep CE, Bandit, Ruff | Source code (OWASP/typescript/react/python rule packs) |75| `phases/containers.sh` **[parallel]** | Trivy fs (vuln+secret+misconfig), Hadolint | Dockerfiles + working tree |76| `phases/k8s_iac.sh` **[parallel]** | Checkov, kube-score, Polaris, kubescape | `environments/*.yaml`, Helm |77| `phases/repo_posture.sh` **[parallel]** | OpenSSF Scorecard | Repo metadata (GitHub remote required) |78| `phases/observability.sh` **[parallel]** | grep heuristics | Logger, OTel, /healthz, structured logs |79| `phases/frontend.sh` **[parallel]** | Lighthouse CI | Built SPA (perf/a11y/SEO/best-practices) |80| `phases/resilience.sh` **[parallel]** | Custom Semgrep rules | Timeouts, retries, graceful shutdown, bare except |81| `phases/docs.sh` **[parallel]** | File presence checks | README, RUNBOOK, ARCHITECTURE, ADRs |82| `phases/dast.sh` **[opt-in]** | OWASP ZAP (Docker) | Requires `--include=dast --target-url=URL` |83| `phases/load.sh` **[opt-in]** | k6 OSS | Requires `--include=load` and scripts under `tests/load/` |84| `phases/visual.sh` **[opt-in]** | Playwright | Requires `--include=visual --target-url=URL`; captures desktop+mobile screenshots |85| `scripts/render_report.py` | — | Aggregates raw output → `PRODUCTION_READINESS.md` + `findings.sarif` |8687## Invocation8889```90/production-readiness [--only=phase,phase] [--skip=phase,phase] [--include=dast,load,visual] [--target-url=URL] [--fresh] [--cached] [--no-bootstrap] [--out=PATH]91```9293- `--only=secrets,deps,k8s_iac` — run a subset (overrides defaults).94- `--skip=frontend,docs` — skip listed default phases. Note: `dast`, `load`, `visual` are NOT default; `--skip` does not affect them. Use `--include` to opt them in.95- `--include=dast,visual` — opt into expensive/runtime phases.96- `--target-url=http://localhost:5173` — base URL for `dast` and `visual` phases.97- `--fresh` — invalidate cache, re-run every scanner.98- `--cached` — display the previous report unchanged (refuses if `HEAD` has moved).99- `--out=docs/PRODUCTION_READINESS.md` — output path (parent dir auto-created).100- `--no-bootstrap` — skip the install step (assume tools already on `$PATH`).101102## Workflow103104### One command105106`scripts/scan.sh` orchestrates everything. It runs detect → bootstrap → phases → render automatically. Steps below describe what `scan.sh` does internally; you don't normally invoke them yourself.107108### Step 1 — Detect stack109110Calls `scripts/detect_stack.sh`. Writes `.production-readiness/stack.json` describing detected languages, package managers, container files, K8s manifests, frameworks. The orchestrator uses this to skip irrelevant phases automatically (e.g., skip the `frontend` phase on a backend-only repo).111112### Step 2 — Bootstrap tools113114Calls `scripts/bootstrap_tools.sh`. It checks each scanner on `$PATH` and installs only what is missing, preferring `brew` on macOS, `pipx` for Python tools, falling back to upstream `script:` install URLs (printed for the user; never auto-piped). On Linux, `apt` is attempted only if passwordless sudo is available; otherwise the install is skipped with a warning. Pass `--no-bootstrap` to `scan.sh` to skip this step.115116If a tool is unavailable, the orchestrator marks that phase as **SKIPPED — tool unavailable** rather than failing the whole run.117118**Host prerequisites:**119- **bash 3.2+** — works in practice on macOS's stock `/bin/bash`. bash 4+ is recommended (and auto-picked-up via `#!/usr/bin/env bash` if installed via `brew install bash`).120- **`jq`** — required for JSON post-processing in `observability.sh` and `docs.sh`. Auto-installed by `bootstrap_tools.sh`. If you pass `--no-bootstrap`, install jq yourself first.121- **`timeout` or `gtimeout`** — recommended. macOS users should `brew install coreutils` for `gtimeout`. The orchestrator detects either automatically; if neither is found, phases run without a timeout (and emit a warning).122123### Step 3 — Run scanners124125Run `scripts/scan.sh` with the user's flags. The orchestrator:1261. Loads `.production-readiness/stack.json` and the `--only`/`--skip` filters.1272. Dispatches phase scripts in `scripts/phases/*.sh`. Independent phases run in parallel via `&` + `wait`.1283. Each phase writes `.production-readiness/raw/<phase>.<tool>.json`.1294. Per-phase exit codes are non-fatal; failures are recorded in `.production-readiness/errors.log`.1305. Cache: each scan is keyed by `git rev-parse HEAD`. `--cached` short-circuits to the cached report only if `HEAD` matches `.cache-key`; otherwise it refuses and tells the user to drop `--cached`. `--fresh` deletes `.production-readiness/raw/` first.131132### Step 4 — Synthesize report133134Run `scripts/render_report.py`. It:1351. Reads each `.production-readiness/raw/*.json` and normalizes to a common finding schema (`severity`, `tool`, `category`, `path`, `line`, `message`, `remediation`).1362. Deduplicates findings that multiple tools surface (e.g., a CVE in both `pnpm audit` and OSV-Scanner).1373. Applies the rubric in `references/report-format.md` to compute the **Go/No-Go verdict** and per-category scores.1384. Writes the report (default `PRODUCTION_READINESS.md`) using `assets/report-template.md` as the skeleton.1395. Also writes `.production-readiness/findings.sarif` for GitHub code-scanning.140141### Step 5 — Present results142143After the report is written, output to the user:1441. The **verdict** (GO / NO-GO / GO WITH RISKS) and the top 3 blocking issues.1452. The full report path.1463. Suggested next skills to chain: `security-review` for the diff, `github-actions` to wire CI gates, `doc-authoring` for missing runbooks, `kanopy-drone-deployer` to fix `environments/*.yaml`.147148## Rules149150- **Cite file:line for every finding** that has one. If a tool does not emit a path/line, omit the cite — never print a placeholder.151- **Differentiate intent.** A `console.log` inside a logger utility (`logger.ts`, `logging/`) is INFO, not WARN. The observability phase already excludes those paths.152- **Respect `.gitignore`.** Never scan `node_modules`, `dist`, `build`, `.venv`, `__pycache__`, `.production-readiness`.153- **Time-box.** Default 600 s per phase, total wall clock left to user. Override via `PRR_PHASE_TIMEOUT_SEC`.154- **Always include "What's Good".** The report's first content section lists conformant practices so the user sees signal, not just noise.155- **Never run write-scope commands.** No `kubectl apply`, no `terraform apply`, no `docker push`. Read-only.156- **OSS-only.** Do not invoke paid/SaaS scanners (SonarCloud, Snyk Cloud, Datadog, Vanta, JFrog Xray) even if API keys are present.157- **Verify before recommend.** Before suggesting a tool's finding to the user, sanity-check: does the file/line actually exist in the current tree? If a finding is stale, drop it.158159## Files in this skill160161```162production-readiness/163├── SKILL.md ← this file164├── scripts/165│ ├── bootstrap_tools.sh ← installs missing OSS scanners166│ ├── detect_stack.sh ← writes stack.json167│ ├── scan.sh ← phase orchestrator168│ ├── render_report.py ← finding aggregator + Markdown writer169│ ├── phases/*.sh ← one per phase row in the Phases table above170│ └── semgrep-rules/171│ └── resilience.yml172├── references/173│ ├── checklist.md ← full PRR checklist (12-Factor + SRE PRR + Well-Architected)174│ ├── tool-matrix.md ← tool ↔ dimension mapping with install commands175│ ├── report-format.md ← rubric, severities, verdict logic176│ └── cache-management.md ← cache key strategy, invalidation rules177└── assets/178 └── report-template.md ← Markdown skeleton for the final report179```180181When working in this skill, load `references/checklist.md` to answer "what does prod-ready mean for X?" and `references/tool-matrix.md` to answer "which tool covers Y?". Load `references/report-format.md` only when synthesizing or interpreting the report.