obra/superpowers · skills/requesting-code-review/SKILL.md
requesting-code-review
“A tidy recipe for handing your diff to a fresh-eyed reviewer subagent, but the template it needs is offstage”
What it does
Tells the agent to grab base and head commit SHAs, dispatch a general-purpose subagent with a filled-in review template, then triage what comes back: fix Critical now, Important before moving on, note Minor.
- When the agent uses it
- After finishing a task or major feature, or before merging, when the agent should check that the work meets its requirements.
- Who it is for
- For people already using superpowers' plan-and-subagent workflow. Skip it if your agent can't spawn subagents or you want review rules inside the file itself.
- What it costs
- 70 lines, about 803 tokens once the agent loads it.
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
What it tells the agent to do
- Get BASE_SHA (HEAD~1 or the merge-base with origin/main) and HEAD_SHA with git rev-parse
- Fill code-reviewer.md with description, plan or requirements, and both SHAs
- Dispatch a general-purpose subagent with that filled template, not the session history
- Fix Critical issues immediately and Important issues before proceeding
- Note Minor issues for later
- Push back with technical reasoning, code or tests when the reviewer is wrong
Lines worth reading
Straight from the file, with why each one matters.
line 3Use when completing tasks, implementing major features, or before merging to verify work meets requirements
All 'when', no 'what'. The words 'code review' never appear, so a plain 'review my code' request may not match it.
line 8never your session's history.
The sharpest idea here. The reviewer judges the work product, not the author's reasoning, so it isn't talked into agreeing.
line 79reviewing the diff inline burns the context window you need to keep driving the work
A practical reason to delegate. Review is about protecting the coordinator's context as much as about catching bugs.
line 55git log --oneline | grep "Task 1" | head -1 | cut -d' ' -f1
A neat trick for finding a task's start commit by message. It only works if your commit messages actually say 'Task 1'.
line 28BASE_SHA=$(git rev-parse HEAD~1)
The default reviews only the last commit. A multi-commit task would quietly get half a review.
Watch out for
Nothing risky that Kin could see in SKILL.md. Scripts beside it were not read.
The scorecard
- TriggerSays when to use it5/10
Clear about when, silent about what. 'Code review' is missing from the description.
- FocusOne clear job9/10
One job: request a review and act on it.
- LeanLight to load9/10
About 70 lines, and the template lives in its own file.
- ConcreteSteps you can follow7/10
Real commands, an example and triage rules, but the template couldn't be seen.
- SafeSafe to run9/10
Only read-only git commands. No network, no pushes, no deletes.
What it does well
- Keeps the reviewer's context clean: it gets crafted inputs, never the session history.
- Gives clear severity triage (Critical, Important, Minor) with a rule for each.
- Allows pushback on wrong feedback but requires reasoning, code or tests.
How it could be better
Put 'code review' first in the description
The agent matches on the description, and today it never says what the skill does.
Adddescription: Request a code review from a subagent with fresh context. Use after completing a task or major feature, when stuck, or before merging to check work against requirements.
Make the base commit cover the whole task
HEAD~1 reviews only one commit, so multi-commit tasks get a partial review.
Add**1. Get git SHAs:** Use the commit before the task started as BASE_SHA, not HEAD~1, unless the task is a single commit. For branch reviews, use `git merge-base origin/main HEAD`.
Say what done looks like
The steps stop at fixing, with no check that the fixes hold up.
Add**4. Confirm:** After fixing Critical or Important issues, re-dispatch the reviewer with the new HEAD_SHA. Proceed only when the assessment says ready.
Add a fallback if the template is missing
The skill depends entirely on code-reviewer.md, which couldn't be listed alongside it.
AddIf code-reviewer.md is unavailable, give the subagent: <description>, <requirements>, the output of `git diff BASE_SHA..HEAD_SHA`, and ask for Strengths, Issues by severity, and an Assessment.
Kin reviews against Anthropic’s Extend Claude with skills and agentskills.io’s the Agent Skills standard. It reads SKILL.md only, so a script beside it can still do things the file does not say.