Skip to content
Skills Library
Programming · Review & audit

diff-review

/diff-review

In-browser review of pending changes before committing or opening a PR. Starts a local server on localhost:3000 that renders the working-tree diff with @pierre/diffs CodeView, opens the user's browser, and waits for their line comments — which must then be read back and addressed. Works from a browser on the same machine, or from the user's own machine through an SSH-forwarded port (the server prints the `ssh -L` command); where nobody opens the page within 120 s, it exits on its own. Use when the user asks for a browser review of the changes.

Repository
ClickHouse ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
10
Scripts
6
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 6 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: server.mjs, vendor/node_async_hooks.mjs, vendor/node_buffer.mjs, vendor/node_events.mjs, vendor/node_process.mjs, vendor/node_tty.mjs

What it does and when to use it

In-browser review of pending changes before committing or opening a PR. Starts a local server on localhost:3000 that renders the working-tree diff with @pierre/diffs CodeView, opens the user's browser, and waits for their line comments — which must then be read back and addressed. Works from a browser on the same machine, or from the user's own machine through an SSH-forwarded port (the server prints the `ssh -L` command); where nobody opens the page within 120 s, it exits on its own. Use when the user asks for a browser review of the changes.

Original author description

In-browser review of pending changes before committing or opening a PR. Starts a local server on localhost:3000 that renders the working-tree diff with @pierre/diffs CodeView, opens the user's browser, and waits for their line comments — which must then be read back and addressed. Works from a browser on the same machine, or from the user's own machine through an SSH-forwarded port (the server prints the `ssh -L` command); where nobody opens the page within 120 s, it exits on its own. Use when the user asks for a browser review of the changes.

How it works

  1. When not to use it
  2. How to run
  3. Troubleshooting
Original SKILL.md headings · 96 lines, 737 words
SKILL.md preview
---
name: diff-review
description: In-browser review of pending changes before committing or opening a PR. Starts a local server on localhost:3000 that renders the working-tree diff with @pierre/diffs CodeView, opens the user's browser, and waits for their line comments — which must then be read back and addressed. Works from a browser on the same machine, or from the user's own machine through an SSH-forwarded port (the server prints the `ssh -L` command); where nobody opens the page within 120 s, it exits on its own. Use when the user asks for a browser review of the changes.
---

# diff-review — let the user review changes in the browser

The user wants to read and review code changes in a browser UI before anything is
committed or pushed. This skill serves the diff on localhost, collects the user's
line comments, and hands them back to you as JSON. You must address every comment.

## When not to use it

The server binds to loopback, so the UI is reachable from a browser on the very
machine the server runs on — or from the user's own machine once they forward
the port (when the machine looks remote, the server prints the exact `ssh -L`
command to do that). What it cannot survive is an environment where nobody will
ever open the page: an unattended run on an isolated VM. There the server exits
4 on its own after 120 s (see **Exit code 4** below). Don't reach for this skill
when there is no user around to open a browser: show the diff in the terminal
with `git diff` / `git show`, or just open the pull request and let review
happen there.

## How to run

1. Start the server **in the background** (Bash tool with `run_in_background: true`):

   ```bash
   node .claude/skills/diff-review/server.mjs \
     --repo <repo-root> \
     --base HEAD \
     --port 3000 \
     --out /tmp/diff-review-comments.json
   ```

   - `--base <ref>` — what to diff against. `HEAD` (default) reviews uncommitted
     work: staged + unstaged + untracked files.
   - `--committed` — review already-committed branch work before a PR: diffs
     `<base>..HEAD` and ignores the working tree, so uncommitted or untracked
     local edits never leak into the review. Combine it with the merge base
     against the repo's default branch, e.g.
     `--base $(git merge-base origin/master HEAD) --committed`.
   - The server prints the URL, opens the user's browser automatically, and stays
     alive until the user clicks **Finish review** in the UI, then exits 0.
   - On a remote-looking machine (an SSH session, a cloud instance, no graphical
     session) it starts all the same, but prints an `ssh -L` port-forwarding
     command for the user to review from their own machine, and exits 4 if no
     browser opens the page within 120 s.
   - The UI is fully self-contained: `@pierre/diffs` is vendored (see
     `vendor/README.md`), so no network access is needed and no third-party CDN
     ever sees the diff.

2. Tell the user the review is ready at `http://localhost:3000` (and relay the
   port-forwarding command if the server printed one), then **wait**. Do not
   fetch the URL yourself — a request from you would count as the browser the
   server is waiting for. Do not proceed with the commit/PR — you will be
   notified when the background command exits (i.e. when the user submits the
   review, or when nobody opened the page in time).

3. Read the `--out` JSON file. Shape:

   ```json
   {
     "verdict": "approve" | "request_changes",
     "overall": "free-text overall comment (may be empty)",
     "comments": [
       { "file": "src/app.ts", "side": "new", "startLine": 12, "endLine": 15,
         "comment": "the user's comment text" }
     ]
   }
   ```

   `side: "new"` means line numbers refer to the new version of the file;
   `side: "old"` refers to the base version (a comment on deleted lines).

4. **Address every comment.** They are the user's code review. For each one,
   quote it briefly, then either fix the code or answer the question. After making
   fixes, offer another review round (re-run the skill) before committing.

5. `verdict: "approve"` with no comments → proceed with the commit / PR.
   `verdict: "request_changes"` → do NOT commit until fixes are made and the user
   is satisfied.

## Troubleshooting

- **Exit code 3** — nothing to review against the chosen `--base`.
- **Exit code 4** — the machine looked remote (an SSH session
  (`SSH_CONNECTION`/`SSH_CLIENT`/`SSH_TTY`), cloud-init state or a cloud vendor
  in the DMI strings, or a Linux session with neither `DISPLAY` nor
  `WAYLAND_DISPLAY`) and no browser opened the review page within 120 s, despite
  the printed port-forwarding command. This is the expected outcome on an
  unattended, isolated VM — fall back to a terminal diff and carry on; do not
  retry on your own initiative.
  `--force` (or `DIFF_REVIEW_FORCE=1`) makes the server wait indefinitely — for
  a user who asked for it because they need more time to forward the port.
- **Port 3000 busy** — a stale server is probably running:
  `pkill -f "diff-review/server.mjs"`, or pass `--port <other>` and give the user
  the new URL.
- **User wants to abort** — stop the background task with TaskStop; don't wait forever.
Files in this package (10)
  • SKILL.md 5 KB
  • server.mjs 17 KB
  • ui.html 16 KB
  • vendor/README.md 2 KB
  • vendor/node_async_hooks.mjs 3 KB
  • vendor/node_buffer.mjs 28 KB
  • vendor/node_events.mjs 12 KB
  • vendor/node_process.mjs 8 KB
  • vendor/node_tty.mjs 1 KB
  • vendor/pierre-diffs-1.2.12.mjs.gz 1,753 KB

Versions

RepositoryScoreLicence
This page · ClickHouse/ClickHouse100Apache-2.0
mickeyyaya/evolve-loop100Apache-2.0
biliboss/skills100MIT
yasunori0418/skills100MIT
autohandai/skillpack-code-review100MIT
Vumb-VibeCoder/longview-skills100MIT

Database snapshot: 13.11.2026 · package version c19de2abb4c7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95diffs
    Use when changing Palot code, file, or diff rendering built on @pierre/diffs, including the Changes tab, file views, CodeView, parsing, selection, annotations, workers, or Shiki themes and languages. Do not use for ordinary code review or Git conflict resolution.
  • 81diff
    Submit working-tree changes to the cueloop changes panel. Use when the user asks to review your code changes or before committing substantial agent-authored changes.
  • 100diff-scoped-browser-qa
    Use when asked to run branch-diff browser QA against a PR or branch. Not for live-URL visual audit: use web-design-review. No remote, credential, publish, deploy, or irreversible changes.
  • 90review
    Review uncommitted changes against the project rules before committing. Use when the user asks for a review of their working tree, asks whether changes are ready to commit, or says they are about to commit.
  • 95diffs
    Use when an app uses @pierre/diffs to render or edit code files, diffs, patches, merge conflicts, or CodeView review surfaces, including React, vanilla JavaScript, SSR, workers, annotations, selection, and custom syntax languages or themes.
  • 100wd-review
    Open the `wd` browser diff viewer so the USER can review changes themselves. Trigger ONLY when the user explicitly references wd or asks to look at the diff themselves — "open wd", "open a wd review", "review with wd", "let me review with wd", "let me look at the diff", "show me…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.