Code review

From sammcj/agentic-coding · View interactive version

Code review is an AI agent skill from the GitHub repository sammcj/agentic-coding. Use when the user asks for a code review of a change, branch or PR.

How to use this skill

Skill file

Code Review After Completing Complex Software Development Tasks

Run a structured review over the changes in scope. Two modes:

Workflow

  1. Search the repo for every file documenting how code should be written. CODING_STANDARDS.md and CONTRIBUTING.md must be on the list when present. Pass the list to the sub-agents.
  2. Spawn parallel sub-agents to critically review the changes, splitting the work by review axis (below) or by area of the codebase.
  3. Compile their findings into a concise numbered list, each tagged critical/medium/low.
  4. Verify every finding against the actual code before reporting or acting on it. Sub-agents report false positives, and acting on a phantom issue makes the code worse.

Applying Fixes

Fix mode only. If you were asked only to review, stop at step 4 and report your findings.

  1. Fix the confirmed issues.
  2. Re-run the project's lint/test/build pipeline.
  3. Read each fix to confirm it resolves its finding and didn't break the original task or introduce a new problem. A green pipeline proves mechanical correctness only.
  4. Stop after this single verification pass; don't recurse into a fresh full review.

If a finding is especially complex or keeps recurring, use the systematic-debugging skill to get to the root cause.

Review Axes

Direct sub-agents to evaluate the changes across these dimensions. The questions below are illustrative, not a fixed checklist. Apply the ones that fit and raise the concerns that actually matter for this codebase's language, domain, and conventions:

Create checklists or TODOs for yourself (or the sub-agents) to ensure your coverage is thorough.

Smell baseline

On top of whatever the repo documents, the Readability and Architecture axes always carry this fixed set of Fowler code smells (_Refactoring_, ch.3). It applies even when a repo documents no standards of its own. Two rules bind it:

Pass this list to the sub-agents verbatim - they have no other access to it. Each smell reads _what it is_ → _how to fix_; match it against the diff and name the smell in the finding.

Calibration

Dead Code

Refactors leave orphans. After changing code, list anything now unused (replaced functions, components, constants) and ask before removing it, rather than deleting silently or leaving it to rot.

Sub-Agent Guidelines

Where appropriate use sub-agents to parallelise your work and reduce context bloat in the main conversation.

Reporting

The fixes, or the findings are the deliverable, so open with the (concise) outcome, not preamble or a description of your process.

State real issues plainly and drop the hedging ("might want to consider", "could potentially"); tag anything optional as low and move on. Batch style nitpicks into a single note rather than scattering them. Don't close with a summary that restates the list. A short report flagging the few things that count beats a long one padded with the obvious.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.