Reduces token usage by discarding the start of a conversation and cloning only the most recent context.

Install

mkdir -p .claude/skills/half-clone && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4198" && unzip -o skill.zip -d .claude/skills/half-clone && rm skill.zip

Installs to .claude/skills/half-clone

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Clone the later half of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
128 charsno explicit “when” trigger
Beginner

Key capabilities

  • Identifies session history paths
  • Runs automated conversation cloning scripts
  • Previews session history before execution
  • Generates [HALF-CLONE] references for traceability

How it works

Executes a shell script that reads the history log, truncates the message history based on metadata, and initializes a new instance with the recent segment.

Inputs & outputs

You give it
Clone last half of chat
You get back
New session ID reference and original context link

When to use half-clone

  • Reducing context window size for better performance
  • Starting a fresh session from a long-running chat
  • Managing large development session history

About this skill

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.)

When not to use it

  • When full historical context is required for future auditing
  • When the current session is small and doesn't impact performance

Prerequisites

Claude Code installed with local history accessHalf-clone-conversation.sh script

Limitations

  • Discards context from the first half of the conversation
  • Depends on the presence of local history files

How it compares

Instead of manual copy-pasting, it preserves metadata and session state for the agent while cleaning up the context window.

Compared to similar skills

half-clone side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
half-clone (this skill)16moNo flagsBeginner
pptx3936moReviewAdvanced
nano-pdf632moReviewBeginner
video-downloader1017moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

pptx

anthropics

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

393763

nano-pdf

openclaw

Edit PDFs with natural-language instructions using the nano-pdf CLI.

63300

video-downloader

ComposioHQ

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

101255

youtube-transcript

michalparkola

Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.

68277

using-superpowers

obra

Use when starting any conversation - establishes mandatory workflows for finding and using skills, including using Skill tool before announcing usage, following brainstorming before coding, and creating TodoWrite todos for checklists

95205

browser-automation

browserbase

Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Triggers include "browse", "navigate to", "go to website", "extract data from webpage", "screenshot", "web scraping", "fill out form", "click on", "search for on the web". When taking actions be as specific as possible.

39230

Search skills

Search the agent skills registry