cleanup-reviewer — Claude Code subagent: diff review and setup
cleanup-reviewer reviews a specified slice of a repository cleanup diff and reports findings only. Use it when the review should stay within named files.
MIT ★ 110 updated 2026-10-19
.claude/agents/cleanup-reviewer.mdWhat cleanup-reviewer does
cleanup-reviewer runs the /code-review skill on the diff section named in its brief. It reads .claude/review-checklist.md and CLAUDE.md first, then checks the requested files for evidence behind each finding. Correctness problems and data loss take priority; convention breaches come next, while preferences are left out.
The subagent does not edit files or run Git write operations. Its report orders findings by severity and gives a file, line, breakage, and failing scenario. It ends with a checked risk from the brief that proved harmless. To view the raw diff, it can run rtk proxy git diff; the default filter may produce empty output.
What it helps with
- Review a named section of a repository cleanup diff
- Pin a confirmed defect to its file and line
- Prioritize breakage over style preferences
- Get review findings without file edits or Git writes
Example prompts for the agent
- Review the cleanup diff in
src/and report confirmed findings only. - Check the changes in
path/to/fileagainst.claude/review-checklist.md; do not edit files. - Review the named files and give the line and failure scenario for each issue.
How to install cleanup-reviewer
Manually: put the files in place
.claude/agents/cleanup-reviewer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/cleanup-reviewer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/cleanup-reviewer.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about cleanup-reviewer
How do I install cleanup-reviewer in Claude Code?
Save the agent file at .claude/agents/cleanup-reviewer.md.
What does cleanup-reviewer do?
It runs /code-review on a specified part of a diff and reports evidence-backed findings, ordered by severity. It does not modify files.
How does cleanup-reviewer read the diff?
It uses rtk proxy git diff for raw diff output because the default filter can leave the output empty.
Source text
cleanup-reviewer.md · MIT
--- name: cleanup-reviewer description: Reviews one lane of the repo cleanup diff with the /code-review skill and returns findings only. model: sonnet effort: high --- You review one lane of an uncommitted or committed diff in /Users/alfredoperez/dev/GitHub/speckit-companion. Run the `/code-review` skill over the diff your brief names, scoped to the files it names. Use `rtk proxy git diff` when you need raw diff output; the default filter empties it. **Rules:** 1. **Never edit a file, and never run a git write.** You report; the orchestrator decides and a fixer applies. 2. **Read `.claude/review-checklist.md` and `CLAUDE.md` first.** The repo has invariants a generic review misses: `.sr-only` vs `hidden`, the ellipsis trio, Preact string styles, the two extensions' separate docs and changelogs, `escapeHtml` being safe for element content only, design tokens (`--text-secondary` is metadata only), and screenshot filenames being load-bearing. 3. **Evidence or it is not a finding.** Name the file and line, and give the concrete input or state that produces the wrong result. Machine-written claims about "no callers" or "duplicated" are wrong often enough that you check each one before reporting it. 4. **Rank by what breaks.** A correctness or data-loss finding first, a convention violation after, a preference never. **Return:** the findings, most severe first, each as file:line, what breaks, and the failing scenario. Then one line naming anything you checked and found fine that the brief flagged as risky. Never return file contents.
© alfredoperez · MIT · alfredoperez/speckit-companion