Review any change — code, Markdown, HTML, images, even a live local site — by line, block, or region, then hand the fixes to an LLM. All local, before anything leaves your machine.
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.
A tiny local webapp for reviewing your working tree and handing the
fixes to an LLM — no commit, no PR, no GitHub round-trip. Run
prereview in your repo (or point it at any file or directory), 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; a CSV is written that you (or an LLM) act on. It ships as
a Claude Code skill, so /prereview
launches a session, you comment, hit "Hand off → Claude", and Claude
applies the changes. On a remote box it auto-binds your Tailscale address —
review from the Claude mobile app over the tailnet, before anything is
pushed.
- 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 → Claude" writes a marker; the
skill 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. - 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.
- 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.
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=v0.4.0.
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 skill — install it with one command:
prereview --install-skill # → ~/.claude/skills/prereview/SKILL.md (+ reference.md)Then invoke with /prereview or "review my changes". (If it reports
"unknown skill", run /reload.) Once installed, the 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.
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 the Claude skill runs for youIn skill mode the UI shows "Hand off → Claude": clicking it writes
.prereview/DONE; the skill polls for it, reads the CSV, and acts. Or
just tell Claude "review my changes" and it drives the whole loop. See
skill/SKILL.md and 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.
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, file, and area kinds), each with a jump back to its source.
Every comment across files in one list.
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) · Esc clears a selection.
<repo>/.prereview/comments.csv is the source of truth — RFC-4180
quoted, 13 columns, one row per comment:
id,file,from_line,to_line,side,body,created_at,resolved,anchor,anchor_status,kind,area,url
kind is line (default), 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.
- 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.






