From delve
Guide a human reviewer through a chunked, screen-sized diff review. Collects feedback as actionable TODOs for downstream agents. USE THIS SKILL when the user wants to review code changes interactively.
How this skill is triggered — by the user, by Claude, or both
Slash command
/delve:delveThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Walk a reviewer through a diff one cohesive chunk at a time. Collect comments as structured TODOs that a downstream
Walk a reviewer through a diff one cohesive chunk at a time. Collect comments as structured TODOs that a downstream agent can act on.
Always prompt the user to choose. Suggest a default based on session history, but never auto-select.
Present these options:
After the user chooses, store the baseline in session state (see Phase 6).
| Choice | base ref | head ref |
|---|---|---|
| Merge base | git merge-base HEAD <target-branch> | HEAD |
| Last session | stored ref from previous session | HEAD |
| Last change | HEAD (if uncommitted) or HEAD~1 | working tree or HEAD |
| Custom ref | user-provided | user-provided or HEAD |
If the target branch is unknown, ask the user. Common defaults: main, master, or the repo's default branch.
git diff --stat <base> <head> to get the file-level summary.git diff <base> <head> -- <file> to get the full unified diff.@@ section in unified
diff format).@@ context line and
surrounding code to determine this)Process files one at a time to keep context usage bounded. Store hunk metadata as you go rather than holding every diff in context simultaneously.
Group and order hunks into chunks — each chunk is a set of related hunks that the reviewer will see together on one screen.
[!NOTE] The screen-fit target is ~40 lines of diff per chunk. This value is referenced throughout this skill.
Store the ordered list of chunks with their hunk assignments. This is the Diff Plan - the sequence the reviewer will walk through.
Before showing the Diff Plan to the user, verify that each planned chunk fits within the screen-fit target and then generate the final chunk files. This step is mandatory - do not skip it.
Measure line counts before writing files. For each planned chunk, check how many lines its diff would produce WITHOUT writing to a file:
git diff <base> <head> -- <file1> [<file2>...] | wc -lgit diff <base> <head> -- <file1> [<file2>...] | Measure-Object -LineRe-plan any chunk that exceeds 40 lines:
view_range
pagination in Phase 4.Write all chunk files in one pass once every chunk is validated. Use sequential numbering and output redirection (no diff content in stdout):
git diff <base> <head> -- <file1> [<file2>...] > <session-dir>/delve-chunk-01.diff
git diff <base> <head> -- <file3> > <session-dir>/delve-chunk-02.diff
Where <session-dir> is the session workspace directory.
Show the user the validated Diff Plan:
Walk through the Diff Plan one chunk at a time. All chunk diff files were pre-generated in Phase 3.4 - no shell commands are needed during the review loop.
Display the chunk using show_file:
show_file(path: "<session-dir>/delve-chunk-NN.diff")
show_file(path: "<session-dir>/delve-chunk-NN.diff", view_range: [1, 40])
Tell the user the chunk continues beyond what is shown. If they ask to see more, show the next 40-line window with
an updated view_range.Prompt the user with a structured form using ask_user:
{
"message": "Chunk N/M: <file path(s)> — <symbol(s)>",
"requestedSchema": {
"properties": {
"comment": {
"type": "string",
"title": "Comment (optional)",
"description": "Leave feedback on this chunk. Each submission = 1 TODO."
},
"action": {
"type": "string",
"title": "Action",
"enum": ["Next", "Comment & stay", "Previous", "Done"],
"enumNames": ["Next →", "💬 Comment & stay", "← Previous", "Done ✓"],
"default": "Next"
}
},
"required": ["action"]
}
}
Process the response:
comment is provided: create a TODO (Phase 5).action = "Next": advance to the next chunk (with or without a comment). After leaving one or more
comments, flip the default to "Next".action = "Comment & stay": capture the TODO and re-display the same chunk's form for another comment.action = "Previous": go back one chunk. On the first chunk, tell the user they are at the start.action = "Done": skip to Phase 7."Next" on the last chunk triggers completion (Phase 7).
Every comment the reviewer leaves becomes a TODO for a downstream agent.
Each TODO must include:
| Field | Description |
|---|---|
| comment | The reviewer's comment, verbatim. |
| file_path | File(s) the chunk covers. |
| symbol | Enclosing function/class/method name(s). |
| excerpt | A short (3–5 line) excerpt of the relevant changed code. |
| content_anchor | A content-based anchor: the first non-blank changed line |
| in the hunk. NOT a line number (those drift on rebase). |
delve-todos.json).Persist the following across the session so the review can be resumed or referenced later.
| Key | Value |
|---|---|
delve_baseline | The chosen baseline (type + resolved refs) |
delve_head_ref | The HEAD ref at review start (for "last session") |
delve_plan | The ordered list of chunks with hunk assignments |
delve_position | Current chunk index |
delve_completed | Set of chunk indices the user has visited |
delve_todos | List of TODOs with context anchors |
SQL tool — if available, create a delve_state table:
CREATE TABLE IF NOT EXISTS delve_state (
key TEXT PRIMARY KEY,
value TEXT
);
Store each key/value pair as a row. Values are JSON-encoded.
Session file fallback — write state as a single JSON file in the session workspace (e.g., delve-state.json).
At the start of a new delve session, check for existing state:
delve_head_ref exists from a prior session, offer it as the "Last session" baseline option.delve_plan exists and the baseline hasn't changed, offer to resume the previous review from delve_position.When the user advances past the last chunk:
Summarize the review:
If TODOs exist, offer to:
Update session state:
delve_head_ref so the next session can offer "changes since last session" as a baseline./delve
1. Choose baseline → merge base / last session / last change / custom
2. Acquire diff → git diff per file, parse into hunks
3. Plan chunks → group by cohesion, order by call flow
Validate chunks → generate .diff files, enforce ≤ 40 lines, split if needed
4. Review loop → show_file chunk → ask_user (action + comment) → repeat
5. Capture TODOs → structured TODOs with content anchors
6. Complete → summary + TODO handoff
npx claudepluginhub mattkotsenas/agent-plugins --plugin delveReview diffs and files with inline annotations in a terminal TUI overlay. Works with git, hg, and jj repos. Also answers usage and configuration questions.
Displays git diffs with syntax highlighting, split view, and word-level diff in terminal UI or web preview. Supports watching changes, filtering files, comparing branches, and AI-powered code review explanations.
Self-review code changes using GitHub-style visual diff viewer (difit). Add comments on specific lines in browser; comments output to Claude for applying edits via git diff.