draft-pane

A Claude Code plugin (a mod). Its skill, draft-pane:draft, makes Claude write a
requested draft inside a block. The pane shows the newest open draft. The person drags over a
span and types a comment, types one comment on the whole draft, or approves it. One Submit sends
every comment as one prompt that quotes each span. The aim is feedback in place, with fewer
turns.
What it looks like
D3 README, the Install section
## Install
Run the two commands below.
[ x ] > Run the two commands below. 1 sentence is enough
The first one adds the marketplace, the second one installs the plugin.
> the second one installs the plugin
comment: [ ]
[ whole draft ] [ Approve ] [ Submit ] 1 comment
Requirements
- Claude Code 2.1.273 or later. Claude Code 2.1.287 and later load mods by default. On an older
version, set
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1.
- A terminal session, or the Code tab of Claude Code Desktop. Print mode (
-p) has no pane.
Install
claude plugin marketplace add meganemura/draft-pane
claude plugin install draft-pane@draft-pane
To develop against a checkout, run the plugin from its working tree:
claude --plugin-dir /path/to/draft-pane/plugin
Claude Code Desktop
The pane also draws in the Code tab of Claude Code Desktop. A plugin installed at the user
scope with the commands above loads there too. /plugin does not run in the desktop app: to
install from the app, click + beside the prompt box, then Plugins, then Add marketplace with
meganemura/draft-pane, then Add plugin.
On the desktop, the pane uses what the app can draw:
- Each draft is a card with its number, its title, and its line, word and character counts.
- Three views of the draft:
Comment (drag over the text to comment, as on the terminal),
Preview (the draft drawn as markdown; a file draft that is not markdown or text is drawn as
code with syntax colors), and Changes from D<n> (the diff against the draft that this one
revises, when both are in the transcript and neither is a file draft).
- A revision shows a trail of the drafts before it. Put the pointer on a dot to see its title.
- A bar under the tabs shows where the comments fall in the draft. Put the pointer on a mark to
see its comment.
- Each comment is a card with a
Remove button. A file draft links to its file.
The terminal pane stays as described in Use.
The desktop app takes no --plugin-dir. To develop against a checkout there, set these in the
env of ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "/path/to/draft-pane/plugin",
"CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"
}
}
Use
Start with /draft-pane:draft <what to draft>. /draft-pane shows or hides the pane and gives
it keyboard focus. Drag the mouse over a span of the draft; a line with the quoted span appears
right under the line it ends on, and under that an input labeled comment. Type a comment and
press Enter to add it; press Enter with an empty input to drop the span. Each added comment stays
right under the line of the words it quotes, in the order those lines appear in the draft. A
selection cannot cross a line that already carries a comment — drag within the lines between two
comments instead. Press whole draft to open the field for one comment on the whole draft, type,
and press Enter to add it; pressing the button again and typing a second time replaces it. Press
x beside a comment to remove it. Press Submit to send
every comment, or Approve to send approval; both refuse while an input still holds text that
Enter has not added. The arrow keys move between controls, Enter presses, Esc returns focus to
the prompt box. After you show the pane once, it opens on its own when a draft arrives, without
taking the keyboard; hide it with /draft-pane to stop that.
The draft block
The plugin's skill writes each draft inside a fenced block labeled draft:
D3: README, the Install section
## Install
Run the two commands below. The first one adds the marketplace, the second one installs the plugin.
The first line is D<n>: <title>. The lines after it are the draft itself. Numbers run in one
sequence for the whole conversation and are never reused. A revision is a new block with a new
number; its first line is D<m> (revises D<n>): <title>. The pane shows only the drafts in the
newest assistant message that has a draft block; an older draft leaves the pane once a later
message posts one, answered or not.
When the draft already exists as a file, the block names it instead of carrying its text:
D5: The article on pane plugins
file: /work/notes/article.md