Pre-release Review
Run a read-only production release readiness review. The goal is to reduce release time and
coordination failures by finding missing deploy materials, unsafe ordering, configuration gaps,
data migration gaps, and ambiguous production risks before CI/CD or manual release steps begin.
This skill never mutates source code, configs, migrations, secrets, deployment files, or remote
infrastructure. It produces a concise, prioritized report of confirmed problems and plausible
risks that need confirmation.
When to Use
- The user asks for a release audit, pre-release review, go-live review, or deploy readiness check.
- Before publishing a tag, deploying production services, or merging a release branch.
- A PR or git range may include migrations, environment changes, queues, cache behavior, object
storage assets, or service contract changes.
- The user asks whether a change is safe to ship and needs a read-only risk report.
Prerequisites
- Git available on
PATH.
gh CLI (optional) — used only when available and authenticated for PR diffs. If missing or
unauthenticated, fall back to local branch/patch/explicit git range. Do not invent PR contents.
rg (ripgrep) — used for pattern-based evidence collection.
- Windows host (PowerShell) is the primary environment. Commands below use POSIX-style flags
that work in PowerShell when wrapped in double quotes or passed via
git/rg directly. On
Windows, prefer quoting arguments containing <..> ranges with double quotes, e.g.
git diff --stat "v1.2.3..HEAD".
Non-negotiable Rules
- Do not modify source code, configs, migrations, secrets, deployment files, or generated files.
- Do not execute migrations, clear or warm caches, upload assets, trigger CI/CD, deploy
services, publish tags, rotate secrets, or change remote infrastructure.
- Produce a concise report that lists only confirmed problems and plausible risks needing
confirmation. Do not bury the reader in clean checklist items.
- Sort findings from highest to lowest priority (P0 → P1 → P2).
- For each finding include: module, finding, evidence, inferred owner, risk, recommended action.
- Never reveal private keys, account passwords, tokens, certificates, cookies, or full secret
values. Report only: file path, line number, variable name, secret type, and a redacted hint.
- If evidence is incomplete but the risk could block production, list it as a confirmation item.
Required References
Load these reference files at specific points in the workflow:
| Reference file |
When to load |
references/checklist.md |
Before analyzing findings — ensures important release domains (migrations, config, cache, queues, assets, contracts) are not skipped. |
references/report-template.md |
Before writing the final report — keeps priorities, owner inference, secret redaction, and output shape consistent. |
If a reference file is missing, note the limitation in the report's "Unable To Verify" section
only when it affects the release review.
Project Guidance Discovery
Before interpreting the release diff, look for project-local guidance files such as AGENTS.md
and CLAUDE.md in the repository root and relevant service directories.
- Read them when present so the review respects project-specific conventions, service boundaries,
release rules, validation expectations, ownership hints, and known operational constraints.
- Treat project guidance as context for how to interpret risks, not as permission to perform
mutating release actions.
- If project guidance conflicts with this skill's non-negotiable safety rules, the read-only,
no-secret-disclosure rules in this skill win.
- If a relevant guidance file cannot be read, note the limitation in "Unable To Verify" only when
it affects the release review.
Procedure
Step 1 — Determine the Review Scope
State the chosen range in the report.
- PR provided (URL or number): review that PR diff first.
- Explicit
base..head range provided: use it directly.
- Only a head commit provided: compare the previous usable release tag reachable from that
commit to the head commit.
- No scope provided: compare the previous usable release tag to
HEAD.
- Choosing the previous usable release tag:
- Prefer the repository's visible release-tag convention when obvious (semantic versions,
v*, or release-*). If tag naming is mixed, state the assumption.
- If
HEAD is exactly at one or more tags, treat those as the current release point and compare
against the earlier reachable release tag, not HEAD's own tag.
- If no usable previous release tag exists, review the latest 5 commits and explicitly
warn: "No usable previous release tag found; audit only covers the latest 5 commits.
Recommend a PR or tag-based range for future reviews."
Step 2 — Read-Only Evidence Collection
Run only safe inspection commands, adjusted to the repository and current permissions.
git status --short
git rev-parse --show-toplevel
git rev-parse --abbrev-ref HEAD
git rev-parse HEAD
rg --files -g "AGENTS.md" -g "CLAUDE.md"
git tag --merged HEAD --sort=-creatordate
git tag --points-at HEAD
git for-each-ref --sort=-creatordate --format="%(refname:short) %(objectname:short)" refs/tags
git describe --tags --abbrev=0 HEAD
git diff --name-status "<base>..<head>"
git diff --stat "<base>..<head>"
git log --oneline --decorate --no-merges "<base>..<head>"
git diff -U3 "<base>..<head>" -- "<path>"
git blame -L "<start>,<end>" -- "<path>"
git log --format="%h %an %s" -- "<path>"
rg -n "<pattern>" .
For PRs, use gh pr view and gh pr diff only when available and allowed. Do not bypass network,
auth, sandbox, or approval restrictions. If a command cannot run, record the limitation in the
report's "Unable To Verify" section.
Step 3 — Review Workflow
- Confirm the git repository root, current branch, dirty state, and selected comparison range.
- Collect changed file names, file status, diff stats, commit summaries, and touched services.
- Inspect relevant diffs rather than relying on filenames alone.
- Load
references/checklist.md and map changed code to production requirements:
- Schema changes → migrations, indexes, seeds, and backfills.
- Config reads → env examples, deploy secrets, flags, and runtime config.
- Cache key or TTL changes → invalidation, prewarm, and compatibility work.
- Queue producers/consumers → topic setup, DLQ, idempotency, and deploy order.
- Asset references → object storage, CDN, templates, certificates, and permissions.
- Service contract changes → deploy sequence, backward compatibility, and rollback risk.
- Infer owners with
git blame on changed lines when possible; otherwise use recent git log
authors for the file or commit. Label them as inferred owners and do not include email
addresses.
- Classify each finding as P0, P1, or P2 using
references/report-template.md.
- Write the final report in the user's language when practical. Keep conclusion values exactly as
BLOCKED, NEEDS_CONFIRMATION, or NO_BLOCKER_FOUND.
Step 4 — Dirty Worktree Handling
By default, review only the selected committed range. Do not silently mix uncommitted or
untracked changes into the release diff unless the user explicitly asks to include worktree
changes.
- Always report whether the worktree is dirty.
- If dirty or untracked files touch release-relevant areas (migrations, deployment config, env
examples, CI/CD, secrets, cache, queues, assets, or service contracts), add a P2 confirmation
item saying those changes are excluded from the committed-range review and must be committed,
discarded, or reviewed separately before release.
- If the user explicitly asks to include dirty worktree changes, inspect them with read-only
commands such as
git diff and git diff --name-status, and clearly label them as
uncommitted evidence.
Step 5 — Evidence Expectations
Every finding should cite concrete evidence:
- File path and line number when available.
- Commit hash or PR reference when line evidence is not enough.
- Command limitation when evidence could not be collected.
- Diff relationship, e.g. "schema changed but no migration file changed".
Do not state that something is safe just because no file matched a pattern. Use "not verified"
for areas that cannot be confirmed from local repository evidence.
Step 6 — Findings vs. Verification Limits
Separate release confirmation items from neutral tool limits:
- A release confirmation item is a diff-linked production risk — e.g. a new env var whose
production secret cannot be verified, a schema change with unclear migration status, or a new
queue whose infrastructure cannot be confirmed. Classify as P1 or P2 and set conclusion to
NEEDS_CONFIRMATION unless a P0 also exists.
- An "Unable To Verify" entry is a neutral limitation — e.g. missing remote access or
deployment platform credentials when the diff does not introduce a specific release requirement.
Neutral limitations do not change the conclusion by themselves.
- If a limitation blocks confirmation of a release-critical diff change, promote it to a
P1/P2 finding rather than leaving it only in "Unable To Verify".
- Use
NO_BLOCKER_FOUND only when no P0–P2 findings or release confirmation items were found from
available evidence. The report may still include neutral verification limits.
Step 7 — Output Rules
- Show P0 and P1 findings first, then P2 confirmation items.
- Do not list clean checklist categories.
- Include a service deployment order section only when the diff touches multiple services,
asynchronous workers, migrations, queues, cache, or public contracts.
- If no P0 blocker is found but P1/P2 confirmation items remain, use
NEEDS_CONFIRMATION.
- If no P0–P2 findings exist, include the reviewed range and any neutral verification limits.
- Keep the report short enough for a release manager to act on immediately.
Pitfalls
- Mixing uncommitted changes into the release diff — always state whether the worktree is
dirty and exclude uncommitted changes by default.
- Inventing PR contents when
gh is unavailable — never fabricate diff content; ask for a
local branch or explicit range instead.
- Disclosing secrets in the report — report only file path, line number, variable name, secret
type, and a redacted hint. Never include full values.
- Claiming safety from absence of matches — "no file matched a pattern" is not proof of
safety; use "not verified" instead.
- Treating project guidance as permission to mutate —
AGENTS.md/CLAUDE.md are context only;
this skill's read-only rules always win.
- Leaving release-critical limitations as neutral — if a limitation blocks confirmation of a
release-critical diff change, promote it to P1/P2.
- Burying the reader in clean checklist items — the report lists only confirmed problems and
plausible risks, not a full pass/fail checklist.
- Including email addresses in inferred owners — label as inferred owners and omit emails.
Verification
After running the review, verify the skill executed correctly:
Confirm read-only compliance — no files were modified:
git status --short
Expected: same dirty/clean state as before the review (no new changes introduced by the skill).
Confirm scope was stated — the report should explicitly name the reviewed range (e.g.
v1.2.3..HEAD, PR #123, or "latest 5 commits — no usable previous release tag").
Confirm conclusion value — the report's conclusion must be exactly one of:
BLOCKED — a P0 finding exists.
NEEDS_CONFIRMATION — P1/P2 items remain but no P0.
NO_BLOCKER_FOUND — no P0–P2 findings or confirmation items.
Confirm secret redaction — search the report output for any token-like strings:
rg -n "(?i)(api_key|secret|password|token|private_key)\s*[:=]\s*\S+" .
Expected: no full secret values in the report; only redacted hints.
Confirm reference files were loaded — the report should reflect domains from
references/checklist.md and follow the shape from references/report-template.md.
Limitations
- This skill is read-only and does not deploy, tag, publish, run migrations, rotate secrets,
or change infrastructure.
- It can identify release risks from available evidence, but cannot prove production state
without access to the relevant deployment, secrets, database, queue, cache, or observability
systems.
- It should not replace service-owner signoff for high-risk production changes.
Examples
Test Prompts
Use these prompts to validate skill behavior:
- "Run a pre-release review and tell me if this production deploy has risks."
- "Review PR #123 before release. Check migrations, configs, and cache work."
- "This repo has no tags. Use the default strategy and audit release readiness."
- "Check
v1.2.3..HEAD for backend go-live blockers."
Report Conclusion Values
| Conclusion |
Meaning |
BLOCKED |
A P0 finding exists; do not release until resolved. |
NEEDS_CONFIRMATION |
P1/P2 items remain; release may proceed with owner signoff. |
NO_BLOCKER_FOUND |
No P0–P2 findings or confirmation items from available evidence. |
Related Skills
- ci-cd-preflight — validate CI/CD pipeline configuration before triggering a release.
- migration-safety-check — deep-dive into database migration safety and rollback plans.
- secret-scan — scan for leaked secrets in code and configuration files.
1---2name: pre-release-review3description: Runs a read-only go-live review of deploy readiness: migrations, config, secrets redaction, rollout order, rollback risk, and launch blockers, producing a prioritized report. Use when the user asks for a release audit before tagging or deploying. Not for executing migrations, deploying, tagging, or editing release files; never dump live secret values into the report.4license: Apache-2.05---6
7# Pre-release Review
8
9Run a **read-only** production release readiness review. The goal is to reduce release time and
10coordination failures by finding missing deploy materials, unsafe ordering, configuration gaps,
11data migration gaps, and ambiguous production risks **before** CI/CD or manual release steps begin.
12
13This skill never mutates source code, configs, migrations, secrets, deployment files, or remote
14infrastructure. It produces a concise, prioritized report of confirmed problems and plausible
15risks that need confirmation.
16
17## When to Use
18
19- The user asks for a **release audit**, **pre-release review**, **go-live review**, or **deploy readiness check**.
20- Before publishing a tag, deploying production services, or merging a release branch.
21- A PR or git range may include migrations, environment changes, queues, cache behavior, object
22 storage assets, or service contract changes.
23- The user asks whether a change is safe to ship and needs a read-only risk report.
24
25## Prerequisites
26
27- **Git** available on `PATH`.
28- **`gh` CLI** (optional) — used only when available and authenticated for PR diffs. If missing or
29 unauthenticated, fall back to local branch/patch/explicit git range. Do not invent PR contents.
30- **`rg` (ripgrep)** — used for pattern-based evidence collection.
31- **Windows host (PowerShell)** is the primary environment. Commands below use POSIX-style flags
32 that work in PowerShell when wrapped in double quotes or passed via `git`/`rg` directly. On
33 Windows, prefer quoting arguments containing `<..>` ranges with double quotes, e.g.
34 `git diff --stat "v1.2.3..HEAD"`.
35
36## Non-negotiable Rules
37
38- **Do not modify** source code, configs, migrations, secrets, deployment files, or generated files.
39- **Do not execute** migrations, clear or warm caches, upload assets, trigger CI/CD, deploy
40 services, publish tags, rotate secrets, or change remote infrastructure.
41- Produce a **concise report** that lists only confirmed problems and plausible risks needing
42 confirmation. Do not bury the reader in clean checklist items.
43- **Sort findings** from highest to lowest priority (P0 → P1 → P2).
44- For each finding include: **module, finding, evidence, inferred owner, risk, recommended action**.
45- **Never reveal** private keys, account passwords, tokens, certificates, cookies, or full secret
46 values. Report only: file path, line number, variable name, secret type, and a redacted hint.
47- If evidence is incomplete but the risk could block production, list it as a **confirmation item**.
48
49## Required References
50
51Load these reference files at specific points in the workflow:
52
53| Reference file | When to load |
54|---|---|
55| `references/checklist.md` | **Before analyzing findings** — ensures important release domains (migrations, config, cache, queues, assets, contracts) are not skipped. |
56| `references/report-template.md` | **Before writing the final report** — keeps priorities, owner inference, secret redaction, and output shape consistent. |
57
58If a reference file is missing, note the limitation in the report's "Unable To Verify" section
59only when it affects the release review.
60
61## Project Guidance Discovery
62
63Before interpreting the release diff, look for project-local guidance files such as `AGENTS.md`
64and `CLAUDE.md` in the repository root and relevant service directories.
65
66- Read them when present so the review respects project-specific conventions, service boundaries,
67 release rules, validation expectations, ownership hints, and known operational constraints.
68- Treat project guidance as **context** for how to interpret risks, not as permission to perform
69 mutating release actions.
70- If project guidance conflicts with this skill's non-negotiable safety rules, the **read-only,
71 no-secret-disclosure rules in this skill win**.
72- If a relevant guidance file cannot be read, note the limitation in "Unable To Verify" only when
73 it affects the release review.
74
75## Procedure
76
77### Step 1 — Determine the Review Scope
78
79State the chosen range in the report.
80
811. **PR provided** (URL or number): review that PR diff first.
82 - If `gh` is available and authenticated, use read-only commands:
83 ```powershell
84 gh pr view <PR_NUMBER>
85 gh pr diff <PR_NUMBER>
86 ```
87 - If the PR cannot be fetched (missing tooling, auth, or network), say so and ask for a local
88 branch, patch, or explicit git range. **Do not invent the PR contents.**
892. **Explicit `base..head` range provided**: use it directly.
903. **Only a head commit provided**: compare the previous usable release tag reachable from that
91 commit to the head commit.
924. **No scope provided**: compare the previous usable release tag to `HEAD`.
935. **Choosing the previous usable release tag**:
94 - Prefer the repository's visible release-tag convention when obvious (semantic versions,
95 `v*`, or `release-*`). If tag naming is mixed, state the assumption.
96 - If `HEAD` is exactly at one or more tags, treat those as the current release point and compare
97 against the **earlier** reachable release tag, not `HEAD`'s own tag.
98 - If **no usable previous release tag exists**, review the latest **5 commits** and explicitly
99 warn: *"No usable previous release tag found; audit only covers the latest 5 commits.
100 Recommend a PR or tag-based range for future reviews."*
101
102### Step 2 — Read-Only Evidence Collection
103
104Run only safe inspection commands, adjusted to the repository and current permissions.
105
106```powershell
107git status --short
108git rev-parse --show-toplevel
109git rev-parse --abbrev-ref HEAD
110git rev-parse HEAD
111rg --files -g "AGENTS.md" -g "CLAUDE.md"
112git tag --merged HEAD --sort=-creatordate
113git tag --points-at HEAD
114git for-each-ref --sort=-creatordate --format="%(refname:short) %(objectname:short)" refs/tags
115git describe --tags --abbrev=0 HEAD
116git diff --name-status "<base>..<head>"
117git diff --stat "<base>..<head>"
118git log --oneline --decorate --no-merges "<base>..<head>"
119git diff -U3 "<base>..<head>" -- "<path>"
120git blame -L "<start>,<end>" -- "<path>"
121git log --format="%h %an %s" -- "<path>"
122rg -n "<pattern>" .
123```
124
125For PRs, use `gh pr view` and `gh pr diff` only when available and allowed. Do not bypass network,
126auth, sandbox, or approval restrictions. If a command cannot run, record the limitation in the
127report's "Unable To Verify" section.
128
129### Step 3 — Review Workflow
130
1311. Confirm the git repository root, current branch, dirty state, and selected comparison range.
1322. Collect changed file names, file status, diff stats, commit summaries, and touched services.
1333. Inspect relevant diffs rather than relying on filenames alone.
1344. Load `references/checklist.md` and map changed code to production requirements:
135 - **Schema changes** → migrations, indexes, seeds, and backfills.
136 - **Config reads** → env examples, deploy secrets, flags, and runtime config.
137 - **Cache key or TTL changes** → invalidation, prewarm, and compatibility work.
138 - **Queue producers/consumers** → topic setup, DLQ, idempotency, and deploy order.
139 - **Asset references** → object storage, CDN, templates, certificates, and permissions.
140 - **Service contract changes** → deploy sequence, backward compatibility, and rollback risk.
1415. Infer owners with `git blame` on changed lines when possible; otherwise use recent `git log`
142 authors for the file or commit. Label them as **inferred owners** and **do not include email
143 addresses**.
1446. Classify each finding as **P0**, **P1**, or **P2** using `references/report-template.md`.
1457. Write the final report in the user's language when practical. Keep conclusion values exactly as
146 `BLOCKED`, `NEEDS_CONFIRMATION`, or `NO_BLOCKER_FOUND`.
147
148### Step 4 — Dirty Worktree Handling
149
150By default, review only the selected committed range. Do not silently mix uncommitted or
151untracked changes into the release diff unless the user explicitly asks to include worktree
152changes.
153
154- **Always report** whether the worktree is dirty.
155- If dirty or untracked files touch release-relevant areas (migrations, deployment config, env
156 examples, CI/CD, secrets, cache, queues, assets, or service contracts), add a **P2 confirmation
157 item** saying those changes are excluded from the committed-range review and must be committed,
158 discarded, or reviewed separately before release.
159- If the user explicitly asks to include dirty worktree changes, inspect them with read-only
160 commands such as `git diff` and `git diff --name-status`, and clearly label them as
161 **uncommitted evidence**.
162
163### Step 5 — Evidence Expectations
164
165Every finding should cite concrete evidence:
166
167- File path and line number when available.
168- Commit hash or PR reference when line evidence is not enough.
169- Command limitation when evidence could not be collected.
170- Diff relationship, e.g. *"schema changed but no migration file changed"*.
171
172Do not state that something is safe just because no file matched a pattern. Use **"not verified"**
173for areas that cannot be confirmed from local repository evidence.
174
175### Step 6 — Findings vs. Verification Limits
176
177Separate release confirmation items from neutral tool limits:
178
179- A **release confirmation item** is a diff-linked production risk — e.g. a new env var whose
180 production secret cannot be verified, a schema change with unclear migration status, or a new
181 queue whose infrastructure cannot be confirmed. Classify as P1 or P2 and set conclusion to
182 `NEEDS_CONFIRMATION` unless a P0 also exists.
183- An **"Unable To Verify"** entry is a neutral limitation — e.g. missing remote access or
184 deployment platform credentials when the diff does not introduce a specific release requirement.
185 Neutral limitations do not change the conclusion by themselves.
186- If a limitation blocks confirmation of a release-critical diff change, **promote it** to a
187 P1/P2 finding rather than leaving it only in "Unable To Verify".
188- Use `NO_BLOCKER_FOUND` only when no P0–P2 findings or release confirmation items were found from
189 available evidence. The report may still include neutral verification limits.
190
191### Step 7 — Output Rules
192
193- Show **P0 and P1** findings first, then **P2** confirmation items.
194- **Do not list** clean checklist categories.
195- Include a **service deployment order** section only when the diff touches multiple services,
196 asynchronous workers, migrations, queues, cache, or public contracts.
197- If no P0 blocker is found but P1/P2 confirmation items remain, use `NEEDS_CONFIRMATION`.
198- If no P0–P2 findings exist, include the reviewed range and any neutral verification limits.
199- Keep the report short enough for a release manager to act on immediately.
200
201## Pitfalls
202
203- **Mixing uncommitted changes into the release diff** — always state whether the worktree is
204 dirty and exclude uncommitted changes by default.
205- **Inventing PR contents** when `gh` is unavailable — never fabricate diff content; ask for a
206 local branch or explicit range instead.
207- **Disclosing secrets in the report** — report only file path, line number, variable name, secret
208 type, and a redacted hint. Never include full values.
209- **Claiming safety from absence of matches** — "no file matched a pattern" is not proof of
210 safety; use "not verified" instead.
211- **Treating project guidance as permission to mutate** — `AGENTS.md`/`CLAUDE.md` are context only;
212 this skill's read-only rules always win.
213- **Leaving release-critical limitations as neutral** — if a limitation blocks confirmation of a
214 release-critical diff change, promote it to P1/P2.
215- **Burying the reader in clean checklist items** — the report lists only confirmed problems and
216 plausible risks, not a full pass/fail checklist.
217- **Including email addresses in inferred owners** — label as inferred owners and omit emails.
218
219## Verification
220
221After running the review, verify the skill executed correctly:
222
2231. **Confirm read-only compliance** — no files were modified:
224 ```powershell
225 git status --short
226 ```
227 Expected: same dirty/clean state as before the review (no new changes introduced by the skill).
228
2292. **Confirm scope was stated** — the report should explicitly name the reviewed range (e.g.
230 `v1.2.3..HEAD`, PR #123, or "latest 5 commits — no usable previous release tag").
231
2323. **Confirm conclusion value** — the report's conclusion must be exactly one of:
233 - `BLOCKED` — a P0 finding exists.
234 - `NEEDS_CONFIRMATION` — P1/P2 items remain but no P0.
235 - `NO_BLOCKER_FOUND` — no P0–P2 findings or confirmation items.
236
2374. **Confirm secret redaction** — search the report output for any token-like strings:
238 ```powershell
239 rg -n "(?i)(api_key|secret|password|token|private_key)\s*[:=]\s*\S+" .
240 ```
241 Expected: no full secret values in the report; only redacted hints.
242
2435. **Confirm reference files were loaded** — the report should reflect domains from
244 `references/checklist.md` and follow the shape from `references/report-template.md`.
245
246## Limitations
247
248- This skill is **read-only** and does not deploy, tag, publish, run migrations, rotate secrets,
249 or change infrastructure.
250- It can identify release risks from available evidence, but **cannot prove production state**
251 without access to the relevant deployment, secrets, database, queue, cache, or observability
252 systems.
253- It should **not replace service-owner signoff** for high-risk production changes.
254
255## Examples
256
257### Test Prompts
258
259Use these prompts to validate skill behavior:
260
261- *"Run a pre-release review and tell me if this production deploy has risks."*
262- *"Review PR #123 before release. Check migrations, configs, and cache work."*
263- *"This repo has no tags. Use the default strategy and audit release readiness."*
264- *"Check `v1.2.3..HEAD` for backend go-live blockers."*
265
266### Report Conclusion Values
267
268| Conclusion | Meaning |
269|---|---|
270| `BLOCKED` | A P0 finding exists; do not release until resolved. |
271| `NEEDS_CONFIRMATION` | P1/P2 items remain; release may proceed with owner signoff. |
272| `NO_BLOCKER_FOUND` | No P0–P2 findings or confirmation items from available evidence. |
273
274## Related Skills
275
276- **ci-cd-preflight** — validate CI/CD pipeline configuration before triggering a release.
277- **migration-safety-check** — deep-dive into database migration safety and rollback plans.
278- **secret-scan** — scan for leaked secrets in code and configuration files.