2026-11-27 16:21 UTC

Diffreview adds local, PR-style review feedback for Claude Code

state: expiredheat: lowuncertainty: mediumrelevance: mediumclaude-code code-review developer-toolsChalmagean

What is this?

Diffreview is an open-source native macOS app by GitHub user Chalmagean for reviewing local Git changes in a pull-request-style window. Its GitHub README says reviewers can add inline, range, file-level, and overall comments; submitting prints the review as Markdown to stdout. It also documents a Claude Code `/diffreview` command that passes the comments back for the agent to address. The repository provides build-from-source installation instructions and requires macOS 14 or later and a Swift 6 toolchain. The supplied evidence is the project’s own README and a Hacker News post linking to it; no independent evidence of adoption or performance is supplied.

Why it matters

This is a focused workflow tool, not a new model: it gives developers a more structured way to inspect agent-written changes and return targeted feedback, potentially making human review easier to incorporate into coding-agent loops. Its local, Markdown-based design may suit other tools that consume Markdown, but the documented turnkey integration is Claude Code. Its likely value is practical rather than transformative, and adoption or impact is not established here.

Current assessment

The available first-party project README describes Diffreview as a native macOS Git-diff review app, with installation by cloning the repository and building it; it is not presented as a signed, packaged installer. It can review uncommitted changes (including untracked files) or committed branch changes since a merge base via `--base`; in `--base` mode, uncommitted changes are excluded. Comments and summaries are emitted as Markdown on submission, and drafts are saved under `.git/diffreview/comments.json`. The repository also supplies a Claude Code slash command that runs the app and asks Claude Code to address the resulting comments. The README notes that this shell-command integration may require increasing Claude Code’s Bash timeout, with the consequence that the setting also changes the default timeout for other Bash commands. The project says it parses several Git diff cases and includes tests; these are maintainer-reported implementation details, not independent validation. The supplied evidence establishes availability as a source-build project, but not adoption, reliability in wider use, or broader agent integrations. Search results show other similarly themed tools, but do not establish direct competition or comparative quality.

Measured heat

no measured readings yet β€” the hourly heat pass fills this in

How the heat travelled

11-02 07:25 (minted)⭐ origin echo-reconstructedThe repository README presents diffreview as β€œA native macOS tool for reviewing local code changes GitHub-PR style, built to send that revie
chalmagean (GitHub account; personal name not stated on the source page) on github (echo) Β· attributed from hn.story.50333783 Β· published time unknown
β€”
11-02 06:41first on hacker news Β· published Β· lag ?Diffreview – code review for local Claude diffs
mixandgo
β€”
11-02 06:41amplified on hacker news πŸ‘‘hn.story.50333783
mixandgo
peak 2 Β· 0 comments Β· 97% of case engagement
11-02 07:21our radar first saw it Β· lag ?discovery anchor: hn.story.50333783β€”

Evidence (2) β€” ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnDiffreview – code review for local Claude diffs
Retrieved article excerpt

Open article Β· Retrieved 2026-11-02T07:22:16.676845+00:00

# diffreview

A native macOS tool for reviewing local code changes GitHub-PR style, built to
send that review back to [Claude Code](https://claude.com/claude-code) (or anything
else that reads markdown).

Run `diffreview` in a git repository and a window opens with the diff. Leave inline
comments on lines or ranges, file-level comments and an overall summary, then click
**Submit review**. The review is printed to stdout as markdown and the process exits.

[diffreview showing a diff with an inline comment and a range comment being written](https://github.com/chalmagean/diffreview/blob/main/docs/screenshot.png)

## Requirements

- macOS 14 or later
- Swift 6 toolchain (Xcode or the Command Line Tools)
- `git` on your `PATH`

## Install

```
git clone <this repo> diffreview && cd diffreview
swift build -c release
install -m 755 .build/release/diffreview ~/.local/bin/diffreview   # or any directory on your PATH
```

## Usage

```
diffreview                 # uncommitted changes: `git diff HEAD` plus untracked files
diffreview --base main     # commits on the current branch since its merge-base with main
diffreview --help
```

| Result | stdout | exit code |
| --- | --- | --- |
| Submit review | the review as markdown | 0 |
| Close window / quit without submitting | nothing | 1 |
| No changes to review | nothing (message on stderr) | 1 |
| Not a git repository, unknown ref, bad arguments | nothing (message on stderr) | 2 |

`--base` compares committed work only (`merge-base..HEAD`), like a pull request.
Uncommitted changes are not included in that mode.

### Reviewing

- **Click a line** to comment on it. **Shift-click** another line in the same file to extend the comment to a range.
- **βŒ˜β†©** adds the comment, **Esc** cancels. Existing comments can be edited or deleted.
- **Comment on file** (in each file header) adds a file-level comment.
- **Finish review** (βŒ˜β‡§β†©) opens the summary box and the **Submit review** button.
- Files can be collapsed. Files with more than 1,500 changed lines start collapsed.

Drafts are saved automatically to `.git/diffreview/comments.json`, so closing the
window doesn't lose work: the next run picks up where you left off. The file is
deleted when you submit. If you close the window while a comment is still being
typed, that text is kept as a comment.

### Output format

```
# Code Review

Overall summary.

## path/to/file.swift

A file-level comment.

### Lines 42-45 (new)

```swift
let the = "selected lines"
```

The comment.
```

Line numbers refer to the new version of the file, or to the old version (`(old)`)
when only deleted lines are selected. Selections that mix added and removed lines
are shown as a `diff` block.

## Claude Code integration

The repo ships a `/diffreview` command in
[`.claude/commands/diffreview.md`](https://github.com/chalmagean/diffreview/blob/main/.claude/commands/diffreview.md). Install it for all your
projects:

```
mkdir -p ~/.claude/commands
cp .claude/commands/diffreview.md ~/.claude/commands/
```

It contains:

```
---
description: Open diffreview to review changes GitHub-style, then address the comments
argument-hint: [--base <ref>]
allowed-tools: Bash(diffreview) Bash(diffreview *)
---
!`diffreview $ARGUMENTS`
Address each review comment above. If something is unclear, ask before changing it.
```

Then run `/diffreview` (or `/diffreview --base main`) in any repository. Cancelling the
review makes the command abort, so nothing is sent to Claude.

**Timeout:** Claude Code runs `!` commands under the Bash tool's default timeout of
2 minutes, and reviews usually take longer. Raise it in `~/.claude/settings.json`:

```
{
  "env": {
    "BASH_DEFAULT_TIMEOUT_MS": "3600000",
    "BASH_MAX_TIMEOUT_MS": "3600000"
  }
}
```

This also changes the default timeout for every other Bash command Claude Code runs.

## Development

```
swift build
scripts/test.sh
```

Use `scripts/test.sh` rather than `swift test`. With only the Command Line Tools
installed (no Xcode), `swift test` builds the swift-testing tests but runs none of
them and still reports success. The script detects that setup and runs the tests
through a small runner (`scripts/TestRunner.swift`). Under Xcode it just calls `swift test`.

### Layout

- `Sources/DiffReviewCore`: no UI. Runs git, parses unified diffs (renames, copies,
  binary files, mode changes, quoted paths, "\ No newline at end of file"), models
  comments, renders the markdown review and stores drafts.
- `Sources/diffreview`: the AppKit/SwiftUI app.
- `Tests/DiffReviewCoreTests`: parser and renderer tests, plus integration tests that
  run real git in temporary repositories.

Syntax highlighting isn't implemented yet. `Sources/diffreview/SyntaxHighlighter.swift`
is the place to add it: each line is passed through `SyntaxHighlighter.highlight(_:language:)`.

## License

[MIT](https://github.com/chalmagean/diffreview/blob/main/LICENSE)
mixandgo20
🟧 echo.github ⭐The repository README presents diffreview as β€œA native macOS tool for reviewing local code changes GitHub-PR style, built to send that reviechalmagean (GitHub account; personal name not stated on the source page)β€”β€”

Interpretation history

Decision trace