/kairos:code-reviewfrom kairos
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — repo Standards and the originating Kairos item's Spec — and post the record back to the item. Use when the user wants to review a branch, a PR, or work-in-progress changes, or asks to "review since X".
Ships in kairos. 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.
Two-axis review of the diff between HEAD and a fixed point the user supplies:
Both axes run as parallel sub-agents so they don't pollute each other's context; this skill aggregates their findings and posts a review record back to the Kairos item. The sub-agents inherit the MCP tools of the session, the Kairos tools too. Paste the content into their prompts anyway, not short codes alone: then both axes read the same spec. Only this skill writes to the item (append_note).
Code index first. Find code with the tools of the kairos-code MCP server before you read a file. code_search finds what the code does; symbol finds one name. callers and references find its uses; path finds how one symbol reaches another. Then read only the files that they name. grep is for literal text only: a log line, a config key, an error message. After you change code, run kairos index update. Each sub-agent prompt carries this paragraph and the path of the checkout.
Whatever the user said is the fixed point — a commit SHA, branch name, tag, main, HEAD~5, etc. If they didn't specify one, ask for it.
Capture the diff command once: git diff <fixed-point>...HEAD (three-dot, so the comparison is against the merge-base). Also note the list of commits via git log <fixed-point>..HEAD --oneline.
Before going further, confirm the fixed point resolves (git rev-parse <fixed-point>) and the diff is non-empty. A bad ref or empty diff should fail here — not inside two parallel sub-agents.
Look for the item the change implements, in this order:
KAIROS-T-0123).ORG-<letter>-<number> shape).my_boards → board_items on your delivery board) — use one only when it unambiguously matches the change; otherwise treat it as a guess to confirm with the user.Fetch the item with get_item <short-code> and extract its acceptance criteria — plus the objective and any requirements sections if the criteria are thin. This pasted content is the spec the Spec sub-agent reviews against.
Repository check (COLLIERY-A-0023). get_item prints the item's repository: <slug> (owner: <team>); compare the slug with this checkout (the session's repository, or git remote get-url origin matched via list_repositories / GET /api/repositories?forge=&name=). The owner can be a different team from the team of the item; that is not a finding. A mismatch of the slug is a finding in its own right in the final report: the change implements a task that links to a different repository. Either the link is wrong (set_repository corrects it), or the work is in the wrong codebase. An item with no repository gets a note that recommends the link.
Anything in the repo that documents how code should be written, such as CODING_STANDARDS.md, CONTRIBUTING.md, or CLAUDE.md. Check the repo root and docs/ for those names plus any markdown whose title claims coding conventions; this step is done when the list of standards files to hand the Standards sub-agent is written down — an empty list is a valid outcome (the baseline below still applies).
On top of whatever the repo documents, the Standards axis always carries the smell baseline below — a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:
Each smell reads what it is → how to fix; match it against the diff:
switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.a.b().c().d() navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.Send a single message with two Agent tool calls. Use the general-purpose subagent for both.
Standards sub-agent prompt — include:
Spec sub-agent prompt — include:
Present the two reports under ## Standards and ## Spec headings, verbatim or lightly cleaned, then end with a one-line summary per axis: its finding count and its worst issue (if any). Keep the axes separate end to end — a change can follow every standard yet implement the wrong thing, or do exactly what the item asked while breaking the repo's conventions — so merging, reranking, or picking a single winner across axes lets one axis mask the other.
Skip this step when no originating item was found. Otherwise append a structured record to the item with append_note, so the review outlives this conversation:
### Code review — <date> (diff vs <fixed-point>)
- Standards: <N> findings — worst: <one line, or "none">
- Spec: <M> findings — worst: <one line, or "none">
- <one bullet per significant finding, prefixed [standards] or [spec]>
append_note adds the record to the item as a note in one call: no version and no anchor text. get_item shows it after the content, under a heading with its id, the date and your name. Keep the record compact: findings in full live in the conversation; the item carries the durable summary.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
28 skills in this plugin
/architecture-reviewReview the codebase's architecture — scan, classify by altitude, present deepening candidates as an HTML report, then grill through the one you pick./bootstrapWire this repo and engineer to a Kairos deployment — MCP endpoint config, auth check, repository detection from the git remote, board discovery, and the wiring (a project entry in ~/.config/kairos/config.toml)./cancel-ralphStop the Ralph loop of this session, or of this folder after /clear. Then the Stop hook lets the session stop./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./decomposeBreak an initiative, plan, or PRD into independently-grabbable Kairos tasks using tracer-bullet vertical slices./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.npx claudepluginhub colliery-io/kairos --plugin kairos