---
name: guided-review
optimized for: Claude Code, Codex
description: Walk a pull request with the user, one file at a time. Use when the user asks to "go through", "walk through", or "review step by step" a PR, a branch, or a set of commits, or invokes /guided-review. Not for an unattended review.
title: guided-review
canonical_url: https://skilld.dev/gh/ferriskleier/skills/guided-review
last_updated: 2026-10-06T06:15:57.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ferriskleier/skills/guided-review`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/guided-review`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ferriskleier/skills/guided-review) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/guided-review`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/guided-review --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/guided-review --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# guided-review — Walk a pull request with the user, one file at a time

## Overview

The user reads every change. You are the guide. You group the changes, show
one file and its hunks, explain each hunk, and give one short assessment with
references. The user decides after each file. The user is the reviewer; you
are the reader that never skips a hunk.

**Core principle:** one file per turn, every hunk shown, every assessment
backed by something you looked up.

Write every response in ASD-STE100 Simplified Technical English.
**REQUIRED SUB-SKILL:** use technical-english (Claude Code: invoke
`/technical-english`; Codex: read its `SKILL.md`). If it is not
installed, apply these rules inline: maximum 20 words for each sentence,
active voice, one meaning for each word, no idioms.

## Phase 1 — Load the PR

1. Read the PR: `gh pr view <n> --json title,body,baseRefName,headRefName,commits`.
2. Save the diff: `gh pr diff <n> > <scratchpad>/pr.diff`. Save the file list:
   `gh pr diff <n> --name-only`.
3. Read what the repo documents as its standards (`AGENTS.md`, `CONTRIBUTING.md`, ADRs). Those
   are the references your assessments cite.

Warning: do not use `git diff master...HEAD` for the hunks. The local base
branch is often stale and shows edited files as new files. The saved
`pr.diff` is the only source for hunks. Extract one file with:

```bash
awk '/^diff --git/{p=($0 ~ /<path-fragment>/)} p' pr.diff
```

## Phase 2 — Present the groups

Group the changes by **effect**, not by directory. The commits and the PR
body give the groups. A file can carry hunks from two groups; put the file
under the group that owns most of it and name the other hunk when you show
it.

Show, in this order:

1. One line: PR number, file count, `+added / −removed`, commit count, group
   count.
2. A table with the columns `#`, `Effect`, `Commit`, `Files`, `Size`.
3. Open items the PR body names. Check each one against the repo before you
   list it; a stale note is a finding.
4. One line: "Next: tell me which group to open first." Recommend one group
   and give the reason (smallest group with runtime effect, or the group the
   others depend on).

Stop. Wait for the user.

## Phase 3 — Walk the files

One file per turn. The turn has this shape:

1. Heading: `Group N, file i of M: <path>. <K> hunks.` If the file is a
   contract test with many mechanical hunks, say so.
2. For each hunk, in file order:
   - A bold label: the section or symbol and the line number.
   - The hunk as a `diff` code block. Show the hunk verbatim; shorten only
     long runs of unchanged context.
   - What the hunk does, in one or two sentences.
   - If the hunk belongs to another group, say which commit owns it.
3. **Checks.** Before you assess, look things up: an import that the hunk
   uses, an existing call that the hunk copies, the ADR line that permits or
   forbids the change, a test that locks the string. Cite each as
   `path:line` or a standards document. Also check what the diff cannot show: line
   width, a numbering sequence, a comment that contradicts the code.
4. One line: `My assessment: <verdict>.` Then the findings, if any. Mark
   each finding as `optional` (style) or as a defect. Do not hide a defect
   to keep the turn short.
5. One line: `Next:` with the choices. Always offer "ok" for the next file.
   Offer a one-word command for each proposed fix ("fix", "wrap"). Offer
   "later" to put the finding into the review document.

Never show two files in one turn. Never skip a hunk. Never assess without
a check.

## Quick fixes

When the user picks a fix:

1. Make the edit.
2. Leave the edit uncommitted in the working tree. Do not commit it. Do not
   amend or rebase an existing commit. A rewritten commit gets a new SHA and
   hides what the review changed.
3. Report the edited file. `git diff` shows all review fixes in one place.
4. Do not push. After the review, the user commits all fixes as one commit.

The saved `pr.diff` stays valid; it shows the PR before the fixes.

## Deferred findings

When the user says "later", append the finding to
the review document. Ask the user for the path the first time; default to `.scratch/pr-<n>-review.md`, gitignored.
One line per finding: `- [ ] <path>:<line> — <finding> (group N)`. Say the
path once, when you create the file.

## Group and PR end

At the end of a group: `Group N complete: M of M files reviewed.` Then one
line with what was confirmed and what was fixed. Propose the next group.

At the end of the PR:

1. Findings per group, fixed and deferred.
2. The uncommitted fixes: the output of `git status --short`.
3. The path of the review document, if one exists.
4. A proposed commit command for all fixes as one commit, for example:
   `git commit -am "Apply review fixes"`. The user commits and pushes.

## Rationalizations

| Excuse | Reality |
|---|---|
| "The hunk is trivial, I can summarize it" | The user asked to see the diff. Show it. |
| "I can show two small files at once" | One file per turn. Two files double the working set. |
| "The change looks right" | Look it up. An assessment without a check is a guess. |
| "The local diff is fine" | The local base is stale. Use `pr.diff`. |
| "I can fold the fix into the owning commit" | A rebase rewrites the SHAs and hides what the review changed. Keep fixes uncommitted. |
