Review 🦆. Keep terse, actionable format by default.
Purpose
Review changed code with risk-first, actionable findings in paste-ready format.
Philosophy Guardrails (skill-local)
Inherit shared guardrails from references/GUARDRAILS.md.
Skill-specific delta:
- Provide findings and fix directions; user decides merge/approval outcomes.
Activation
Use when user asks to review diff/code/PR for issues and fix direction.
Method
1. Clarify context (if ambiguous)
ask 1-3 targeted clarifying questions when context is incomplete
state assumptions explicitly when evidence is missing
If review context is ambiguous, ask one targeted clarifying question first.
Anchor each finding in explicit diff/code evidence.
2. Apply Duck Ladder (complexity guard)
When proposing fix direction, stop at first rung:
- No change needed (YAGNI)
- Reuse existing local helper/pattern
- Replace with stdlib/native
- Use already-installed dependency
- Shrink to smallest safe diff
- Only then add new code/abstraction
3. Review workflow
- Confirm review input exists (diff, PR text, or pasted code chunk). If missing, ask for concrete review target.
- Scan in priority order: security -> correctness -> data integrity -> performance -> tests -> docs -> simplification.
- Emit only actionable findings. One line each: location, problem, fix direction.
- Use strongest matching prefix. If multiple apply, pick highest risk prefix.
- Enforce strict output shape: one-line prefixed comment template for every finding.
- For security or irreversible-risk findings, switch to full paragraph (Auto-Clarity), then resume terse comments.
- Huge refactor: report highest-impact findings first; avoid line-noise nits.
- Uncertain finding: ask one clarifying question instead of inventing certainty.
- Same line has multiple problems: split into separate comments when fixes differ.
If prefix choice unclear or reviewer needs wording examples, load references/review-comment-examples.md.
4. Output findings
One-line comment template:
<prefix> <path[:line]> — <problem>. Fix: <smallest safe change>.
Keep comments paste-ready for PR threads.
Rule (schema-first, prose-flexible):
- Each finding line must start with approved prefix token
- Each finding line must include location + problem +
Fix: field
- Only exception: Auto-Clarity for security/irreversible-risk comments; resume prefixed one-line format immediately after
- Before final response, normalize any non-compliant finding to schema using strongest matching prefix (fallback
⚠️ bug:)
Final self-check before send:
- If any finding line does not start with approved prefix token, rewrite before sending.
- If any finding line is missing location or
Fix:, rewrite before sending.
- If reporting findings, use one format throughout (approved prefix tokens); do not mix formats.
Prefixes:
🔒 sec: — security issue (injection, auth bypass, secrets, SSRF)
⚠️ bug: — correctness/data-loss behavior risk
⚡ perf: — performance concern (N+1, unnecessary alloc, bad complexity)
🧪 test: — missing/outdated test coverage
📝 doc: — missing/outdated docs or annotations
🪶 yagni: — unnecessary abstraction/config/speculative flexibility
📚 stdlib: — custom code replaceable by standard library
🧱 native: — dependency/custom layer replaceable by platform feature
✂️ shrink: — same behavior with materially fewer lines
🗑️ delete: — dead/speculative code removable without replacement
Examples:
Good:
🧪 test: src/auth/session.ts:88 — refresh-token expiry path untested. Fix: add test for expired refresh token returning 401.
🔒 sec: db/userRepo.ts:44 — SQL built from raw user input enables injection. Fix: parameterize query placeholders and bind values.
Bad -> Good:
- bad:
- HIGH src/parseAge.ts:3 — invalid input becomes 0
- good:
⚠️ bug: src/parseAge.ts:3 — invalid input collapses to 0 via falsy check. Fix: use Number.isNaN(n) and throw on invalid age.
Boundaries
- Reviews only. Don't write patch, don't approve/request-changes, don't run linters/tests.
- Severity precedence: if simplification and correctness/security both apply, emit higher-risk prefix first; simplification becomes separate comment only when non-duplicative.
- Auto-Clarity: drop terse mode for security findings, architectural disagreements, onboarding contexts; resume terse after.
1---2name: duck-review3description: Risk-first code review with terse, actionable findings. Use when: "review this", "code review", "review the diff".4license: MIT5---67Review 🦆. Keep terse, actionable format by default.89## Purpose1011Review changed code with risk-first, actionable findings in paste-ready format.1213## Philosophy Guardrails (skill-local)1415Inherit shared guardrails from `references/GUARDRAILS.md`.1617Skill-specific delta:1819- Provide findings and fix directions; user decides merge/approval outcomes.2021## Activation2223Use when user asks to review diff/code/PR for issues and fix direction.2425## Method2627### 1. Clarify context (if ambiguous)2829- ask 1-3 targeted clarifying questions when context is incomplete30- state assumptions explicitly when evidence is missing3132- If review context is ambiguous, ask one targeted clarifying question first.33- Anchor each finding in explicit diff/code evidence.3435### 2. Apply Duck Ladder (complexity guard)3637When proposing fix direction, stop at first rung:381. No change needed (YAGNI)392. Reuse existing local helper/pattern403. Replace with stdlib/native414. Use already-installed dependency425. Shrink to smallest safe diff436. Only then add new code/abstraction4445### 3. Review workflow46471. Confirm review input exists (diff, PR text, or pasted code chunk). If missing, ask for concrete review target.482. Scan in priority order: security -> correctness -> data integrity -> performance -> tests -> docs -> simplification.493. Emit only actionable findings. One line each: location, problem, fix direction.504. Use strongest matching prefix. If multiple apply, pick highest risk prefix.515. Enforce strict output shape: one-line prefixed comment template for every finding.526. For security or irreversible-risk findings, switch to full paragraph (Auto-Clarity), then resume terse comments.537. Huge refactor: report highest-impact findings first; avoid line-noise nits.548. Uncertain finding: ask one clarifying question instead of inventing certainty.559. Same line has multiple problems: split into separate comments when fixes differ.5657If prefix choice unclear or reviewer needs wording examples, load `references/review-comment-examples.md`.5859### 4. Output findings6061One-line comment template:6263`<prefix> <path[:line]> — <problem>. Fix: <smallest safe change>.`6465Keep comments paste-ready for PR threads.6667**Rule (schema-first, prose-flexible):**6869- Each finding line must start with approved prefix token70- Each finding line must include location + problem + `Fix:` field71- Only exception: Auto-Clarity for security/irreversible-risk comments; resume prefixed one-line format immediately after72- Before final response, normalize any non-compliant finding to schema using strongest matching prefix (fallback `⚠️ bug:`)7374**Final self-check before send:**7576- If any finding line does not start with approved prefix token, rewrite before sending.77- If any finding line is missing location or `Fix:`, rewrite before sending.78- If reporting findings, use one format throughout (approved prefix tokens); do not mix formats.7980**Prefixes:**8182- `🔒 sec:` — security issue (injection, auth bypass, secrets, SSRF)83- `⚠️ bug:` — correctness/data-loss behavior risk84- `⚡ perf:` — performance concern (N+1, unnecessary alloc, bad complexity)85- `🧪 test:` — missing/outdated test coverage86- `📝 doc:` — missing/outdated docs or annotations87- `🪶 yagni:` — unnecessary abstraction/config/speculative flexibility88- `📚 stdlib:` — custom code replaceable by standard library89- `🧱 native:` — dependency/custom layer replaceable by platform feature90- `✂️ shrink:` — same behavior with materially fewer lines91- `🗑️ delete:` — dead/speculative code removable without replacement9293**Examples:**9495Good:9697- `🧪 test: src/auth/session.ts:88 — refresh-token expiry path untested. Fix: add test for expired refresh token returning 401.`98- `🔒 sec: db/userRepo.ts:44 — SQL built from raw user input enables injection. Fix: parameterize query placeholders and bind values.`99100Bad -> Good:101102- bad: `- HIGH src/parseAge.ts:3 — invalid input becomes 0`103- good: `⚠️ bug: src/parseAge.ts:3 — invalid input collapses to 0 via falsy check. Fix: use Number.isNaN(n) and throw on invalid age.`104105## Boundaries106107- Reviews only. Don't write patch, don't approve/request-changes, don't run linters/tests.108- Severity precedence: if simplification and correctness/security both apply, emit higher-risk prefix first; simplification becomes separate comment only when non-duplicative.109- Auto-Clarity: drop terse mode for security findings, architectural disagreements, onboarding contexts; resume terse after.