skills/review-changes/SKILL.md
Structured code and document review workflow for finding actionable issues in diffs, PRs, commits, files, directories, and architecture docs.
npx skillsauth add mrclrchtr/skills review-changesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review and report. Skip the brainstorming; the user wants findings, not a conversation.
| Input | Mode | How to gather |
|---|---|---|
| no args | code | git diff --cached --stat → git diff --stat → git diff HEAD~1 --stat — first non-empty wins |
| path to .md file | doc | read that file |
| other file/dir path | code | read files in scope |
| commit range (abc..def) | code | git diff abc..def + git log --oneline abc..def |
| PR number or URL | code | gh pr diff <n> + gh pr view <n> |
| --branch <name> | code | git merge-base <name> HEAD → git diff <base>..HEAD |
# Check what changed — staged first, then unstaged, then last commit
git diff --cached --stat
git diff --stat
git diff HEAD~1 --stat
Pick the first non-empty scope. If all three are empty, say so and stop.
For PR reviews, also gather context:
gh pr view <n> --json title,body,labels,additions,deletions,changedFiles
gh pr diff <n>
A diff tells you what moved; surrounding code tells you whether it still makes sense. Without that context, you miss broken call sites, stale comments, and silent convention violations.
Skim CLAUDE.md, AGENTS.md, or similar project instructions. Read sibling files in the same directory and the last few commits touching these files. "This doesn't match the codebase style" only lands as a finding when you can point to where the real style lives.
Flag something only if all of the following are true:
Do not flag:
How many findings to return: Output all findings that the original author would fix if they knew about it. Do not stop at the first qualifying finding. Continue until you've listed every qualifying issue. If there is nothing a person would definitely want to see and fix, prefer outputting no findings.
Check for:
Use this format for every finding:
### {n}. [P0–P3] Short imperative title
**File:** `path/to/file.ts:42-48`
What's wrong and why it matters — one paragraph, matter-of-fact tone.
If suggesting a fix, use an inline code block (≤ 3 lines). No commentary inside the block.
Priority levels:
| Priority | Meaning | |---|---| | P0 | Drop everything. Blocks release, causes data loss or security breach. Universal — no assumptions about inputs needed. | | P1 | Urgent. Should fix before merge. Bugs that will bite under normal usage. | | P2 | Normal. Should fix eventually. Convention gaps, missing tests, minor issues. | | P3 | Nice to have. Small improvements, clarity, naming. |
Tone & content rules:
```suggestion blocks only for concrete replacement code (minimal lines; no commentary inside the block). Preserve the exact leading whitespace of replaced lines.After all findings, give a one-line verdict:
**Verdict:** PATCH IS CORRECT / PATCH HAS ISSUES — <1-sentence why>
Use PATCH HAS ISSUES if any P0 or P1 finding exists. Use PATCH IS CORRECT otherwise. "Correct" means existing code and tests will not break, and the patch is free of bugs and other blocking issues. Ignore non-blocking issues such as style, formatting, typos, documentation, and other nits.
When the diff spans many files or > 800 lines of real changes (not renames/formatting):
For purely mechanical changes (renames, formatting, generated code), say so and skip detailed review.
When the input is a .md file, review it as target architecture — the desired future state, not current code. Flagging "this doesn't match what's built yet" defeats the purpose; the author already knows.
Look for:
Report document findings using the same P0–P3 format, replacing file/line with section/heading.
After the report, ask what the user wants next:
development
Check for available upgrades to the pi coding agent framework by comparing the current `@earendil-works/pi-*` or legacy `@mariozechner/pi-*` version in package.json against releases on `earendil-works/pi`. Use this skill whenever the user asks to upgrade pi, update pi, check pi changelogs/releases, or migrate off the deprecated `@mariozechner/*` packages.
development
You MUST use this before creative OpenSpec work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation, then hands off to the best matching OpenSpec skill or command without managing OpenSpec artifacts.
development
Fetches and normalizes http(s) web pages into clean Markdown for LLM ingestion. Use when a task includes a URL, needs to fetch docs or asks to convert web docs/articles/pages into Markdown for summarizing, quoting, diffing, or saving.
development
Download Stitch (stitch.withgoogle.com) screen screenshots at best quality from `screenshot.downloadUrl` (often `lh3.googleusercontent.com`). Use to normalize googleusercontent size parameters from canvas dimensions, download with curl, optionally verify pixel dimensions, and avoid committing signed URLs.