
Hunk Review
Drive live Hunk diff-review sessions from the agent via session CLI while the user keeps the interactive TUI open.
Overview
Hunk Review is an agent skill for the Ship phase that inspects live Hunk diff sessions over the session CLI and adds inline review comments without driving the interactive TUI.
Install
npx skills add https://github.com/modem-dev/hunk --skill hunk-reviewWhat is this skill?
- Uses hunk session * CLI against the local daemon—never runs interactive hunk diff or hunk show in the agent
- Nine-step workflow from session list through comment add and batch comment apply
- JSON review output with optional --include-patch for raw diff text when needed
- Session selection via --repo and related flags for the correct live session
- navigate, reload, and context commands to align agent focus with the user’s TUI session
- 9-step session workflow from list through comment apply
Adoption & trust: 1 installs on skills.sh; 4.7k GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You are reviewing a branch in Hunk’s TUI but need your agent to read the same hunks, navigate precisely, and leave structured review comments without breaking the live session.
Who is it for?
PR and branch review with Hunk already open, agent-assisted walkthrough of large diffs, and batched review annotations tied to session state.
Skip if: Starting review from scratch without a user-launched Hunk session, or teams that want the agent to run full-screen interactive hunk diff commands.
When should I use this skill?
The user has a Hunk session running or wants to review diffs interactively via session CLI while keeping the TUI with the human.
What do I get? / Deliverables
The agent mirrors session structure, posts comments on the correct hunks, and can batch-apply notes—ready for you to continue review or merge in Hunk.
- Inline review comments on targeted hunks
- Batch-applied agent review notes via stdin
Recommended Skills
Journey fit
How it compares
Use when Hunk is the review surface and you need daemon-backed session control—not ad-hoc diff paste into the chat.
Common Questions / FAQ
Who is hunk-review for?
Solo and indie developers who use Hunk for terminal diff review and want Claude or Cursor to comment on the same live session via CLI.
When should I use hunk-review?
During ship-phase code review when a Hunk session is running and you want list, review JSON, navigate, reload, or comment add/apply without the agent taking over the TUI.
Is hunk-review safe to install?
Review the Security Audits panel on this Prism page and scope daemon access to trusted repos; the skill intentionally avoids direct interactive Hunk commands.
SKILL.md
READMESKILL.md - Hunk Review
# Hunk Review Hunk is an interactive terminal diff viewer. The TUI is for the user -- do NOT run `hunk diff`, `hunk show`, or other interactive commands directly. Use `hunk session *` CLI commands to inspect and control live sessions through the local daemon. If no session exists, ask the user to launch Hunk in their terminal first. ## Workflow ```text 1. hunk session list # find live sessions 2. hunk session get --repo . # inspect path / repo / source 3. hunk session review --repo . --json # inspect file/hunk structure first 4. hunk session review --repo . --include-patch --json # opt into raw diff text only when needed 5. hunk session context --repo . # check current focus when needed 6. hunk session navigate ... # move to the right place 7. hunk session reload -- <command> # swap contents if needed 8. hunk session comment add ... # leave one review note 9. hunk session comment apply ... # apply many agent notes in one stdin batch ``` ## Session selection Most session commands accept: - `--repo <path>` -- match the live session by its current loaded repo root (most common) - `<session-id>` -- match by exact ID (use when multiple sessions share a repo) - If only one session exists, it auto-resolves `reload` also supports: - `--session-path <path>` -- match the live Hunk window by its current working directory - `--source <path>` -- load the replacement `diff` / `show` command from a different directory Use `--source` only for advanced reloads where the live session you want to control is not already associated with the checkout you want to load next. For a normal worktree session, prefer selecting it directly with `--repo /path/to/worktree`. ## Commands ### Inspect ```bash hunk session list [--json] hunk session get (--repo . | <id>) [--json] hunk session context (--repo . | <id>) [--json] hunk session review (--repo . | <id>) [--json] [--include-patch] ``` - `get` shows the session `Path`, `Repo`, and `Source`, which helps when choosing between `--repo` and `--session-path` - `Repo` is what `--repo` matches; `Path` is what `--session-path` matches - `review --json` returns file and hunk structure by default; add `--include-patch` only when a caller truly needs raw unified diff text ### Navigate Absolute navigation requires `--file` and exactly one of `--hunk`, `--new-line`, or `--old-line`: ```bash hunk session navigate --repo . --file src/App.tsx --hunk 2 hunk session navigate --repo . --file src/App.tsx --new-line 372 hunk session navigate --repo . --file src/App.tsx --old-line 355 ``` Relative comment navigation jumps between annotated hunks and does not require `--file`: ```bash hunk session navigate --repo . --next-comment hunk session navigate --repo . --prev-comment ``` - `--hunk <n>` is 1-based - `--new-line` / `--old-line` are 1-based line numbers on that diff side - Use either `--next-comment` or `--prev-comment`, not both ### Reload Swaps the live session's contents. Pass a Hunk review command after `--`: ```bash hunk session reload --repo . -- diff hunk session reload --repo . -- diff main...feature -- src/ui hunk session reload --repo . -- show HEAD~1 hunk session reload --repo . -- show HEAD~1 -- README.md hunk session reload --repo /path/to/worktree -- diff hunk session reload --session-path /path/to/live-window --source /path/to/other-checkout -- diff ``` - Always include `--` before the nested Hunk command - `--repo` or `<session-id>` usually selects the session you want - `--source` is advanced: it does not