half-clone — Claude Code skill: what it does, how to install
This skill creates a new session from the later part of the current conversation. Use it when the early history is no longer needed but recent work should remain.
npx skills add ykdojo/claude-code-tips --skill half-clone -a claude-codeWhat half-clone does
half-clone reads the active session ID and project path from ~/.claude/history.jsonl. It locates the newest half-clone-conversation.sh, then lets the agent inspect the selected conversation with --preview before creating the clone.
The script writes a reference to the source conversation into the new session and prints its ID. The skill then gives the direct resume command, claude --resume <new-session-id>. Its workflow relies on tail, jq, find, and Bash.
The project path must come from the history entry rather than the current working directory. Using the wrong path can point the clone at the wrong project.
What it helps with
- trim obsolete early conversation context
- keep recent work in a new session
- inspect the selected session before cloning
- resume the cloned session by ID
Example prompts for the agent
- Clone the later part of this conversation after showing me the preview.
- Read the session ID and project path, then create a half-clone.
- Create the new session and give me the exact command to resume it.
How to install half-clone
1Skills CLI (Vercel)
npx skills add ykdojo/claude-code-tips --skill half-clone -a claude-code2Manually: put the files in place
~/.claude/skills/half-clone/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/half-clone/
1Skills CLI (Vercel)
npx skills add ykdojo/claude-code-tips --skill half-clone -a codex2Manually: put the files in place
.agents/skills/half-clone/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ykdojo/claude-code-tips --skill half-clone -a cursor2Manually: put the files in place
.cursor/skills/half-clone/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ykdojo/claude-code-tips half-clone2Manually: put the files in place
.github/skills/half-clone/SKILL.md1Skills CLI (Vercel)
npx skills add ykdojo/claude-code-tips --skill half-clone -a gemini-cli2Platform CLI
gemini skills install https://github.com/ykdojo/claude-code-tips --path skills/half-cloneManually: put the files in place
.devin/skills/half-clone/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ykdojo/claude-code-tips --skill half-clone -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about half-clone
How do I install half-clone in Claude Code?
Run npx skills add ykdojo/claude-code-tips --skill half-clone -a claude-code, then check ~/.claude/skills/half-clone/SKILL.md.
What does half-clone do?
It creates a new session from the later portion of the current conversation. The workflow checks the session and project before cloning, then prints a direct resume command.
Why does the project path come from the history file?
The script uses the project path stored in ~/.claude/history.jsonl, not the current working directory. That keeps the clone tied to the intended project.