skills/mine/impl-peer-review/SKILL.md
Cross-LLM peer review of an implemented change (the diff) via `compozy exec`: an independent reviewer runtime pressure-tests the diff and writes one scoped Markdown findings artifact for user-directed remediation. Project-agnostic — any repo or language; auto-discovers project rule files and the verify command. Use after an implementation pass (feature, bug fix, refactor) when the user explicitly asks for an external review of the diff before commit or PR. Do not use for spec/TechSpec review — use spec-peer-review.
npx skillsauth add pedronauck/skills impl-peer-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
An independent reviewer runtime pressure-tests an implementation diff. This skill runs that
cross-LLM review only on explicit user request after an implementation pass; its scope is the diff
plus any --context files the user names, decoupled from any task-tracking system. Compozy is
the review engine: each round is one compozy exec against a configurable runtime. The findings
file the reviewer writes is the sole source of truth — treat compozy exec stdout/stderr and the
event log as operational evidence only.
Resolve every scripts/<name> or references/<name> path relative to this SKILL.md's directory
(<skill-dir>). All bundled files are read-only — read or run them, never edit them during a round.
When a step tells you to ask the user (which findings to incorporate, whether to run another round), use the runtime's interactive question tool — the one that presents a question and pauses until the user answers (e.g. AskUserQuestion). If the runtime has no such tool, present the question as the complete assistant message and stop; answer it yourself only after the user replies.
All inputs are optional. Defaults make the common path impl-peer-review with no arguments.
--files <p1,p2,...> — scope the review to explicit paths instead of the full branch diff.--context <p1,p2,...> — additional context files to feed the reviewer (a spec, ADR, design
doc, RFC, README). The skill never assumes any of these exist.--base <git-ref> — base ref for the diff. Defaults to main. Use --base HEAD~N for a
narrower scope.--staged — review staged changes only (git diff --staged) instead of a branch diff.--out <dir> — output directory for round artifacts. See Output Directory.--verify <cmd> — the verification command (build/tests) used as both the readiness gate and
the post-remediation gate. When omitted, auto-detect per references/readiness-checks.md; if
none resolves, ask the user.--ide <ide> (default claude): reviewer runtime, forwarded to compozy exec --ide. Accepted
values mirror compozy exec: codex, claude, cursor-agent, droid, opencode, pi,
gemini, copilot. On an invalid value, list the accepted values and ask the user to choose —
do not fall back to claude.--model <name> (default opus): forwarded to compozy exec --model. Do not pre-validate; let
compozy surface incompatibilities (see Step 3 for the stale-model response).--reasoning <effort> (default xhigh): forwarded to compozy exec --reasoning-effort.
Accepted: low, medium, high, xhigh.Resolve <out> in this order:
--out if provided..compozy/tasks/<slug>/ layout for the current
work, use that task's qa/ directory: .compozy/tasks/<slug>/qa/..peer-reviews/<UTC-timestamp-YYYYMMDDTHHMMSSZ>/ at the repository root.Create the directory if it does not exist. Every artifact is versioned with -roundN; never
overwrite a prior round — increment to the next round instead.
Each round has exactly one authoritative findings file: <out>/impl-review-findings-roundN.md.
The reviewer writes that file and no other. If the target path is missing, ambiguous, unwritable,
or outside <out>, the reviewer refuses and stops — no stdout fallback.
The findings format — frontmatter, section headings, and per-item fields — is defined in
references/impl-review-prompt.md and enforced by scripts/validate-findings.sh.
Step 0: Verify Compozy is available
Confirm the compozy binary is on PATH (e.g. command -v compozy). If missing, abort with a
one-line message to install Compozy; the cross-LLM independence is the point, so require it rather
than falling back to a harness-native subagent. This skill calls compozy exec directly — no
--agent install is required.
Step 1: Validate Input and Compute Scope
--files is provided, verify each path exists and limit the diff to those paths.--staged is provided, use git diff --staged.git diff <base>...HEAD --name-only (default <base> is main) to compute the
changed file set. If the diff is empty, abort and tell the user there is nothing to review.<out> (see Output Directory) and create it if needed.--verify, else auto-detect, else ask the user).references/readiness-checks.md in full before running the review. Verify every
readiness marker passes; the markers and their auto-detect order live in that file. If any
marker fails, report the failed markers and abort — external review on a broken or incomplete
change wastes credit and produces noise.<out>/impl-review-findings-round*.md and <out>/impl-review-summary-round*.md files. Start at
round1 when none exist.Step 2: Compose the Review Prompt
references/impl-review-prompt.md in full before composing the prompt. It is the
canonical executable reviewer prompt template; substitute its placeholders verbatim and do not
paraphrase it. The assembled prompt must start with the reviewer instructions, not with a
Markdown wrapper describing the template.git diff <base>...HEAD -- <changed-files> (or git diff --staged -- <changed-files> for
--staged) and write the raw patch to <out>/impl-review-diff-roundN.patch.git log --oneline <base>...HEAD -- <changed-files> and capture the commit list (empty
string if --staged).<out>/: impl-review-findings-roundN.md,
impl-review-events-roundN.jsonl (event log), impl-review-result-roundN.err (stderr),
impl-review-status-before-roundN.txt, impl-review-status-after-roundN.txt, and
impl-review-validation-error-roundN.md (only when needed).{project_rules}: root-level CLAUDE.md,
AGENTS.md, .cursor/rules/*, .cursorrules, CONTRIBUTING.md; nested CLAUDE.md/AGENTS.md
in the directories the diff touches; and any project memory/directive docs (e.g. docs/_memory/,
standing directives, lessons indexes). Nested and memory rules hold the load-bearing invariants
root-only discovery misses.{scope_summary} — one-paragraph description of what was implemented. Derive from the user's
brief, the commit messages, or — if --context was passed — the linked spec/PRD.{context_paths} — newline-separated repo-root paths from --context, or none. When the
reviewed diff implements a task from a spec directory (e.g. .compozy/tasks/<slug>/,
specs/<name>/, docs/rfcs/<name>/), also include that spec's contract-bearing sibling
artifacts here even when the user passed no --context (see Guardrails: Contract parity).{project_rules} — newline-separated discovered rule-file paths, or none.{changed_files} — newline-separated repo-root paths.{diff_path} — repo-root path to the patch file from step 2.{commit_list} — captured git log --oneline output, or none if --staged.{findings_path} — exact absolute path to <out>/impl-review-findings-roundN.md.{round} — numeric review round N.<out>/impl-review-prompt-roundN.md.Step 3: Execute the Cross-LLM Review
Capture the pre-run status snapshot:
git status --short > <out>/impl-review-status-before-roundN.txt
Run (substitute the resolved --ide/--model/--reasoning, defaults claude/opus/xhigh):
compozy exec --ide <ide> --model <model> --reasoning-effort <reasoning> --format json --prompt-file <out>/impl-review-prompt-roundN.md > <out>/impl-review-events-roundN.jsonl 2> <out>/impl-review-result-roundN.err
Capture the post-run status snapshot:
git status --short > <out>/impl-review-status-after-roundN.txt
If the command exits non-zero, fail loudly — no silent retry. If stderr shows
The model 'X' does not exist, the runtime may be set to a stale name: surface the configured
model and confirm with the user before rerunning; do not substitute a model yourself.
Require the findings target file to exist after the command exits. If missing, the round is
invalid even when compozy exec exited 0 — write impl-review-validation-error-roundN.md and
ask whether to rerun.
Step 4: Validate and Summarize Findings
Run the bundled read-only validator:
bash <skill-dir>/scripts/validate-findings.sh --kind implementation --round N --path <out>/impl-review-findings-roundN.md
Manually inspect the findings file and verify the semantic contract:
TBD, placeholder text, invented paths, or stdout-only findings;{context_paths}, the findings explicitly assess
contract parity field by field (see Guardrails: Contract parity) — a SHIP verdict with no
contract-parity assessment is an invalid round;If validation fails, write <out>/impl-review-validation-error-roundN.md with the failed
checks, command, exit status, and artifact paths. Do not summarize the round as SHIP.
Write <out>/impl-review-summary-roundN.md from the validated findings file with: the verdict
(SHIP / FIX_BEFORE_SHIP / REWORK); one-line rationale per blocker; the risks list; the
nits list; files most likely affected by remediation; and the operational artifact paths.
Present a concise user-facing summary: verdict, blocker/risk/nit counts, main themes, and the artifact paths written for the round.
Hold all source, test, config, doc, and commit edits until Step 5.
Step 5: User-Directed Remediation
<out>/impl-review-remediation-roundN.md, listing:
incorporated items with the new commit/diff range; deferred items; files changed; and the
verification command and outcome with a timestamp.Step 6: Optional Additional Rounds
roundN+1 artifact set in the same <out> directory.Contract parity. For a spec-workflow diff, engineering quality alone can never earn SHIP.
When the diff implements a task from a spec directory (.compozy/tasks/<slug>/, specs/<name>/,
docs/rfcs/<name>/), the reviewer must receive that spec's contract-bearing sibling artifacts —
canonical example documents, input/schema tables, QA seeds, test contracts, parity maps — and
assess the deliverable against them field by field. A round whose {context_paths} omitted those
artifacts is invalid; a task-file paraphrase is never a sufficient contract source. Real incident:
seven rounds reached SHIP on a deliverable that contradicted the spec's canonical example document
because no round ever received it.
Credit once. compozy exec is the only place this skill spends external review credit. Run it
once per round; rerun only when the round is explicitly invalid and the user asks for it.
development
Deep review of branch diffs, working trees, or GitHub PRs at any size. Use when the user asks for CodeRabbit-grade review, an incremental re-review after new pushes, publication of findings to a PR, a cross-LLM peer-review verdict round, or conformance review against spec artifacts. Don't use for applying fixes, reviewing specs or PRDs as documents, or quick single-file feedback.
tools
Orchestrate Claude and Codex worker TUIs from a controller agent through herdr panes and the herdr socket CLI. Use when delegating bounded tasks to herdr worker panes, running user-activated plan-first delegations (Claude Code plan mode, Codex Plan mode), waiting on native agent status (idle, working, blocked, done), or verifying worker reports. Workers launch as interactive TUIs via herdr agent start — never through headless runners (compozy exec, claude -p, codex exec). Not for cmux workspaces (see cmux-orchestration) and not for end-user herdr control.
tools
TanStack Query, Router, and Form patterns for React. Use when writing useQuery/queryOptions, mutations, caching, file-based routes, search params, loaders, or TanStack Form validation. Don't use for TanStack Start, TanStack DB/collections, Zustand client state, or non-TanStack routing.
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.