A copy mark under every code block in a Claude Code reply. When Claude gives you a command to run, click the mark and
the block is on your clipboard, as written. The mark reads ✓ copied! for two seconds.
echo "a block Claude gave you"
⧉ ctrl+click
- Fullscreen layout (
/tui fullscreen): the mark is⧉ copy, a button. A plain click copies. - The ordinary layout: the terminal, not Claude Code, gets the click there, so the mark is
⧉ ctrl+click, a link your terminal opens on Ctrl+click. It points at a small file holding the block, and a desktop handler copies the file's text. Run/clip setuponce to put the handler in place. Until then the mark reads⧉ /clip a3f9, its code. - Anywhere:
/clipcopies the newest block,/clip 2the one before it, and/clip a3f9the block whose mark shows that code. That's the way in tmux, whose mouse mode takes the click before the terminal can open a link.
At the prompt of a Claude Code session:
/plugin install copy-blocks --marketplace code-wheel/copy-blocks
Answer y to add the marketplace, then pick a scope. From a shell:
claude plugin install copy-blocks --marketplace code-wheel/copy-blocks
Then, for the ordinary layout, run /clip setup in a session. /clip setup remove takes the handler out.
- Linux with X11 and
xclip(sudo apt install xclip). It copies withxclip -selection clipboard. - For Ctrl+click in the ordinary layout: a terminal that opens links (GNOME Terminal, and most VTE terminals, do) and a
desktop that follows
xdg-mime./clip setupinstalls, for your user only:~/.local/bin/copy-block, a MIME type for*.copyblockfiles, and a hiddencopy-block.desktopthat opens them. - Not yet: macOS (
pbcopy), Wayland without XWayland (wl-copy), Windows.
- A
ui.renderhook on Claude Code'sCodeBlockkeeps each closed block as it is drawn and adds the mark under it. - Fullscreen: the mark is a
Button, and its press runsxclipwith the block on its input. - Ordinary layout: the block is written to
~/.cache/copy-blocks/<hash>.copyblock, and the mark is a link to that file. Opening it runscopy-block, which copies the text and writes the file's name to~/.cache/copy-blocks/last-click. The mod looks at that file twice a second to turn the clicked block's mark into✓ copied!. Block files older than a week are removed when a session starts.
claude plugin validate .
claude plugin test .
claude --plugin-dir .
Releases go through a release lane (release.json): the version is the one in .claude-plugin/plugin.json, and
each release is a v<version> tag on main, which is what an install or an update reads.
MIT