/co-review:co-reviewfrom Co-Review
Facilitates collaborative code review sessions where the human reviews and the AI co-reviews, supporting repository audits, pull requests, design reviews, and change walkthroughs.
Ships in Co-Review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Co-Review is a review app where the human comments on code, designs and patches inline, and you answer in the same threads. You are the co-reviewer: you did (or know) the work, so you explain and defend it, and you change nothing until the human decides.
In Claude Code the tools come with the Co-Review plugin (/plugin install co-review@co-review) or
claude mcp add -s user co-review -- co-review mcp. If none are available, tell the user how to add them and stop.
In Pi or Oh My Pi (the Co-Review package) the tools are named
co_review_start(open_review;dirfor a review directory),co_review_wait(await_reviewer: questions, answers and the Submit),co_review_reply,co_review_add_findings,co_review_ask,co_review_map(repo_map),co_review_facts(repo_facts) andco_review_post_github(post_review_to_github). In an interactive session, the reviewer's questions also arrive on their own as[Co-Review]messages.
| The human wants to review | Open it as | Claude Code command | Pi / Oh My Pi |
|---|---|---|---|
| Learn the whole repository (a guide, no verdict) | root, explain: true | /co-review:understand | /co-review-understand |
| The whole repository's problems | root (the repository) | /co-review:audit | /co-review-audit |
| Your change (its diff) | a patch in a review directory | /co-review:review | /co-review-change |
| Someone else's pull request | the PR's patch + PR.md in a review directory | /co-review:pr <n> | /co-review-pr <n> |
| A design, before the code | a design document in a review directory | /co-review:design <task> | /co-review-design <task> |
Every workflow has the same shape: prepare the review without showing it, do your first pass, then show it, so the human starts from your findings instead of an empty review, and never sees a half-built one:
open_review({ ..., open: false }) creates (or joins) the review and returns its reviewId. Nothing is shown.add_findings, and your overview for the review's front page (open_review({ reviewId, overview, open: false }): what it does and why, how it works as a Mermaid flowchart, the blast radius, where to
start); for a design, fix every format.warnings entry instead (the document is its own front page).open_review({ reviewId }) shows it, with the Review panel (in a window of its own, so several reviews can be
open at once). A repository, diff or pull-request review opens on its overview page: the pull request, your
overview, the files changed, then every thread grouped by area, and for a repository its areas, as one rendered
page the human reads and comments on (comments there come back with target: "overview" and the quoted text as
source). A design opens on its document, with your findings inline. Tell the human it is open in Co-Review, with a
short summary.Pass title to start a new review instead of joining the latest one.
For learning a codebase: one you're new to, or one an agent built and you no longer know. It explains, it doesn't
review: the overview page is a guide in four chapters (the lay of the land with C4 diagrams, how it works, its
patterns and naming, making a change), each ending with a question I can answer to check myself. It opens with
explain: true, so there are no findings and no verdict; I close it when I'm done:
This is for learning the repository, not reviewing it. The goal is that afterwards I can, without you: say what the repository does and where everything lives, use its vocabulary, trace its main flows, recognise its patterns and naming, say why it is built this way, follow its house rules, and place a change and predict what it affects. Familiarity is not the goal; being able to predict is. Explain what is there and why; don't judge it.
Before anything else, tell me in one short message that this takes a few minutes: you read the repository and
write a guide to it, and you'll tell me when it is open in Co-Review. Then prepare it without showing it, as an
explanation (no verdict, I close it when I'm done): open_review({ title: "Repository guide", explain: true, open: false }). Keep the reviewId it returns.
Read before you write: the README and docs, AGENTS.md / CLAUDE.md, the CI config, the entry points and the core
types. Then get the facts Co-Review works out without a model: repo_facts for the summary, then each section
(entry, folders, load, names, shapes, history; with a focus, pass it as focus). They are your
evidence: the commit to pin the guide to, the entry points, every folder's role and why, the load-bearing files,
the naming rules, the repeated shapes, what changes together, and the recipes from commits that created a file.
Use repo_map to find definitions. When the repository has Graphify graphs, ask them how the code connects before
searching: graphify query "<question>", graphify path "A" "B", graphify explain "X". A large repository may
keep one graph per folder (e.g. services/graphify-out/; its AGENTS.md says which), and graphs are untracked, so a
git worktree has none: pass --graph <path> to the right graph.json, the main checkout's in a worktree (the
first line of git worktree list). If the folder it names has no graph.json (only dated snapshots), use the
whole repository's, graphify-out/graph.json. repo_map({ overview: true }) names the graphs it found. Only
when there is none, say so and search instead.
Everything the facts list goes in the guide; don't pick by taste. Each entry point gets a flow in chapter 2 or is
named there as not traced (registrations of one kind, like the routes of one API, may share a flow). Each mapped
folder gets a row in the map. Each naming rule, repeated shape and recipe is explained in chapter 3 or 4, or
dismissed with a reason. A role marked low is a guess from imports: confirm or correct it from the code, and say
which. When history.thin is true, say so instead of inferring from history.
Write the guide as the review's overview, four chapters (## headings), in this order:
<short sha> on .", the facts' commit. Then what it does,
for whom, and what it doesn't do; a C4 context diagram (```mermaid C4Context: who uses the system and what it
talks to, from the outbound calls and environment in the facts), and, when the repository builds more than one
running part (a server and a CLI, a frontend and a backend, workers, a database), a C4 container diagram
(C4Container: the separately running parts and stores, from the entry points and the folder roles; a library
is not a container); how to build, run, test and deploy it (the actual commands). Then the map: a row per
folder in the facts' map, with its one-line job, its role (core, infra, glue, tooling, tests, generated,
vendored) and its key files; the facts' ignore list in one "you can ignore" line.UserStore vs UserService vs UserManager). The core
entities: a mermaid stateDiagram of each one's lifecycle, and a short real sample of what it looks like on disk or in the database. Then one flow per entry point from step 3: a mermaid sequenceDiagram, then numbered
stops in the code (what happens at each, and why there), and what happens when it fails.get reads memory, load reads disk), with real examples.Keep it true:
UserStore.create.
Read the line before you link it.UpdateLayoutConfig($c4ShapeInRow="3").End each chapter with one check, a prediction I can answer before I look further, such as "Check: where would you add a new MCP tool, and what else would you touch? Select this question and comment your answer." Don't write the answer on the page.
Add it with open_review({ reviewId, overview, open: false }). With a focus, write the guide for that part,
and say in chapter 1 how it fits the whole.
Show it: open_review({ reviewId }). It opens on the overview page, the guide, with Done instead of a
verdict. Tell me it is open in Co-Review, with the chapters and how long they take to read, in one short message.
Then loop await_reviewer → investigate → reply until it says I closed it (I'm done: tell me in one
line what's still unanswered, if anything). When I ask, answer from the code. When I answer a check, say whether it
matches the code and why, with a link: no score, and say what I got right. When I say the guide is wrong, check
the code: if it is, say so, fix the guide (open_review({ reviewId, overview, open: false })) and tell me what
changed. Change no files. When I want its problems found, that is a review of its own, the audit command.
For finding what's wrong once I know my way around, or checking it before a release. The overview is short (what it does, a C4 context diagram, the areas, where it hurts) and your findings by area come after it, for me to keep or dismiss:
This is a review of the whole repository: what is wrong with it, area by area, for someone who already knows their way around it. If I don't yet, say so first and offer the guide (the understand command) instead: learning comes before reviewing.
open_review({ title: "Repository audit", open: false }). Keep the reviewId it returns.repo_facts for the summary, then each section
(entry, folders, load, names, shapes, history; with a focus, pass it as focus). They are your
evidence: the commit to pin the review to, the areas, the load-bearing files, the hotspots (churn × size), what
changes together, the naming rules and where code breaks them. Use repo_map to find definitions.
When the repository has Graphify graphs, ask them how the code connects before
searching: graphify query "<question>", graphify path "A" "B", graphify explain "X". A large repository may
keep one graph per folder (e.g. services/graphify-out/; its AGENTS.md says which), and graphs are untracked, so a
git worktree has none: pass --graph <path> to the right graph.json, the main checkout's in a worktree (the
first line of git worktree list). If the folder it names has no graph.json (only dated snapshots), use the
whole repository's, graphify-out/graph.json. repo_map({ overview: true }) names the graphs it found. Only
when there is none, say so and search instead.open_review({ reviewId, overview, open: false }):
<short sha> on .", the facts' commit. Then what the repository does in two
or three sentences, and a C4 context diagram (```mermaid C4Context: the system and what it talks to).UserStore.create), tag what you didn't verify (inferred
from …), and keep Mermaid plain: in a C4 diagram, every element a description, every arrow a verb of at most five
words and its protocol, under 15 elements and 10 arrows, ending with UpdateLayoutConfig($c4ShapeInRow="3").add_findings: the area as the first label, status: "proposed", at most three per
area, each with what's wrong, why it matters and what to do, with severity, on the code (path and code, the
line(s) copied exactly from the file), a folder (path alone) or the repository (path: ".").open_review({ reviewId }). It opens on the overview page: your overview, then your findings grouped
by area, then the repository's areas. Tell me it is open in Co-Review, with how many findings in which areas, in
one short message.await_reviewer → investigate → reply until it returns my Submit or says I closed the review
(closing it means I'm done: act on nothing, and tell me in one line what's still open). On my Submit: approve →
nothing to change unless I say so; request changes → fix what I accepted and asked for, as commits, then reply in
each thread with what changed and wait again. Don't edit files while I read unless I ask in a thread.repo_map({ overview: true }) says where to start and how the code clusters. When the graphify command is
installed, Co-Review builds a Graphify graph of the code first (Tree-sitter, no LLM, seconds;
in graphify-out/, kept out of git status), and while answering, graphify query "<question>", graphify path "A" "B" and graphify explain "X" answer how parts of the code connect without searching. A finding about a whole area goes on its folder (path without line), one about the
repository on path: "."; the overview page and the panel's By area view group findings by their first label, so
make that label the area.
For a change you made, before it is committed or merged. The human reads the diff as a pull-request page, comments on lines, suggests edits and submits one verdict:
open_review({ diff: "HEAD", patchName: "<short-slug>", title: "<what the change does>", open: false }) for uncommitted work (new files included), or diff: "<base>...HEAD" for a
branch (<base> is the branch it will merge into, usually main). Co-Review runs the diff itself and makes it a
pull-request page. Keep the reviewId it returns. If it says the diff is empty, tell me and stop.add_findings({ findings: [{ target: "patch:<short-slug>", anchor: { type: "code-line", path, side: "new" }, code, body, severity }] }), where code is the line(s) the finding is about, copied exactly from the diff:
Co-Review places the finding on them and refuses a quote that matches nothing (add line only to pick one of
several matches). They arrive proposed: I accept or dismiss each one. How to write a finding or comment: the way reviewers write on pull requests, for an author who reads only the first line. One line is normal (about 15 words), two when the reason isn't obvious, never a paragraph. Lead with the problem, often as a question ("Deref without a nil check, is that safe when the field is unset?", "Why a separate topic here?", "Error is ignored, should be wrapped"). Add the why in half a sentence only when it isn't obvious; give the fix only when it is short, and a one-line fix as proposal (it becomes a GitHub suggestion), not in the text. Say "we" and ask rather than lecture; prefix "nit:" for style and "not a blocker" for something that can wait. No preamble, summary, headings, lists or code blocks; name the code (checkTemplates), not file:line. If it needs more, it is two findings, or a question.
Then write your overview of it for the review's front page, which I read first, and add it with
open_review({ reviewId, overview, open: false }): what it does and why (a few sentences), how it works as a
callers, data, configuration, other services), and where to start reading, as a short numbered list at the end,
each linked to the code so I can click it (`1. [**The handler**](path/to/file.go:42): what it does`). Plain
language; no line-by-line walkthrough.
open_review({ reviewId }). It opens on the overview page (your overview, the files changed, the
findings). Tell me it is open in Co-Review and, in one sentence, what to look at first.await_reviewer → investigate → reply until it returns my Submit or says I closed the review
(closing it means I'm done: act on nothing, and tell me in one line what's still open), then act on my verdict: approve → go ahead (commit, merge, continue), mentioning
anything still open; request changes → address every comment and apply the accepted suggestions as new commits
(don't rewrite the reviewed diff), then reply in each thread with what changed and wait again; comment → answer,
nothing to change unless I say so. Don't edit files while I review unless I ask in a thread.For a pull request you didn't write. You take the first pass; the human decides what goes back to the author:
gh pr view <n> --json number,title,url,headRefName,baseRefName,commits,body, and fetch its
branch: git fetch origin pull/<n>/head:co-review/pr-<n>. Without gh, ask me for the branch.$TMPDIR/co-review/pr-<n>/, with a PR.md: one field per
line, title: …, pr: <n>, url: <the pull request's URL>, branch: <head>, base: <base>,
commits: <count>, then a blank line and the description. The url names the repository and the pull request,
which lets Co-Review post the review back to it.open_review({ dir, diff: "origin/<base>...co-review/pr-<n>", patchName: "pr-<n>", title: "PR #<n>: <title>", open: false }). Co-Review writes the diff into the directory as
the pull-request page. Keep the reviewId it returns.git show co-review/pr-<n>:<path> for whole files) and add at most
five findings where it matters: add_findings({ findings: [{ target: "patch:pr-<n>", anchor: { type: "code-line", path, side: "new" }, code, body, severity }] }), where code is the line(s) the finding is about,
copied exactly from the diff: Co-Review places the finding on them and refuses a quote that matches nothing (add
line only to pick one of several matches). They arrive proposed: I accept or dismiss each one. How to write a finding or comment: the way reviewers write on pull requests, for an author who reads only the first line. One line is normal (about 15 words), two when the reason isn't obvious, never a paragraph. Lead with the problem, often as a question ("Deref without a nil check, is that safe when the field is unset?", "Why a separate topic here?", "Error is ignored, should be wrapped"). Add the why in half a sentence only when it isn't obvious; give the fix only when it is short, and a one-line fix as proposal (it becomes a GitHub suggestion), not in the text. Say "we" and ask rather than lecture; prefix "nit:" for style and "not a blocker" for something that can wait. No preamble, summary, headings, lists or code blocks; name the code (checkTemplates), not file:line. If it needs more, it is two findings, or a question.
When the repository has Graphify graphs, ask them how the code connects before
searching: graphify query "<question>", graphify path "A" "B", graphify explain "X". A large repository may
keep one graph per folder (e.g. services/graphify-out/; its AGENTS.md says which), and graphs are untracked, so a
git worktree has none: pass --graph <path> to the right graph.json, the main checkout's in a worktree (the
first line of git worktree list). If the folder it names has no graph.json (only dated snapshots), use the
whole repository's, graphify-out/graph.json. repo_map({ overview: true }) names the graphs it found. Only
when there is none, say so and search instead.
Then write your overview of it for the review's front page, which I read first, and add it with
open_review({ reviewId, overview, open: false }): what it does and why (a few sentences), how it works as a
callers, data, configuration, other services), and where to start reading, as a short numbered list at the end,
each linked to the code so I can click it (`1. [**The handler**](path/to/file.go:42): what it does`). Plain
language; no line-by-line walkthrough.
open_review({ reviewId }). It opens on the overview page (the pull request, your overview, the files
changed, the findings). Tell me it is open in Co-Review, with two sentences: what the pull request does and its
riskiest part.await_reviewer → investigate → reply until it returns my Submit or says I closed the review (closing
it means I'm done: tell me in one line what's still open). It's someone else's change: don't edit it. On my Submit, tell me my verdict and what I
asked for; the author does the work. I can post the review to the pull request myself (Also post to GitHub
when submitting): the Submit's github.status says whether I did (posted, or posting while Co-Review posts it).
Then it is on GitHub: never say it isn't, and don't offer to post it. If I ask you to post it, call post_review_to_github with comments: each of my open
comments rewritten as my own point, in my voice, without our discussion or any mention of it (a finding I kept and
replied to is one point made of both: the finding with what I added), a line or two each. Co-Review shows me
what goes out and posts only when I confirm.Follow the co-review-design skill: write the design document, check it with open: false, show it, revise it
from the comments, and implement only after approval.
When the human asks you to explain something with Co-Review ("walk me through X", "explain Y in Co-Review"), it is
for understanding, not a verdict. Write the explanation as a page (a design-style document in a review directory, or
the change's patch with an overview), and open it with open_review({ ..., explain: true }). The window then has
no Submit, only Done. Answer the human's questions in the threads until await_reviewer says they closed it,
then stop: change nothing and don't act on the threads unless they asked you to in one. To explain the whole
repository, follow "Understanding the whole repository" instead.
Markdown files (*.md) open rendered, and the human comments on the rendered text, diagrams and design steps.
To point at something on a page, anchor the finding with target: "doc:<path>" (relative to the repository, or to
the review directory):
add_findings({ findings: [
{ target: "doc:docs/guide.md", anchor: { type: "text", exact: "retries three times" }, body: "…", severity: "medium" },
{ target: "doc:docs/guide.md", anchor: { type: "document" }, body: "…" }] })
exact is the text as rendered (not the Markdown source); add prefix / suffix when it occurs more than once.
Anchored findings are proposed: the human accepts or dismisses each one. HTML files are not rendered: they open
as source (the human uses Open in Browser), so comment on HTML as code (path + line).
Live channel (Claude Code). If Claude Code runs with the Co-Review channel, the reviewer's questions arrive in
the conversation on their own, as channel messages from Co-Review with a thread_id. Answer each one with
reply({ threadId: thread_id, body }) and keep working on anything else in between.
A channel message that says the reviewer submitted means: call await_reviewer (it returns at once) and go to step 3.
Otherwise, loop on await_reviewer, the one call to wait on. It returns whatever the human does next:
loop:
await_reviewer({ timeoutSec: 240 })
{ status: "comment", threads: [...] } → for each thread: investigate the code it points at
(thread.location, thread.code), then reply({ threadId, body })
{ status: "submitted", decision, … } → go to step 3
{ status: "closed" } → the human closed the review: they are done. Stop waiting, act on
nothing, and tell them in one line what is still open
{ status: "pending" } → call again (the human is reading)
How to answer:
path/to/file.go:42 (they become links).repo_map lists every file with its classes and functions (narrow it with
path or query), so you can go straight to the right place instead of searching.ask_reviewer({ question, options: [...] }) shows buttons and waits like
await_reviewer: it returns their choice (question.choice), or whatever they did first; the choice then comes
from await_reviewer, as their message in that thread.await_reviewer returns status: "submitted" when the human submits (after any comments still waiting for you):
decision | Do |
|---|---|
approve | Proceed (commit, merge, continue the plan). Mention anything still open. |
request-changes | Address every entry in comments[] and apply acceptedSuggestions (each as a commit on the branch; don't rewrite a reviewed patch). Then reply per thread with what changed, and wait again. |
comment | Answer the comments. No change is required unless asked. |
summary is the human's message: follow it. Each submit increments round.
co-review mcp starts it. Don't start servers yourself.co-review logs: it says
whether Co-Review answers and shows its recent log (windows, backend, agent bridges). Show the human the relevant
lines rather than guessing.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-review, collaborative-review, pull-request-review, audit
npx claudepluginhub sdsvn/co-review --plugin co-review2 skills in this plugin
Other plugins' skills for the same job