{"slug": "claude-code-mod-for-commenting-diff", "title": "Claude Code mod for commenting diff", "summary": "A Claude Code plugin called comment-diff lets users review Claude's file edits as commentable diffs, marking individual lines with a `+` to attach comments that are batched into a review and sent to Claude, which resolves each one via a dedicated `resolve` tool. The mod requires Claude Code 2.1.302 or later in a terminal session with mouse clicks enabled, and installs via `/plugin install comment-diff --marketplace formstep/claude-mod-comment-diff` without a restart. Comments persist only for the session, and very large diffs past roughly 90,000 characters (about 800 lines) are not supported.", "body_md": "## comment-diff-showcase.mp4\n\nA [Claude Code](https://claude.com/claude-code) mod that lets you review Claude's edits the way you review a pull request on GitHub: comment on individual lines of a diff, batch the comments into a review, send it, and watch Claude work through and resolve each one.\n\n- **Line comments on every diff.** Each`Edit` and`Write` result, and each shell command that changes files, is redrawn in the transcript as a commentable diff with a`+` next to every line. Click it to write a comment on that line.\n- **Reviews or single comments.** Collect several comments into a review and send them together, or send one comment straight away.\n- **Overview above the prompt.** A \"Diff comments\" list above the prompt box shows every comment with its status, file and line, plus a**Submit review** button.\n- **Threads.** Reply to a comment to add to it, edit your last message, or reopen a resolved comment by replying to it.\n- **Claude resolves what it fixed.** The mod gives Claude a`resolve` tool. After it handles a comment it marks it resolved with a one-line note on what it did, which shows next to the comment.\n- **Works mid-turn.** A comment sent while Claude is busy is delivered with its next tool result, so it does not have to wait for the turn to end.\n\n- Claude Code **2.1.302 or later** , in a terminal session. The diff view is drawn in the terminal only; other surfaces keep the normal diff.\n- Mouse clicks enabled in your terminal (the `+` ,`edit` ,`reply` and the buttons are clickable).\n\nAt the prompt of a Claude Code terminal session:\n\n```\n/plugin install comment-diff --marketplace formstep/claude-mod-comment-diff\n```\n\nAnswer `y` to add the `formstep` marketplace, then press Enter to pick the scope (user scope, the default, enables it in every session). The mod is active immediately, with no restart.\n\nFrom a shell:\n\n```\nclaude plugin install comment-diff --marketplace formstep/claude-mod-comment-diff\n```\n\nIn the desktop app: click **+** next to the prompt box, then **Plugins**, **Add marketplace** with `formstep/claude-mod-comment-diff`, then **Add plugin**.\n\n```\nclaude plugin update comment-diff\nclaude plugin uninstall comment-diff\n```\n\nWhen Claude edits or writes a file, or runs a command that changes one, the diff in the transcript shows a dim `+` beside each line. Click it and a box opens above the prompt with the line and the lines around it. Type the comment in the prompt box itself:\n\n| Key or button | Action | \n|---|---|\n| `Enter` | Add the comment to the review (pending) | \n| **Send now** | Send this comment to Claude now | \n| **Cancel** , or the same`+` again | Drop the comment | \n\nWhatever you had typed in the prompt is set aside while you write the comment, and put back after. Slash commands still run as usual.\n\nPending comments collect in the **Diff comments** list above the prompt. Press **Submit review (n)** to send them all to Claude in one message. Each comment includes the file, the line and a few lines of surrounding context, so Claude knows exactly what you mean.\n\nComment status icons:\n\n| Icon | Status | \n|---|---|\n| `○` | Pending: written, not yet sent | \n| `◐` | Sent: Claude has it | \n| `✓` | Resolved, by you or by Claude (with its note) | \n\n- **Open a comment:** click it in the list. The box opens with its diff context and the comment's last message in the prompt, ready to rewrite, plus**Resolve** and**Delete** . A resolved comment opens as a reply, which reopens it.\n- **Reply:** click`reply` under a comment in the diff.\n- **Edit:** click`edit` on an unresolved comment. If Claude already read it, the edited text is sent again.\n- **Resolve / Delete:** use the buttons in the list or the box. Resolved comments cannot be deleted; they stay as a record.\n- **Reopen:** reply to a resolved comment and it becomes pending again.\n\nComments last for the session. They are not saved between sessions.\n\nVery large diffs (past about 90,000 characters of text, roughly 800 lines or more) and errored tool calls keep Claude Code's normal diff view, without comment buttons. Long diffs below that are drawn in several parts, each with its own `+` buttons. Edits a subagent makes are not drawn as diffs in the transcript, so they have no comment buttons either.\n\nRun the mod from a local clone instead of the installed copy:\n\n```\ngit clone https://github.com/formstep/claude-mod-comment-diff\nclaude --plugin-dir ./claude-mod-comment-diff\n```\n\nCheck and test it:\n\n```\nclaude plugin validate .\nclaude plugin test .\ntsc -p .   # after the mod has loaded once, so .claude-plugin/types/ exists\n```\n\nLayout:\n\n| Path | What it holds | \n|---|---|\n| `hooks/register.tsx` | Hook wiring and drawing: the diff, the comment list, the comment box above the prompt, the `resolve` tool | \n| `hooks/diff-rows.tsx` | The diff's rows: each line with its `+` , and the comments under them | \n| `hooks/threads.ts` | The comments' state and every change to it: add, reply, edit, send, resolve, delete | \n| `hooks/delivery.ts` | Sending to Claude: as a prompt when idle, or on the next tool result mid-turn | \n| `hooks/comment-text.ts` | How comments read: status icons, locations, the review prompt | \n| `hooks/diff.ts` | Diff parsing and one-line hunks | \n| `types/index.d.ts` | State contract and shared types | \n| `tests/` | `claude plugin test` suite |", "url": "https://wpnews.pro/news/claude-code-mod-for-commenting-diff", "canonical_source": "https://github.com/formstep/claude-mod-comment-diff", "published_at": "2026-10-22 13:27:19+00:00", "updated_at": "2026-10-22 13:41:42.891158+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-products"], "entities": ["Claude Code", "Anthropic", "comment-diff", "formstep"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/claude-code-mod-for-commenting-diff", "markdown": "https://wpnews.pro/news/claude-code-mod-for-commenting-diff.md", "text": "https://wpnews.pro/news/claude-code-mod-for-commenting-diff.txt", "jsonld": "https://wpnews.pro/news/claude-code-mod-for-commenting-diff.jsonld"}}