copy-chat
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCopy chat
Copy chat
This folder holds a Claude Code mod (the and folders): a
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.
.claude-pluginhooksCopy chat此文件夹包含一个 Claude Code mod(由 和 文件夹组成):它会在输入框上方显示一个 按钮。Claude Code 会在每次新对话中自动加载它。按钮是主要使用方式。当用户通过文字提出要求,或其 Claude Code 版本尚不运行 mods 时,本 skill 会执行相同的复制操作。请使用用户消息所用的语言回答。
.claude-pluginhooksCopy chatCopying the conversation
复制对话
Run the script in this skill's folder (the base directory shown when this skill loaded), with
the Python the computer has (, else ):
python3pythonbash
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
), use
${CLAUDE_SESSION_ID}in 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.--latest - 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:
- : copied. Tell the user it is on the clipboard and ready to paste, with the counts.
{"ok": true, "mine": N, "claude": N, "compacts": N} - or
"why": "no clipboard tool": run it again with"the clipboard refused it"at the end, and give the user the text after the first line in one code block to copy.--print - or
"why": "nothing to copy yet": say so in one line."the conversation file was not found"
Never paste the whole conversation into your reply unless the clipboard failed.
使用计算机上已有的 Python(优先使用 ,否则使用 ),运行此 skill 文件夹中的脚本(该 skill 加载时显示的基准目录):
python3pythonbash
python3 "<this skill's folder>/hooks/thread.py" "${CLAUDE_SESSION_ID}" "<the folder this conversation started in>"- 第一个参数是本次对话的 id。如果传入时未填充该值(字面文本为 ),则改用
${CLAUDE_SESSION_ID}:它会选取该文件夹中最新的对话。请用一行提醒用户:同一文件夹中同时打开多个对话时,--latest可能会选中另一个对话。--latest - 第二个参数是本次对话启动时的工作目录(可从环境信息中获取),而不是用户之后移动到的目录。
脚本会打印一行 JSON:
- :复制成功。告知用户内容已复制到剪贴板、可直接粘贴,并提供各项数量。
{"ok": true, "mine": N, "claude": N, "compacts": N} - 或
"why": "no clipboard tool":在命令末尾再次添加"the clipboard refused it"并运行,然后将第一行之后的文本放在一个代码块中,供用户复制。--print - 或
"why": "nothing to copy yet":用一行告知用户。"the conversation file was not found"
除非剪贴板复制失败,否则不要在回复中粘贴整个对话。
What the copy holds
复制内容
Dana (Oct 6 12:01): ...Claude (12:03): ...[image]内容格式为 和 。名称取用户 Claude 账户名称的第一个词,否则为 。时间使用计算机当前的时区,第一条消息会显示日期,日期发生变化时也会再次显示日期。图片记为 。Subagents、工具输出、提醒和摘要均会被省略。
Dana (Oct 6 12:01): ...Claude (12:03): ..."Me"[image]The button
按钮
Copy chatOff: . Remove: .
No button in a new conversation: this Claude Code version does not run mods yet; asking in
words still works.
claude plugin disable copy-chat@skills-dirnpx skills remove copy-chat -g输入框上方的 按钮只需一键即可完成相同操作,通知中会显示已复制的消息数量。如果没有 Python,它仍会复制消息,但不会附带时间。安装此合集中的其他 mods 或 Smart PreCompact 后,该按钮会与它们位于同一行。
Copy chat关闭:。移除:。
如果新对话中没有按钮,说明此 Claude Code 版本尚不运行 mods;用户仍可通过文字提出复制要求。
claude plugin disable copy-chat@skills-dirnpx skills remove copy-chat -g