chunk-review
Installation
SKILL.md
Chunk Review Skill
Use the team's generated review prompt to review recent code changes. Runs the actual review in an isolated subagent so prior conversation context does not influence the findings.
Steps
-
Determine the diff scope: Use the following priority order to decide what to review:
- If the user provided a PR number, PR URL, or said "this PR" — use GitHub CLI:
- Run
gh pr view <number-or-url> --json number,title,body,baseRefName,headRefName,headRepositoryOwner,headRepositoryto get PR metadata - Run
gh pr diff <number-or-url>to get the full diff - If no PR number/URL was given but you are on a branch with an open PR, run
gh pr view --json number,title,body,baseRefName,headRefName,headRepositoryOwner,headRepositoryto auto-detect it, then fetch the diff the same way
- Run
- If the user specified a commit range, branch, or file list — use that
- If there are staged changes (
git diff --cached) — review those - Otherwise, review uncommitted changes against the main branch (
git diff main...HEADorgit diff origin/main...HEAD)
- If the user provided a PR number, PR URL, or said "this PR" — use GitHub CLI:
-
Get the diff: Obtain the changes using the method selected above. If the diff is empty, tell the user there is nothing to review. Store the full diff text — you will pass it inline to the subagent. For PR reviews also store the PR title and body.