/corynaegle-agent-skills:code-reviewfrom corynaegle-agent-skills
Review a branch, PR, or uncommitted work against repository standards, requested behavior, and test quality. Includes staged, unstaged, and untracked changes for work in progress.
Ships in corynaegle-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Review along three axes: Standards (repository conventions and regression risk), Spec (the behavior the user requested), and Tests (whether the change's tests would catch real regressions). Report each separately so one passing axis cannot hide another.
Honor the user's base and scope. Work in progress defaults to HEAD and worktree. A branch or PR uses its target branch and branch. Establish the target from tracking or PR metadata; ask only if it cannot be determined. An implementation review uses the recorded task-start commit.
Run the bundled snapshot helper from the project being reviewed, resolving the script from this skill's installed folder:
python3 <skill-folder>/scripts/review-snapshot.py --base <base> --scope <worktree-or-branch>
It prints a private temp directory containing pinned commit IDs, a committed patch, and the commit list. Worktree scope also captures staged and unstaged patches, the combined final diff, and non-ignored untracked contents. Review every relevant artifact, including staged changes later reversed in the worktree. Symlinks are captured as links. The checkout and index remain unchanged. Use repeated --path <root-relative-pathspec> arguments to limit the review to task-owned paths when unrelated work exists. Ignored files need separate explicit inspection if requested.
Both reviewers receive the same snapshot and summary.json. Review the frozen artifacts rather than recomputing a live diff. Consult surrounding source at the recorded revision where needed, and note any later source drift. Keep snapshots private and redact sensitive content in reports. A failed capture must be resolved before review. If every patch is empty and no untracked entries exist, report an empty scope rather than claiming a clean review.
The helper checks the capture twice and rejects changes between reads. Review changed submodule checkouts separately: the superproject patch records their pointers, not full nested diffs.
Use the user's acceptance criteria and supplied spec/issue first, then issue references in commits or a matching local spec under docs/, specs/, or .scratch/. Existing tracker configuration helps fetch issues but is not a prerequisite. If no requirements can be established, report "no spec available" and skip the Spec axis; ask only when missing context prevents a useful requested review.
Read documented standards, including AGENTS.md, CLAUDE.md, CODING_STANDARDS.md, and CONTRIBUTING.md when present. Respect applicable instructions and relevant ADRs.
On top of whatever the repo documents, the Standards axis always carries the smell baseline below: a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:
Each smell reads what it is → how to fix; match it against the diff:
switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.a.b().c().d() navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.The Tests axis applies the installed review-tests skill's review criteria (the risk table in its SKILL.md and its references/review-cases.md) to the change, findings only. Cover:
Don't edit the checkout. Run a counterexample (a temporary production mutation) only in a disposable copy; otherwise label it unexecuted. If the scope changes no tests and no behavior, report "no test-relevant changes".
When delegation is available and permitted, dispatch at most three independent reviewer subagents, one per axis. All are leaf reviewers: give them the snapshot, sources, and their brief, and explicitly say "Perform this review directly. Do not invoke code-review or spawn agents." Otherwise perform the same briefs sequentially and disclose shared context.
When the host lets you pick a model per subagent (for example the Agent tool's model in Claude Code), run the Standards reviewer on the most capable model (opus) and the Spec and Tests reviewers on the mid-tier model (sonnet). Standards carries correctness and security risk, where the stronger model judged severity better and probed further; Spec and Tests matched it on seeded-bug trials at lower usage. Without per-subagent model choice, use the session's model.
For a small change, perform the briefs yourself instead of dispatching reviewers: documentation, comments, or formatting only, or under about 50 changed lines that touch no security, credential, permission, or delivery code. Disclose that the review was not independent. Dispatch anyway when the project's instructions require an independent review.
review-tests' criteria directly rather than running it as a session; findings only. Cite the file and test, the plausible regression it would miss or the harmless change that would break it, the consequence, and the review-tests criterion.Supply the frozen snapshot directory and summary.json to every reviewer. Reference requirements in full or by accessible path. Review requests alone do not authorize source edits.
Present the findings under Standards, Spec, and Tests, preserving each axis's verdict. State the reviewed base, head, scope, and whether review was independent. Report checks actually run and material gaps. End with counts and the highest-impact finding within each axis. If no actionable findings exist, say so and identify remaining validation limits.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
40 skills in this plugin
/ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo./chief-of-staffPursue a long-running goal in a single session by co-ordinating subagents./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow./domain-modelingBuild and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.npx claudepluginhub corynaegle-ai/agent-skills --plugin corynaegle-agent-skills