jhochenbaum/herdr-hunk-diff/hunk-herdr-review
Claude Code and agent skill by jhochenbaum/herdr-hunk-diff
- community
Checking that the SKILL.md file is still in the repository.
Leave inline review notes on a hunk session a user is reviewing inside herdr, using the hunk binary bundled with the jhochenbaum.hunkdiff plugin. Use when working in a herdr pane on a worktree the user is reviewing with hunk.
Install
npx vskill@latest install jhochenbaum/herdr-hunk-diff/hunk-herdr-reviewSKILL.md
hunk review inside herdr
The hunk TUI belongs to the user. Never launch it — no hunk diff, hunk show, hunk patch, no herdr plugin action invoke review. Opening or re-pointing a review is the user's decision, made from their own keybindings and command palette. Your job is to leave notes on the review they are already looking at, and to move their view only when they ask you to.
Everything below is hunk's own session CLI, addressed with --repo "$PWD". There is no herdr action to go through: herdr plugin action invoke accepts no arguments and no stdin, so a plugin action cannot be handed a note batch or a navigation target at all.
Resolve the binary once, at the start of the task
`hunk` is not on your `PATH`. It ships as a dependency of the jhochenbaum.hunkdiff plugin, inside that plugin's install directory. Assume any bare hunk ... command you write will fail with "command not found". Ask herdr where the plugin lives, and use that copy:
herdr plugin list --json answers {"result":{"plugins":[{...,"plugin_id":...,"plugin_root":...}]}}. Match on plugin_id, never on list position or on name — the list holds every installed plugin. Resolve $hunk once and reuse it; do not hardcode the path, which differs per install.
Address the right session, every time
Pass --repo "$PWD" to every session command. Never rely on hunk auto-resolving a single session: the user may be reviewing several worktrees at once, and a note applied to the wrong session lands on somebody else's diff.
session list is the one command that succeeds with nothing open ({"sessions": []}). Every other session command exits non-zero when no session matches, which is the signal that the user has not opened this review yet.
Read the review before commenting on it
review --json gives the file and hunk structure without inflating your context; add --include-patch only for files you truly need in raw diff form. --include-notes adds the notes already on the review. context reports what the user is currently looking at.
Leave notes
One batch, from stdin, is the normal case:
Each item needs filePath, summary, and exactly one of hunk (1-based hunk number), oldLine, or newLine. rationale and author are optional. hunk validates the whole batch before it mutates anything, so a bad item costs you nothing but a retry.
For a single note, comment add takes flags instead of stdin:
comment add requires --file, --summary, and exactly one of --old-line / --new-line; omitting the target answers Specify exactly one comment target: --old-line <n> or --new-line <n>.
Add --focus only when the note itself should steer the user's view — it moves them, so the same restraint applies as to navigate below.
A note needs a live session. There is no offline queue: if comment apply reports no active session, the user has not opened the review yet. Say so and put your findings in your own reply — do not open a review yourself, and do not retry in a loop.
Read notes back — the output shape is not the input shape
comment list does not echo back what comment apply takes. Captured from the verified bundled Hunk CLI:
So on the way out it is noteId, body, and newRange/oldRange as [start, end] arrays — where the way in is summary plus a scalar newLine/oldLine, and there is no rationale at all. Do not feed a comment list result back into comment apply; translate it. --type user is human-authored notes, which is what the user typed.
Move the user through the review
Relative, and the safe default — it steps between annotated hunks and needs no --file:
Absolute, for pointing at one specific thing you have just been asked about:
--file plus exactly one navigation target — --hunk (1-based), --old-line, or --new-line. hunk refuses anything else rather than picking for you:
- two targets →
Specify exactly one navigation target: --hunk <n>, --old-line <n>, or --new-line <n>. - a target with no
--file→Specify --file <path> with a navigation target, or use --next-comment / --prev-comment.
Use absolute navigation sparingly: annotate first, and jump only when you are pointing at one thing. A note is additive and the user can read past it; every jump takes them somewhere they did not choose to go.
When something goes wrong
- "No active Hunk sessions" while hunk is visibly running usually means loopback
(127.0.0.1:47657) is blocked by your sandbox. Say so rather than retrying silently; hunk honours HUNK_MCP_PORT if the user has moved the daemon.
- "No diff file matches …" — the path is not in the loaded review. Check
session review --json for the paths hunk actually holds; they are as hunk displays them, which may not be how you spell them.
- A command that exits non-zero with no session in `session list` — the review is not open.
Report, do not retry.
Guidelines
- Comment on what the user would not spot themselves. Do not annotate every hunk.
- Keep
summaryto one real sentence; put detail inrationale. - Prefer one
comment applybatch over manycomment addcalls. - Never edit the worktree as part of a review.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hunk-herdr-review/SKILL.md
Popularity
- Repository stars
- 123
- Repository forks
- 8
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jhochenbaum/herdr-hunk-diff/hunk-herdr-review)