Agent Skills
› ykdojo/claude-code-tips
› clone
clone
GitHub用于克隆当前对话会话,使用户能够分叉并尝试不同的方法。通过获取会话ID和项目路径,执行克隆脚本生成新副本,用户可通过claude -r命令访问带有时间戳标记的克隆对话。
Trigger Scenarios
用户希望基于当前对话创建分支
用户想尝试不同解决方案而不影响原对话
Install
npx skills add ykdojo/claude-code-tips --skill clone -g -y
SKILL.md
Frontmatter
{
"name": "clone",
"description": "Clone the current conversation so the user can branch off and try a different approach."
}
Clone the current conversation so the user can branch off and try a different approach.
Steps:
- Get the current session ID and project path:
tail -1 ~/.claude/history.jsonl | jq -r '[.sessionId, .project] | @tsv' - Find clone-conversation.sh with bash:
find ~/.claude -name "clone-conversation.sh" 2>/dev/null | sort -V | tail -1- This finds the script whether installed via plugin or manual symlink
- Uses version sort to prefer the latest version if multiple exist
- Run:
<script-path> <session-id> <project-path>- Always pass the project path from the history entry, not the current working directory
- Tell the user they can access the cloned conversation with
claude -rand look for the one marked[CLONED <timestamp>](e.g.,[CLONED Jan 7 14:30])
Version History
- 332912a Current 2026-07-05 14:56


