crit-diff
A full-screen, side-by-side diff viewer with vim-native navigation. A companion to crit — the excellent terminal review tool for markdown documents.
Where crit handles document review (plans, specs, markdown), cr handles git diff review (code changes across files) with a GitHub-style side-by-side TUI. Both tools share the same .crit/ comment format, so they work together seamlessly as part of the same review ecosystem.
We recommend installing both for the full workflow — crit for reviewing what Claude writes, cr for reviewing what Claude changes.

Install
Claude Code Plugin Marketplace (recommended)
cr is available as a Claude Code plugin. Add the marketplace and install:
/plugin marketplace add adilp/crit-diff
/plugin install cr
Then use /cr:review <ref> to open the TUI. After you close it, Claude reads your comments and edits the code to address them.
From source
go install github.com/adilp/crit-diff@latest
Make sure $GOPATH/bin (defaults to ~/go/bin) is in your PATH:
export PATH="$PATH:$(go env GOPATH)/bin"
Manual skill install
If you prefer not to use the plugin, you can install the Claude Code skill directly:
cr setup-claude # Install globally (~/.claude/skills/)
cr setup-claude --project # Install for current project only
cr setup-claude --force # Overwrite existing installation
Then use /cr-review <ref> in Claude Code.
Requirements
- Go 1.21+ for building from source
- git — cr is a git tool, it reads diffs from your repo
- tmux — required for the Claude Code integration. cr opens the review TUI in a tmux split pane next to Claude Code.
- fzf (optional) — for fuzzy file/content search. Falls back to a built-in filter if not installed.
Starting a tmux session
If you're not already in tmux, start one before launching Claude Code:
tmux new -s work
# Now launch Claude Code inside this tmux session
claude
If you forget, cr will tell you — but the split-pane review won't work outside of tmux.
Usage
# Review working tree changes (staged + unstaged)
cr
# Review changes against a branch
cr main
# Review last N commits
cr -1
cr -3
# Review a commit range
cr HEAD~5..HEAD
cr v1.0..v1.1
# Review only staged changes
cr --staged
# Filter to specific paths
cr main -- src/services/
# Output review comments as JSON
cr status
Claude Code Integration
/cr-review main # review changes against main
/cr-review -3 # review last 3 commits
/cr-review --staged # review staged changes
Workflow:
- Claude opens cr in a tmux pane alongside your conversation
- You review the diff side-by-side, leave comments with
c, quit with q
- Claude reads your comments via
cr status and addresses them automatically
- Claude offers to re-open cr for you to verify the changes
tmux split pane mode
When running inside tmux, you can open the TUI in a side-by-side split pane:
# Open review in a tmux split and return immediately
cr --detach main
# Open review in a tmux split and block until it closes
cr --detach --wait main
This is how the Claude Code skill invokes cr — --detach --wait is a single blocking call that opens the TUI next to Claude Code and waits for you to finish reviewing.
Keybindings
All keybindings are configurable via ~/.config/cr/config.toml.
Navigation
| Key | Action |
|---|
j / k | Scroll down / up |
h / l | Switch to left (old) / right (new) pane |
Ctrl-d / Ctrl-u | Half page down / up |
gg / G | Jump to top / bottom of file |
]c / [c | Next / prev hunk |
]f / [f | Next / prev file |
]m / [m | Next / prev comment |
]e / [e | Expand context below / above (10 lines) |
File switching
| Key | Action |
|---|
Tab | Toggle file tree sidebar |
Space f | Fuzzy file search |
Space s | Fuzzy content search |
Comments
| Key | Action |
|---|
c | Comment on current line |
V | Visual select mode (then j/k to extend, c to comment on range) |
e | Edit comment (cursor must be on comment row) |
dc | Delete comment (cursor must be on comment row) |
View
| Key | Action |
|---|
w | Toggle word-level diff highlighting |
z | Toggle line wrapping |
/ | Search within current file |
? | Help overlay |
q | Quit (comments are auto-saved) |
How It Works
git repo ──git diff──> cr (TUI) ──.crit/ YAML──> crit / Claude