review-my-changes
Use when the user asks to review a branch, a pull request, a diff, a patch or their work in progress before merging, wants a read-only pre-merge pass, or asks what a change or a dependency bump might break (affected callers, blast radius). Follows every changed function to its ca
Install
npx skills add https://github.com/Heyvhuang/copybook-skills/tree/main/plugins/skills/skills/review-my-changes
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install heyvhuang-copybook-skills@llmmart
git clone https://github.com/Heyvhuang/copybook-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole heyvhuang/copybook-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Review a change before it merges
Most bugs a review misses are not in the diff. They sit in a file nobody touched that still expects the old behaviour. Read the change, then read what depends on it.
1. Pin what is being reviewed
git rev-parse --abbrev-ref HEAD
BASE_BRANCH=main
base=$(git merge-base HEAD "$BASE_BRANCH")
git log --oneline $base..HEAD
git diff --stat $base
If the diff is empty or the base does not resolve, say so and stop. Read the commit messages, the linked issue or spec if any, and the repo's own rules (CONTRIBUTING, AGENTS.md or CLAUDE.md). Do not change code while reviewing unless asked.
2. List every changed contract
From git diff $base, list each exported function, method, route, type, event, config key or database column whose inputs, outputs, errors, timing (sync to async) or meaning changed. A changed return on the empty case (an empty list becoming null) counts. So does a dropped await.
3. Follow each contract to its callers
For each item, search the whole repo, not only the diff:
git grep -n -w '<name>'
Open every caller outside the diff and ask: does it still hold after this change? Note the file and line of each one that does not.
4. Read the diff line by line
Beyond callers, look for: boundaries and off-by-one (first page, last page, empty, exactly the limit), errors that are swallowed or no longer reach the caller, missing await, a shared value mutated, input trusted without a check on the server, and behaviour the spec asked for that the diff left out. An unusual line is not a bug: check what it does before flagging it.
5. Prove each finding
Turn each suspected bug into evidence: a small script, a failing test in a temp folder, or a one-line call in a REPL that shows the wrong output. Delete the scratch afterwards. A finding you cannot show stays in the report as "unproven", with what would prove it.
6. Rank and write it up
Score each finding 1 to 10 on how often it would happen and 1 to 10 on how bad it would be. Multiply. Under 15 goes in a short "Notes" list at the end; it does not block the merge. 15 or more is a finding. Money, privacy and sign-in count as 8 or more on how bad.
Each finding: file:line, what goes wrong in one sentence, the evidence from step 5, the score, and the smallest fix. Order by score.
Finish
Copybook's notes for the agent:
- Open with the verdict: merge, merge after the listed fixes, or don't merge, and the count of findings.
- "CI is green" or "it's a small change" does not shorten steps 3 and 5: the callers outside the diff are exactly what CI did not run.
- Say which parts you did not check (a service you couldn't run, a platform you couldn't test).
Based on mattpocock/skills (MIT), rewritten by Copybook.
Files (copybook-skills)
-
CHANGES.md 1.1 KB
Loading… -
example.md 2.7 KB
Loading… -
LICENSE 1 KB · in bundle
-
SKILL.md 3.3 KB
--- name: review-my-changes description: "Use when the user asks to review a branch, a pull request, a diff, a patch or their work in progress before merging, wants a read-only pre-merge pass, or asks what a change or a dependency bump might break (affected callers, blast radius). Follows every changed function to its callers outside the diff, proves each finding by running it, and ranks them by how often and how badly they would hit, leaving small ones as notes. Not for reviewing UI against design and accessibility rules (review-ui-code)." license: MIT (see LICENSE) --- # Review a change before it merges Most bugs a review misses are not in the diff. They sit in a file nobody touched that still expects the old behaviour. Read the change, then read what depends on it. ## 1. Pin what is being reviewed ```bash git rev-parse --abbrev-ref HEAD BASE_BRANCH=main base=$(git merge-base HEAD "$BASE_BRANCH") git log --oneline $base..HEAD git diff --stat $base ``` If the diff is empty or the base does not resolve, say so and stop. Read the commit messages, the linked issue or spec if any, and the repo's own rules (CONTRIBUTING, AGENTS.md or CLAUDE.md). Do not change code while reviewing unless asked. ## 2. List every changed contract From `git diff $base`, list each exported function, method, route, type, event, config key or database column whose inputs, outputs, errors, timing (sync to async) or meaning changed. A changed return on the empty case (an empty list becoming `null`) counts. So does a dropped `await`. ## 3. Follow each contract to its callers For each item, search the whole repo, not only the diff: ```bash git grep -n -w '<name>' ``` Open every caller outside the diff and ask: does it still hold after this change? Note the file and line of each one that does not. ## 4. Read the diff line by line Beyond callers, look for: boundaries and off-by-one (first page, last page, empty, exactly the limit), errors that are swallowed or no longer reach the caller, missing `await`, a shared value mutated, input trusted without a check on the server, and behaviour the spec asked for that the diff left out. An unusual line is not a bug: check what it does before flagging it. ## 5. Prove each finding Turn each suspected bug into evidence: a small script, a failing test in a temp folder, or a one-line call in a REPL that shows the wrong output. Delete the scratch afterwards. A finding you cannot show stays in the report as "unproven", with what would prove it. ## 6. Rank and write it up Score each finding 1 to 10 on how often it would happen and 1 to 10 on how bad it would be. Multiply. Under 15 goes in a short "Notes" list at the end; it does not block the merge. 15 or more is a finding. Money, privacy and sign-in count as 8 or more on how bad. Each finding: `file:line`, what goes wrong in one sentence, the evidence from step 5, the score, and the smallest fix. Order by score. ## Finish Copybook's notes for the agent: - Open with the verdict: merge, merge after the listed fixes, or don't merge, and the count of findings. - "CI is green" or "it's a small change" does not shorten steps 3 and 5: the callers outside the diff are exactly what CI did not run. - Say which parts you did not check (a service you couldn't run, a platform you couldn't test). Based on mattpocock/skills (MIT), rewritten by Copybook.
Reviews (0)
No reviews yet.
Comments
Sign in to join the conversation.
No comments yet. Start the conversation.