prereview speeds up planning and refining what your coding agent produces. Instead of copy-pasting vague pointers into chat, comment right on the artifact — a plan, a diff, a rendered doc, an image, or a live dev site — and the agent applies the fixes. It runs both ways: you can also ask the agent to suggest alternatives and accept or reject them inline, cutting the rounds it takes to get something right. Review from your desk or your phone; works with any LLM CLI, all local.
Comment on what's wrong and hand off — Claude reads it and edits the file, the fix lands in the diff, you resolve. You stay in the loop; the output gets better.
Run prereview in your repo — or point it at any file or directory — and
it opens a local web UI. Click what you want changed (a line or range in a
diff, a rendered Markdown or HTML block, a region of an image, or a box on
a running dev site) and leave a comment; each is saved to a plain
.prereview/comments.csv. Hand the batch to your coding agent and it reads
the comments and makes the changes. It's all local — no commit, no PR, no
GitHub round-trip.
The turnkey Claude Code skill runs the
whole loop: /prereview starts a session, you comment, you hit "Hand
off →", and the agent applies the changes. Any other agent (OpenAI Codex
CLI, Gemini CLI, aider, opencode, cursor-agent) works through the same open
comment protocol — see Works with any LLM CLI.
On a remote box prereview binds your Tailscale address, so you can review
from your phone over the tailnet. It also runs the other way: ask the agent
to suggest edits (prereview suggest) and they appear as inline
before → after boxes you accept or reject — refining an artifact in a few
taps instead of several rounds of copy-paste.
Get started — install, then run standalone or drive it from your agent:
brew install livetemplate/prereview/prereview # or: curl -fsSL https://raw.githubusercontent.com/livetemplate/prereview/main/install.sh | sh
cd your-repo && prereview # standalone: opens the review UI, prints the URL
prereview --install-skill --client=claude # one-time: install the Claude Code skill
# then just say /prereview in Claude Code — it launches a session, you comment, it applies the fixes- Review any artifact, at the granularity that fits — a line or range
in a diff; a whole file; a rendered Markdown or HTML block (the
comment anchors to real source lines); a dragged region of a binary
image; or a box on a live local site (
--external, proxies a running dev server). One tool for code and everything around it. - The review → fix loop — "Hand off →" writes a marker; your agent
reads the CSV and applies your comments without leaving the chat.
Multi-round streaming (
--stream) emits a continuous JSON event stream the LLM consumes across many rounds — hand off as often as you like, ending only when you click End session. No re-invocation, no hand-written CSV parser. (Streaming is the Claude Code default; other agents use a one-shot-per-batch flow — see Works with any LLM CLI.) - Suggested edits, the other direction — the agent proposes edits
inline (
prereview suggest) as before → after boxes; you accept, reject, or ask for a revision (with a note), and hand the batch back. Accepted edits are the agent's to apply — prereview never touches your files on its own. - Comment on a word or phrase, not just a line — select any span of text (or a rendered Markdown phrase) and the comment anchors to exactly those characters. ⌘K / Ctrl-K searches file names and contents across the changed set (or all files) and jumps to a hit.
- Themes — Solarized, Gruvbox, and Catppuccin colour schemes × Light / Dark / System, from the toolbar.
- Full GitHub-flavoured Markdown & HTML render — tables, task-lists,
syntax-highlighted code,
> [!NOTE]alerts, footnotes,:emoji:and mermaid diagrams render the way GitHub shows them; formatted by default, but comments anchor to real source lines and round-trip with the raw view. - One CSV, atomically written — the source of truth; read it any time without a torn file.
- Phone-friendly + Tailscale-aware — on a remote box it binds your tailnet address (never the public internet); review from your phone.
- Single Go binary — every asset embedded (Pico, fonts, client JS, mermaid); no Node, no JS runtime; works fully offline.
Most "AI code review" tools have the model find the problems for you to read. prereview inverts that: you spot what's wrong — across any artifact, not just code — and the LLM does the fixing, locally, before you push. The loop runs both ways: the agent can also propose edits, and you're the one who accepts, rejects, or asks for a revision.
- vs. AI reviewers (CodeRabbit, Gito, Ollama pre-commit hooks, Qodo) — they generate the review; prereview captures your judgment as structured comments an LLM then acts on.
- vs. team review tools (Gerrit, ReviewBoard,
arc diff) — those are multi-person, server-side, and code-only; prereview is single-user, local, and reviews any artifact. - vs. diff viewers (lazygit, tig, delta, difftastic) — they show changes; prereview captures anchored comments and hands them to an LLM.
Other tools in the "review your agent's changes locally" space — worth a look:
- crit.md — browser-based review of an agent's code changes: inline line comments, round-to-round diffs, single local binary, any agent (closest to prereview).
- diffx — a local code-review tool built for the coding-agent workflow.
- tuicr — a terminal UI (vim keybindings) for reviewing a GitHub-style diff; pushes a real PR review or copies structured Markdown for your agent.
- parley — a code-review tool in the same space.
prereview is a single static binary. Prerequisite: git on your
$PATH. Pick one:
# Quick install (macOS / Linux) — downloads the latest release, checksum-verified
curl -fsSL https://raw.githubusercontent.com/livetemplate/prereview/main/install.sh | sh# Homebrew (macOS / Linux)
brew tap livetemplate/prereview https://github.com/livetemplate/prereview
brew trust --formula livetemplate/prereview/prereview # one-time: brew requires trusting third-party taps
brew install livetemplate/prereview/prereview# Windows (Scoop)
scoop bucket add prereview https://github.com/livetemplate/prereview
scoop install prereview/prereview# Go toolchain
go install github.com/livetemplate/prereview@latestQuick-install knobs: PREREVIEW_INSTALL_DIR=/path, PREREVIEW_VERSION=vX.Y.Z (pin a specific release; omit for latest).
Behind a corporate proxy, upgrading, or uninstalling
Go install with the module proxy blocked, in order: default (uses
proxy.golang.org) → GOPROXY=direct GOSUMDB=off go install …@latest
(still needs every dependency's VCS host) → an internal GOPROXY=… →
fully air-gapped, use the Quick install script or Homebrew (a
single prebuilt binary, no module fetching).
Upgrade: brew upgrade prereview · scoop update prereview · re-run
the install script · or prereview --update (curl/go install binaries
self-update hourly; disable with --no-update / PREREVIEW_NO_UPDATE=1).
Uninstall (your .prereview/ comments are never touched):
brew uninstall prereview · scoop uninstall prereview ·
prereview --uninstall (defers to brew/scoop if one owns it) ·
rm "$(go env GOPATH)/bin/prereview". Leftovers you can delete by hand:
the skill at ~/.claude/skills/prereview/ and the update-check cache.
The binary embeds the integration for every supported agent — install with one command:
prereview --install-skill # pick agent(s) from a menu
prereview --install-skill --client=claude # Claude Code → ~/.claude/skills/prereview/
prereview --install-skill --client=codex,gemini # several at onceWith no --client, you get an interactive menu (Claude Code, Codex,
Gemini, opencode, aider, cursor-agent). Then invoke per your agent — for
Claude Code, /prereview or "review my changes" (if it reports "unknown
skill", run /reload). The Claude skill auto-refreshes to match the binary
on the next run after any upgrade — prereview --update, brew upgrade,
scoop update, or go install — so you never re-run --install-skill to
keep it current. Other agents' files are left as-is (re-run
--install-skill --client=<id> to refresh them). Full per-agent details:
docs/integrations.md.
Manual / project-scoped install
From a clone, copy it yourself (e.g. project-scoped so it ships with the repo):
mkdir -p .claude/skills/prereview
cp skill/SKILL.md .claude/skills/prereview/SKILL.mdThe filename must be exactly
SKILL.md— uppercase. A lowercaseskill.mdis silently ignored.skill/reference.md(full CSV schema + filesystem contract) is optional but handy to copy alongside.
cd <your-repo>
prereview # standalone: prints READY <url>, shows a Quit buttonOpen the URL, comment, click Quit. Comments live in
.prereview/comments.csv.
prereview --skill "$(pwd)" & # what an agent's skill/command runs for youIn skill mode the UI shows "Hand off →": clicking it writes
.prereview/DONE; the agent polls for it, reads the CSV, and acts. With
Claude Code, just tell it "review my changes" and it drives the whole
loop; other agents follow the same protocol — see
Works with any LLM CLI,
docs/integrations.md, and
skill/SKILL.md / skill/reference.md.
The review target is the positional path (default: current dir);
everything else has a sane default, so a bare prereview just works.
prereview # current dir (git repo or not) — just works
prereview ./PLAN.md # a single file
prereview ./design-docs # a non-git directory — every file shown whole
prereview --base origin/main ../service # a different git repo vs a ref (flags BEFORE the path)
prereview --external http://localhost:5173 --out ./review # annotate a live local site (dev server)
prereview --skill # LLM hand-off mode (path defaults to .)
prereview --skill --stream # multi-round JSON event stream for an LLMA non-git directory or single file is auto-detected: it's shown whole (every line commentable), with no diff and no base picker. Flags must come before the path. Full reference — every flag, mode, and combination — in docs/cli.md.
Comment on lines. Tap a line to anchor, tap another to extend the range (tap again to reseat), then type and save. The gutter line numbers are permalinks — the URL hash tracks your selection so you can share or reopen it.
Comment on a whole file with the Comment on file button — handy for binary, deleted, or unchanged files where no line is clickable. The file drawer defaults to changed files only; the show all toggle exposes the full tree when you want to comment on something that didn't change.
Comment a whole file — changed or not.
Annotate an image region. On a binary image, drag a rectangle to select an area and comment on it; the box is stored as fractions, so it survives re-encoding.
Drag a box on an image to annotate a region.
Markdown & HTML render by default; tap a rendered block (heading, paragraph, list…) to select its source lines, so the comment anchors to real line numbers and round-trips with the raw view. A Preview ⇄ Raw toggle switches to source. Long docs get a table-of-contents sidebar.
Markdown renders with a TOC; click a block and the comment anchors to its source line.
Take the agent's suggested edits. Ask for suggestions two ways: in your
LLM chat ("review this doc and suggest edits in prereview"), or right in a
comment — leave one like "suggest alternatives for this phrasing" and
hand off. Either way the agent submits them with prereview suggest and each
renders inline as a before → after box. Accept to take it, Reject to
drop it, or Request revision to send it back with a note — the decisions
ride the next hand-off, and the agent applies the ones you accepted. Nothing
is written to your files until then.
The agent suggests an edit; you accept, reject, or ask for a revision.
Annotate a live local site (--external). Point prereview at a
running dev server; it proxies the page so you can drag a box on any
region and comment — the annotation re-pins to the page as it scrolls.
Review a running site: drag a region on the live page and comment.
See every comment in one place — the All comments chip lists comments across all files (line, text, file, and area kinds), each with a jump back to its source.
Every comment across files in one list.
Search across files. ⌘K (Ctrl-K) opens a palette that matches file names and line contents across the changed set — toggle to search every file — and jumping to a hit reveals its line, even inside a folded region.
⌘K searches file names and contents, then jumps to the match.
Pick a theme. The toolbar cycles three colour schemes — Solarized, Gruvbox, Catppuccin — each with Light / Dark / System modes; syntax highlighting recolours with them, no reload.
Three colour schemes × Light / Dark / System.
Review from your phone. On a remote box prereview binds your Tailscale IP, so the same review + hand-off works from the Claude mobile app over the tailnet.
Review and hand off from your phone.
More: Diff ⇄ File toggles changed-hunks-with-context vs the whole
file (line numbers match, so comments resolve across both) · the base
dropdown picks HEAD~N, branches, or remotes (pass anything else via
--base) · each comment has Edit / Resolve / Delete (Resolve keeps
an audit trail; Delete has Undo) · show / hide resolved and hide a
single resolved comment to declutter · the agent badges each comment it
worked on and its live status (working / done) shows in the toolbar ·
show / hide the agent's suggestions (or press s) · Esc clears a
selection.
prereview's hand-off is an open protocol, not an API — comments are
written to .prereview/comments.csv (and, with --stream, a JSON event
stream). Any coding agent that can read that CSV and edit files can apply
your review. Claude Code is the turnkey path; the others are one command to
wire up.
| Agent | Install | Then |
|---|---|---|
| Claude Code | prereview --install-skill --client=claude |
/prereview (streaming, multi-round) |
| OpenAI Codex CLI | prereview --install-skill --client=codex |
$prereview / /skills |
| Gemini CLI | prereview --install-skill --client=gemini |
/prereview |
| opencode | prereview --install-skill --client=opencode |
/prereview or opencode run --command prereview |
| aider | prereview --install-skill --client=aider |
~/.config/prereview/aider/prereview-aider.sh <files> |
| cursor-agent | prereview --install-skill --client=cursor |
cursor-agent -p --force "use prereview" |
Run prereview --install-skill with no --client to pick from a menu.
Only Claude Code gets the live streaming loop; every other agent uses a
one-shot-per-batch flow (you hand off, the agent re-reads the CSV and
applies the open comments).
Maturity (smoke-tested 2026-06-21, all keyless): Claude Code, opencode (free models), and aider (local ollama model) are tested end-to-end. codex (skill loads from both dirs) and gemini (
/prereviewdiscovered in headless) are verified short of the model call. cursor-agent is install/format-verified (a real run needsCURSOR_API_KEY). Exact paths, per-agent caveats, and a "bring your own agent" recipe are in docs/integrations.md.
<repo>/.prereview/comments.csv is the source of truth — RFC-4180
quoted, 16 columns, one row per comment:
id,file,from_line,to_line,side,body,created_at,resolved,anchor,anchor_status,kind,area,url,from_col,to_col,hidden
kind is line (default), text (a character range within a line —
from_col/to_col), file, area, or region (a live-site rectangle
from --external, anchored to a url); area carries the rectangle as
{x,y,w,h} fractions. See skill/reference.md for the
full column docs.
Alongside the CSV, .prereview/ holds a few sidecar files: the agent's
proposed edits (suggestions.jsonl) and your verdicts on them
(suggestion-decisions.jsonl); the comments it marked worked-on
(processed.jsonl); and its live status (llm-status.json). See
docs/cli.md for the inventory.
prereview is built entirely on livetemplate and is a real-world dogfood of it: the whole interactive UI is server-rendered Go driving livetemplate's client, with no custom JavaScript. When a screen needs a primitive the framework doesn't have yet, it gets added to livetemplate rather than worked around here — so prereview doubles as the framework's proving ground.
- Single binary, embeds all assets (incl. the livetemplate client JS)
via
//go:embed. - State held server-side in livetemplate's session storage; WebSocket-driven UI patches. Pure Go server; no Node/npm.
- Atomic CSV writes via tmp+fsync+rename — read at any time without a torn file.
- Server-side syntax highlighting via chroma, cached per file path.
git clone https://github.com/livetemplate/prereview
cd prereview
make sync-client # copies the latest livetemplate-client.js into internal/assets/client/
go build .
./prereviewE2E tests (in the e2e/ package) use chromedp + headless chromium: go test -tags=browser ./e2e/.
Regenerate the README screenshots with make screenshots.
MIT.









