bdsqqq/dots/hunk-review
Claude Code and agent skill by bdsqqq/dots
- community
Checking that the SKILL.md file is still in the repository.
Interacts with live Hunk diff review sessions via CLI. Inspects review focus, navigates files, hunks, and exact lines, reloads session contents, adds inline review comments, and paints attention marks on character ranges. Use when the user has a Hunk session running or wants to review diffs interactively.
Install
npx vskill@latest install bdsqqq/dots/hunk-reviewSKILL.md
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
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 replacementdiff/showcommand 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
getshows the sessionPath,Repo, andSource, which helps when choosing between--repoand--session-pathRepois what--repomatches;Pathis what--session-pathmatchesreview --jsonreturns file and hunk structure by default; add--include-patchonly when a caller truly needs raw unified diff textreview --include-notesalso returns the live review notes alongside the file and hunk structure
Navigate
Absolute navigation requires --file and exactly one of --hunk, --new-line, or --old-line:
Exact comment navigation uses the commentId returned by hunk session comment list --json and does not require --file:
Relative comment navigation jumps between annotated hunks and does not require --file:
--hunk <n>is 1-based--new-line/--old-lineare 1-based line numbers on that diff side- A line target lands the user's viewport on that exact line (falling back to its hunk when the line is inside a collapsed region);
--hunklands on the hunk - Use either
--next-commentor--prev-comment, not both
Reload
Swaps the live session's contents. Pass a Hunk review command after --:
Examples:
- Always include
--before the nested Hunk command --repoor<session-id>usually selects the session you want--sourceis advanced: it does not select the session; it only changes where the replacement review command runs- If the live session is already showing the target worktree, prefer
hunk session reload --repo /path/to/worktree -- diff --session-pathtargets the live window when you need to keep session selection separate from reload source
Comments
Examples:
- Agent notes start hidden: the user sees them only after pressing
aor settingagent_notes = true.--focusjumps to the new note (or the first note in a batch) and turns agent notes on, so pass it on the first note you leave in a session, or tell the user to pressa comment listshows the comments added throughhunk session commentby default;--type userlists notes the user wrote withc,--type ailists notes loaded from an--agent-contextsidecar,--type agentlists agent-authored notes, and--type alllists every notecomment addis best for one note;comment applyis best when an agent already has several notes ready- Root
comment addnotes require--file,--summary, and exactly one of--old-lineor--new-line; replies use--reply-to <note-id>with--summaryand inherit the parent's anchor comment applyitems requiresummaryplus eitherreplyToby itself orfilePathwith exactly one target such ashunk,hunkNumber,oldLine, ornewLinecomment applyreads a JSON batch from stdin and validates the full batch before mutating the live sessioncomment listandcomment clearaccept optional--file- Quote
--summaryand--rationaledefensively in the shell
Attention marks
Highlights paint character ranges inside the diff lines the user is looking at — use them to light up the exact expression you are explaining while you narrate.
Examples:
highlight addrequires--file, exactly one of--old-lineor--new-line, and the--start/--endoffsets--startis a 0-based inclusive offset into the line's text and--endis exclusive, counted in UTF-16 code units — the same[start, end)range extensions use- Tones:
match(default),info,warning,error,dim;currentrenders as reverse video and is best reserved for the one range under discussion - Pass
--focusto also land the viewport on the marked line - Marks survive scrolling, navigation, and reloads that leave the marked file's content unchanged; a reload that changes that file drops its marks, and
highlight clearremoves them explicitly (optionally per--file) - Marks are visual only — pair them with a
comment addwhen the explanation should persist as a note
Experimental rich markup notes (STML)
Only use STML when hunk session context --json lists stml in experimentalFeatures. The user opts into that experience by launching the review with --experimental; do not ask a normal session to render markup.
For an opted-in session, --markup (or a markup field on apply items) renders the note body as STML — a small HTML-like markup for terminal UI (boxes, rows, gauges, badges, lists, code). Keep --summary a real sentence: it is the fallback and the comment list text.
Before writing markup, run hunk markup guide once — it has copy-paste patterns and the width rules. The session context also reports noteMarkupWidth (the live render width); preview with hunk markup render - --width <that>. Comment responses echo markupWidth and return markupNotes when markup degraded — fix what they flag.
New files in working-tree reviews
hunk diff includes untracked files by default. If the user wants tracked changes only, reload with --exclude-untracked:
Guiding a review
The user may ask you to walk them through a changeset or review code using Hunk. Start with hunk session review --json to understand the file/hunk structure without inflating agent context, then use --include-patch only for the files you truly need to read in raw diff form. Use context and navigate to line up the user's current view before adding comments.
Your role is to narrate: steer the user's view to what matters and leave comments that explain what they're looking at.
Typical flow:
- Load the right content (
reloadif needed) - Navigate to the first interesting file / hunk
- Add a comment explaining what's happening and why
- If you already have several notes ready, prefer one
comment applybatch over many separate shell invocations - Summarize when done
Guidelines:
- Work in the order that tells the clearest story, not necessarily file order
- Navigate before commenting so the user sees the code you're discussing
- Use
highlight add --focusto steer the user's eyes to the exact expression while you explain it, andhighlight clearbefore moving to the next topic - Use
comment applyfor agent-generated batches andcomment addfor one-off notes - Use
--focuson your first note so agent notes become visible, then sparingly when a note should actively steer the review - Keep comments focused: intent, structure, risks, or follow-ups
- Don't comment on every hunk -- highlight what the user wouldn't spot themselves
Common errors
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodules/agents/skills/hunk-review/SKILL.md
Popularity
- 7-day trend score
- 0
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/bdsqqq/dots/hunk-review)