Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

diff-review

/diff-review

Uruchamia w przeglądarce przegląd oczekujących zmian przed commitem lub PR na lokalnym serwerze, zbiera komentarze do linii i wprowadza poprawki.

Repozytorium
ClickHouse ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
10
Skrypty
6
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

Co sprawdzić przed instalacją
  • 6 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

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

Co robi i kiedy

Uruchamia w przeglądarce przegląd oczekujących zmian przed commitem lub PR na lokalnym serwerze, zbiera komentarze do linii i wprowadza poprawki.

Oryginalny opis (EN)

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.

Jak działa

  1. When not to use it
  2. How to run
  3. Troubleshooting
Sekcje z nagłówków SKILL.md, w oryginale · 96 linii, 737 słów
Podgląd SKILL.md
---
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.
Pliki w paczce (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

Wersje

RepozytoriumWynikLicencja
Ta strona · ClickHouse/ClickHouse100Apache-2.0
mickeyyaya/evolve-loop100Apache-2.0
yasunori0418/skills100MIT
autohandai/skillpack-code-review100MIT

Migawka bazy z 28.10.2026 · wersja paczki c19de2abb4c7 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95diffs
    Zmienia renderowanie plików i różnic opartych na @pierre/diffs w aplikacji Palot, w tym w widokach zmian i motywach Shiki.
  • 100diff-scoped-browser-qa
    Prowadzi QA w przeglądarce dla diffa gałęzi lub PR, bez zmian zdalnych, poświadczeń, publikacji i wdrożeń.
  • 81diff
    Wysyła zmiany z katalogu roboczego do panelu zmian cueloop, żeby przejrzeć je przed commitem.
  • 90review
    Przegląda niezatwierdzone zmiany według zasad projektu przed commitem i ocenia, czy są gotowe.
  • 95diffs
    Renderuje i edytuje pliki kodu, różnice, łaty i konflikty scalania w aplikacjach z @pierre/diffs, także w SSR i workerach.
  • 100wd-review
    Otwiera przeglądarkę różnic wd, żeby użytkownik sam przejrzał zmiany, a interaktywną pętlę uruchamia tylko na wyraźną prośbę.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.