Simplify copying of markdown output
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Apr 24, 2025 · closed Aug 17, 2026
One good use of claude code is to generate a PR description. Claude generates proper markdown, which is rendered nicely in the terminal. But then it's not possible to copy the raw markdown output. Instead you have to ask claude to write it to a file or use the gh cli to create a PR, which is not always desirable/ergonomic.
It'd be nice instead to have a /show-raw command or something, that would allow for easier copy-pasting of the raw markdown.
Showing cached comments. Read the full discussion on GitHub ↗
10 Comments
following up on this, it would be great to have a /copy-output or /copy slash command that would copy the output given to the terminal when you are in "claude" mode
note: there's
/exportbut it exports in plain text, no markdownThis issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Just commenting to keep this issue alive - would be very useful to have a shortcut to alternate between raw markdown and fancy rendered markdown
and/or for
/exportto have a markdown optionThe leading spaces on every line make copy-paste painful. I end up asking Claude to write to a file just to get clean output, which adds friction.
A built-in
/copycommand that puts the last response in the clipboard (without formatting artifacts) would be ideal.Workaround: I created a custom skill at
~/.claude/skills/clip/skill.mdthat tells Claude to recall its last output and pipe it topbcopy. Running/clipafter any response copies clean text to the clipboard. Works, but should be built-in.I believe this now exists in the form of the
/copyslash command, which copies the last response to the clipboard as markdown.@evnoj bless you
Man, after the 50th time of writing "convert your last message to markdown and save it into
scatch/zfs-tips.md" I finally mustered the energy to spend 5 seconds googling.Anthropic really needs to look how copy/paste is done in OpenCode. It works incredibly nice in there. You don't even need to press ctrl+c either, or if using WSL2, you don't need to right-click to copy. You just highlight content and it copies it. This would ideally be a configurable toggle though (default on, is likely best).
But the way theirs works and fixes all the formatting issues (like leading tabs, spaces, and new lines) is great.
This is pure gold! It might feel a little awkward in some contexts, but it fits perfectly in a chat interface -- especially for developers, where code snippets come up all the time.
this issue can be closed now, right? https://github.com/anthropics/claude-code/issues/859#issuecomment-3939555004