Agent skill

Hunk Herdr Review

by jhochenbaum in jhochenbaum/herdr-hunk-diff

Leave inline review notes on a hunk session a user is reviewing inside herdr, using the hunk binary bundled with the jhochenbaum.hunkdiff plugin.

MITAuto-check passedDevelopment

Install Hunk Herdr Review

skills CLI
$ npx skills add jhochenbaum/herdr-hunk-diff --skill hunk-herdr-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jhochenbaum/herdr-hunk-diff hunk-herdr-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jhochenbaum/herdr-hunk-diff.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hunk-herdr-review .claude/skills/hunk-herdr-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hunk-herdr-review
GitHub stars
143
Token cost
~1.9k tokens
SKILL.md length
832 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Leave inline review notes on a hunk session a user is reviewing inside herdr, using the hunk binary bundled with the jhochenbaum.hunkdiff plugin.

  • Working in a herdr pane on a worktree the user is reviewing with hunk
  • SKILL.md covers Resolve the binary once, at…, Address the right session,…, Read the review before… and Leave notes, plus 4 more sections
  • Calls node
  • Tasks that involve Git worktrees

What it does

Hunk Herdr Review is an agent skill from jhochenbaum/herdr-hunk-diff. 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.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. The repository describes itself as: Review agent-authored changes in hunk from herdr and send inline comments back to the responsible agent. The licence is MIT.

When your agent uses it

  • Working in a herdr pane on a worktree the user is reviewing with hunk
  • Tasks that involve Git worktrees

Example prompts

  • “/hunk-herdr-review”

What it can do on your machine

Read from SKILL.md and the folder at commit 47146a0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hunk Herdr Review loads about 1.9k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 832 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jhochenbaum/herdr-hunk-diff at commit 47146a0, republished under its MIT licence (© jhochenbaum). 832 words, ~1,872 tokens.

Download SKILL.mdSave it as .claude/skills/hunk-herdr-review/SKILL.md (or your agent's skills folder).
name
hunk-herdr-review
description
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.

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:

bash
plugin_root="$(herdr plugin list --json | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{const p=(JSON.parse(s).result.plugins||[]).find(p=>p.plugin_id==="jhochenbaum.hunkdiff");process.stdout.write(p&&p.plugin_root||"")})')"
hunk="$plugin_root/node_modules/.bin/hunkdiff"
test -x "$hunk" || echo "jhochenbaum.hunkdiff is not installed; report your notes in your reply instead"

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

bash
"$hunk" session list --json
"$hunk" session get --repo "$PWD" --json

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

bash
"$hunk" session review --repo "$PWD" --json
"$hunk" session review --repo "$PWD" --include-notes --json
"$hunk" session context --repo "$PWD" --json

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:

bash
printf '%s' '{"comments":[
  {"filePath":"src/a.ts","newLine":42,"summary":"Guard the null case","rationale":"userId is optional here"},
  {"filePath":"src/b.ts","hunk":2,"summary":"This rename is the point of the change"}
]}' | "$hunk" session comment apply --repo "$PWD" --stdin --json

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:

bash
"$hunk" session comment add --repo "$PWD" --file src/a.ts --new-line 42 \
  --summary "Guard the null case" --rationale "userId is optional here" --json

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.

Show full SKILL.md (343 more words)Show less

Read notes back — the output shape is not the input shape

bash
"$hunk" session comment list --repo "$PWD" --type user --json
"$hunk" session comment rm --repo "$PWD" <comment-id> --json

comment list does not echo back what comment apply takes. Captured from the verified bundled Hunk CLI:

json
{
  "comments": [
    {
      "noteId": "user:1786393885051-1",
      "source": "user",
      "filePath": "README.md",
      "hunkIndex": 0,
      "newRange": [63, 63],
      "body": "Did we really add support for …",
      "author": "user",
      "createdAt": "2026-08-10T20:31:25.051Z",
      "editable": true
    }
  ]
}

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:

bash
"$hunk" session navigate --repo "$PWD" --next-comment --json
"$hunk" session navigate --repo "$PWD" --prev-comment --json

Absolute, for pointing at one specific thing you have just been asked about:

bash
"$hunk" session navigate --repo "$PWD" --file src/a.ts --hunk 2 --json
"$hunk" session navigate --repo "$PWD" --file src/a.ts --new-line 372 --json
"$hunk" session navigate --repo "$PWD" --file src/a.ts --old-line 355 --json

--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 summary to one real sentence; put detail in rationale.
  • Prefer one comment apply batch over many comment add calls.
  • Never edit the worktree as part of a review.

© jhochenbaum, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/hunk-herdr-review of jhochenbaum/herdr-hunk-diff.

Open the folder on GitHubat commit 47146a0

Compare with similar skills

Hunk Herdr Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hunk Herdr Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hunk Herdr Review this skilljhochenbaum/herdr-hunk-diff143—~1.9kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Keep Codex Fastvibeforge1111/keep-codex-fast1.6k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Keep Codex Fast

    vibeforge1111/keep-codex-fast

    A skill your agent uses when Codex feels slow or bloated, when local sessions/logs/worktrees/config have grown over time, or when a user wants safe maintenance for Codex Desktop/CLI state.

    1.6k GitHub stars~3.1k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

Categories

Questions about Hunk Herdr Review

What does Hunk Herdr Review do?

Leave inline review notes on a hunk session a user is reviewing inside herdr, using the hunk binary bundled with the jhochenbaum.hunkdiff plugin. Hunk Herdr Review is an agent skill from jhochenbaum/herdr-hunk-diff.hunkdiff plugin.

When should I use Hunk Herdr Review?

Hunk Herdr Review fits situations like: working in a herdr pane on a worktree the user is reviewing with hunk; tasks that involve Git worktrees.

How do I install Hunk Herdr Review in Claude Code?

Run `npx skills add jhochenbaum/herdr-hunk-diff --skill hunk-herdr-review -a claude-code`. Or copy the skill folder (skills/hunk-herdr-review in jhochenbaum/herdr-hunk-diff) into .claude/skills/hunk-herdr-review in your project. Claude Code loads it when a task matches its description.

How do I install Hunk Herdr Review in Codex?

Run `npx skills add jhochenbaum/herdr-hunk-diff --skill hunk-herdr-review -a codex`. Or copy the skill folder (skills/hunk-herdr-review in jhochenbaum/herdr-hunk-diff) into .agents/skills/hunk-herdr-review in your project. Codex loads it when a task matches its description.

Can I use Hunk Herdr Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jhochenbaum/herdr-hunk-diff --skill hunk-herdr-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hunk-herdr-review, .gemini/skills/hunk-herdr-review, .github/skills/hunk-herdr-review and .opencode/skills/hunk-herdr-review in your project.

What does Hunk Herdr Review need to run?

Going by SKILL.md and its folder, Hunk Herdr Review needs the command-line tools its instructions call (node).

Does Hunk Herdr Review access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hunk Herdr Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hunk Herdr Review use?

Hunk Herdr Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hunk Herdr Review use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hunk Herdr Review?

Skills that share tags, products or a category with Hunk Herdr Review: Finishing a Development Branch (obra/superpowers, 297k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars) and Git Worktree Cleanup (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hunk Herdr Review?

jhochenbaum (a GitHub user) maintains it in jhochenbaum/herdr-hunk-diff, which has 143 GitHub stars. The repository was last updated on October 7, 2026.

Source: jhochenbaum/herdr-hunk-diff on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.