About copy-chat
copy-chat is a Claude Code mod and skill for copying a conversation to the clipboard. It provides a button for one-press copying and supports text requests when the mod is unavailable; the copied transcript omits subagents and tool output.
Key features
- 01Copy chat with a prompt-area button
- 02Copy on request through the skill
- 03Fallback to printed text if clipboard fails
- 04Include speaker names and local timestamps
- 05Omit subagents and tool output
Use cases
- 01Saving a Claude Code conversation to paste elsewhere
- 02Copying a chat when the mod is unavailable
- 03Retrieving transcript text when clipboard access fails
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ jaygptpro/ context-mods --skill copy-chatAfter installing, type/copy-chatin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.claude-plugin/plugin.jsonhooks/hooks.jsonpanel.tsregister.tsxthread.pytests/copy-chat.test.tsxtest_thread.pyDetails
From the project READMECopy chat
This folder holds a Claude Code mod (the .claude-plugin and hooks folders): a Copy chat
button above the prompt. Claude Code loads it by itself in every new conversation. The button is
the main way. This skill does the same copy when the user asks in words, or when their Claude
Code version does not run mods. Answer in the language of the user's messages.
Copying the conversation
Run the script in this skill's folder (the base directory shown when this skill loaded), with
the Python the computer has (python3, else python):
python3 "<this skill's folder>/hooks/thread.py" "${CLAUDE_SESSION_ID}" "<the folder this conversation started in>"
- The first argument is this conversation's id. If it reached you unfilled (the literal text
${CLAUDE_SESSION_ID}), use--latestin its place: the newest conversation of that folder. Say in one line that with several conversations open in the same folder,--latestmay pick another one. - The second is the working directory this conversation started in (from your environment info), not a folder you moved to since.
The script prints one JSON line:
{"ok": true, "mine": N, "claude": N, "compacts": N}: copied. Tell the user it is on the clipboard and ready to paste, with the counts."why": "no clipboard tool"or"the clipboard refused it": run it again with--printat the end, and give the user the text after the first line in one code block to copy."why": "nothing to copy yet"or"the conversation file was not found": say so in one line.
Never paste the whole conversation into your reply unless the clipboard failed.
What the copy holds
Dana (Oct 6 12:01): ... and Claude (12:03): .... The name is the first word of the name on
the user's Claude account, else "Me". Times are this computer's time zone, with the date on the
first message and when the day changes. Images read as [image]. Subagents, tool output,
reminders and summaries are left out.
The button
Copy chat above the prompt does the same in one press, and a notification says how many
messages went. Without Python it copies the messages without times. When other mods from this
collection, or Smart PreCompact, are installed, the button sits in the same row as theirs.
Off: claude plugin disable copy-chat@skills-dir. Remove: npx skills remove copy-chat -g.
No button in a new conversation: this Claude Code version does not run mods yet; asking in
words still works.