一键导入
review-changes
Structured code and document review workflow for finding actionable issues in diffs, PRs, commits, files, directories, and architecture docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Structured code and document review workflow for finding actionable issues in diffs, PRs, commits, files, directories, and architecture docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review-changes |
| description | Structured code and document review workflow for finding actionable issues in diffs, PRs, commits, files, directories, and architecture docs. |
| disable-model-invocation | true |
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:
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.
Creates a commit with repo-matching style and intentional staging.
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.
Delegate UI code reviews to a subagent. Reviews components, pages, git changes, or specification files using web design guidelines.
This skill should be used when the user asks to "write React tests", "test a component", "set up test utils", "mock an API", "use React Testing Library", "configure MSW", "test async behavior", "choose query type", "test Mantine components", "test a modal", or when writing tests for React components using Vitest, RTL, MSW, or Mantine. Provides best practices for component and integration testing.
Use when building or modifying frontend UI and implementation choices should follow shared web interface guidelines for interactions, accessibility, forms, motion, performance, responsive behavior, or copy.