🎯

half-clone

🎯Skill

Makes a copy of your current Claude Code conversation that keeps only the later half. You keep your recent work but drop older context, so the session uses less of the AI's memory budget.

ykdojo/claude-code-tips80 InstallsAdded Feb 4, 2026

Installation

$npx skills add ykdojo/claude-code-tips --skill half-clone

Run it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).

Uses skills.sh Β· Node.js 22.20+

After installing

Ask for related work and the agent uses it on its own, or call it yourself.

Run it (Claude Code)/half-clone
Install by hand

Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.

Open the skill folder β†’
  • This project .claude/skills/half-clone/
  • All projects ~/.claude/skills/half-clone/

These paths are for Claude Code. For other tools, the command above puts it in the right place.

Clone the later half of the current conversation, discarding earlier context to reduce token usage while preserving recent work.

Clone the later half of the current conversation, discarding earlier context to reduce token usage while preserving recent work.

Steps:

  1. Get the current session ID and project path: tail -1 ~/.claude/history.jsonl | jq -r '[.sessionId, .project] | @tsv'
  2. Find half-clone-conversation.sh with bash: find ~/.claude -name "half-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
  3. Preview the conversation to verify the session ID: <script-path> --preview <session-id> <project-path>
    • Check that the first and last messages match the current conversation
  4. Run the clone: <script-path> <session-id> <project-path>
    • Always pass the project path from the history entry, not the current working directory
  5. The script prints the new session ID (the New session: <id> line). Give the user the exact command to resume it directly, no picker needed:
    claude --resume <new-session-id>
    
    The script automatically appends a reference to the original conversation at the end of the cloned file. (The new session is also marked [HALF-CLONE <timestamp>], e.g. [HALF-CLONE Jan 7 14:30], so claude -r and picking it works as a fallback.)

More from this repository7

πŸͺ
ykdojo-claude-code-tipsπŸͺMarketplace

45 tips for getting the most out of Claude Code, from basics to advanced - includes a custom status line script, cutting the system prompt in half, using Gemini CLI as Claude Code's minion, and Claude Code running itself in a container. Also includes the dx plugin.

πŸ”Œ
dxπŸ”ŒPlugin

Curated developer experience tips and productivity techniques for Claude Code.

🎯
reddit-fetch🎯Skill

Lets your AI assistant read Reddit posts and comments even when Reddit blocks automated access. It opens Reddit through a browser by way of a DuckDuckGo search result, then pulls posts, scores and comments as data.

🎯
review-claudemd🎯Skill

Reads your recent chats with Claude Code and suggests changes to your CLAUDE.md instruction files. It finds rules that were ignored, new rules worth adding, and old rules you may no longer need.

🎯
handoff🎯Skill

Writes or updates a HANDOFF.md file in your project with the goal, progress, what worked, what failed and next steps. A new AI session can read this file and continue the work without the old conversation.

🎯
clone🎯Skill

A comprehensive collection of 45 Claude Code tips ranging from basics to advanced techniques, covering custom status lines, voice input, multi-Claude workflows, Git integration, container-based execution, and a bundled DX plugin.

🎯
gha🎯Skill

Give it a link to a failed GitHub Actions run, and it finds out why the run failed. It checks whether the failure happens often, finds the change that caused it, and looks for an existing fix before writing a report.