Agent skill

Conversation Half-Clone

by ykdojo in ykdojo/claude-code-tips

Clones only the later half of the current Claude Code session into a fresh one, cutting token usage while keeping the recent work intact.

Custom licenceAuto-check passedAgent Workflows

Install Conversation Half-Clone

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ykdojo/claude-code-tips half-clone --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ykdojo/claude-code-tips.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/half-clone .claude/skills/half-clone && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
half-clone
GitHub stars
10k
Token cost
~372 tokens
SKILL.md length
184 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Custom licence

At a glance

Clones only the later half of the current Claude Code session into a fresh one, cutting token usage while keeping the recent work intact.

  • Works in 5 steps: Get the current session ID and project… → Find half-clone-conversation.sh with… → Preview the conversation to verify the… → …
  • Trimming an overly long session down to just recent context
  • Calls claude and jq
  • Reducing token usage while keeping the last few turns of work

What it does

The skill reads the current session ID and project path from Claude's history file, locates the `half-clone-conversation.sh` script wherever it was installed, and previews the clone to confirm the first and last messages match before running it for real. After cloning, it hands back the exact `claude --resume <new-session-id>` command so the new session reopens directly without a picker. The script appends a reference to the original conversation at the end of the clone and marks it with a HALF-CLONE timestamp, so finding it in the session list also works as a fallback.

When your agent uses it

  • Trimming an overly long session down to just recent context
  • Reducing token usage while keeping the last few turns of work
  • Starting a lighter session that still carries the latest progress

Example prompts

  • “This conversation got too long, clone the later half into a new session.”
  • “Half-clone this session and give me the resume command.”
  • “Cut the early context from this chat but keep what we just did.”

Requirements

  • Claude Code with `half-clone-conversation.sh` installed

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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
  3. Preview the conversation to verify the session ID: --preview
  4. Run the clone
  5. The script prints the new session ID (the New session: line). Give the user the exact command to resume it directly, no picker needed

What it can do on your machine

Read from SKILL.md and the folder at commit 577ac89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Conversation Half-Clone loads about 372 tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 184 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~372

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 184 words (~372 tokens).

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

— opening of SKILL.md by ykdojo, Custom licence
name
half-clone

Read the full SKILL.md on GitHub

Files

Just SKILL.md in skills/half-clone of ykdojo/claude-code-tips.

Open the folder on GitHubat commit 577ac89

Compare with similar skills

Conversation Half-Clone next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Conversation Half-Clone compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Conversation Half-Clone this skillykdojo/claude-code-tips10k—~372Automated safety check: PassCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Planning with FilesOthmanAdi/planning-with-files27k—~2.9kAutomated safety check: PassMIT
User Thoughts Memorysickn33/agentic-awesome-skills47k1 repos~2.5kAutomated safety check: PassMIT
Session Handoff Documentthedotmack/claude-mem97k—~1.4kAutomated safety check: PassApache-2.0
Planning With FilesOthmanAdi/planning-with-files27k—~3kAutomated safety check: PassMIT

Similar skills

  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check: notes
  • Planning with Files

    OthmanAdi/planning-with-files

    Keeps a task plan, findings and progress log in markdown files on disk so long agent tasks survive context resets, with Gemini hooks and helper scripts.

    27k GitHub stars~2.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Agent WorkflowsAuto-check passed
  • Session Handoff Document

    thedotmack/claude-mem

    Writes a HANDOFF.md capturing goal, state, files, failed attempts and next steps so a fresh agent session can continue exactly where this one stopped.

    97k GitHub stars~1.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Planning With Files

    OthmanAdi/planning-with-files

    Keeps a task plan, findings and progress log as Markdown files in the project so long multi-step agent work survives context resets.

    27k GitHub stars~3k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Harness Engineering

    10xChengTu/harness-engineering

    Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.

    102 GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check passed

More from ykdojo/claude-code-tips

All 9 skills in this repo
  • Hacker News Summarizer

    ykdojo/claude-code-tips

    Fetches Hacker News top stories, a chosen story with its comment thread and the linked article through the official APIs, then summarizes them.

    10k GitHub stars~942 tokensUpdated 12 days ago
    Auto-check passed
  • Reddit JSON Fetcher

    ykdojo/claude-code-tips

    Fetches Reddit posts, threads and search results as JSON through a browser session, using a DuckDuckGo redirect to get past Reddit's automated-access block.

    10k GitHub stars~1.4k tokensUpdated 12 days ago
    Auto-check passed
  • Claude Code Version Check

    ykdojo/claude-code-tips

    Recommends whether to stay on the installed Claude Code version, update, or pin another one by comparing npm tags, release timing and the changelog.

    10k GitHub stars~1.8k tokensUpdated 12 days ago
    Auto-check passed
  • Private GitHub Repo Search

    ykdojo/claude-code-tips

    Full-text searches across every one of the user's GitHub repos, including private ones, using a local mirror and ripgrep instead of GitHub's own search.

    10k GitHub stars~444 tokensUpdated 12 days ago
    Auto-check passed
  • CLAUDE.md Review

    ykdojo/claude-code-tips

    Mines your recent Claude Code conversations for rules that were broken, missing or stale, and suggests edits to global and project CLAUDE.md files.

    10k GitHub stars~677 tokensUpdated 12 days ago
    Auto-check passed
  • Quarter Clone Conversation

    ykdojo/claude-code-tips

    Starts a new Claude Code session from only the last quarter of the current conversation, dropping earlier context to save tokens while keeping recent work.

    10k GitHub stars~401 tokensUpdated 12 days ago
    Auto-check passed

Categories

Questions about Conversation Half-Clone

What does Conversation Half-Clone do?

Clones only the later half of the current Claude Code session into a fresh one, cutting token usage while keeping the recent work intact. sh` script wherever it was installed, and previews the clone to confirm the first and last messages match before running it for real. After cloning, it hands back the exact `claude --resume <new-session-id>` command so the new session reopens directly without a picker.

When should I use Conversation Half-Clone?

Conversation Half-Clone fits situations like: trimming an overly long session down to just recent context; reducing token usage while keeping the last few turns of work; starting a lighter session that still carries the latest progress.

How do I install Conversation Half-Clone in Claude Code?

Run `npx skills add ykdojo/claude-code-tips --skill half-clone -a claude-code`. Or copy the skill folder (skills/half-clone in ykdojo/claude-code-tips) into .claude/skills/half-clone in your project. Claude Code loads it when a task matches its description.

How do I install Conversation Half-Clone in Codex?

Run `npx skills add ykdojo/claude-code-tips --skill half-clone -a codex`. Or copy the skill folder (skills/half-clone in ykdojo/claude-code-tips) into .agents/skills/half-clone in your project. Codex loads it when a task matches its description.

Can I use Conversation Half-Clone in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ykdojo/claude-code-tips --skill half-clone -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/half-clone, .gemini/skills/half-clone, .github/skills/half-clone and .opencode/skills/half-clone in your project.

What does Conversation Half-Clone need to run?

Going by SKILL.md and its folder, Conversation Half-Clone needs the command-line tools its instructions call (claude and jq). Our summary lists: Claude Code with `half-clone-conversation.sh` installed.

Does Conversation Half-Clone access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Conversation Half-Clone safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Conversation Half-Clone use?

Conversation Half-Clone has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Conversation Half-Clone use?

About 372 tokens (SKILL.md is roughly 1.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Conversation Half-Clone?

Skills that share tags, products or a category with Conversation Half-Clone: Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Planning with Files (OthmanAdi/planning-with-files, 27k stars), User Thoughts Memory (sickn33/agentic-awesome-skills, 47k stars) and Session Handoff Document (thedotmack/claude-mem, 97k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Conversation Half-Clone?

ykdojo (a GitHub user) maintains it in ykdojo/claude-code-tips, which has 10,200 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 25, 2026.

Source: ykdojo/claude-code-tips on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.