About
This Claude skill clones only the last quarter of your conversation to reduce token usage while preserving recent work. It's useful when context windows fill up during long development sessions. The skill uses a bash script that finds your conversation history and handles the selective cloning process.
Quick Install
Claude Code
Recommendednpx skills add ykdojo/claude-code-tips -a claude-code/plugin add https://github.com/ykdojo/claude-code-tipsgit clone https://github.com/ykdojo/claude-code-tips.git ~/.claude/skills/quarter-cloneCopy and paste this command in Claude Code to install this skill
Documentation
Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
Steps:
- Get the current session ID and project path:
tail -1 ~/.claude/history.jsonl | jq -r '[.sessionId, .project] | @tsv' - 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
- The same script handles both half and quarter cloning;
--quarterselects quarter mode
- 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
- Run the clone:
<script-path> --quarter <session-id> <project-path>- Always pass the project path from the history entry, not the current working directory
- 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:
The script automatically appends a reference to the original conversation at the end of the cloned file. (The new session is also markedclaude --resume <new-session-id>[QUARTER-CLONE <timestamp>], e.g.[QUARTER-CLONE Jan 7 14:30], soclaude -rand picking it works as a fallback.)
GitHub Repository
Frequently asked questions
What is the quarter-clone skill?
quarter-clone is a Claude Skill by ykdojo. Skills package instructions and resources that Claude loads on demand, so Claude can perform quarter-clone-related tasks without extra prompting.
How do I install quarter-clone?
Use the install commands on this page: add quarter-clone to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does quarter-clone belong to?
quarter-clone is in the Design category, tagged general.
Is quarter-clone free to use?
Yes. quarter-clone is listed on AIMCP and free to install.
Related Skills
Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.
This skill provides a comprehensive guide for developers to connect MCP servers to Claude Code using HTTP, stdio, or SSE transports. It covers installation, configuration, authentication, and security for integrating external services like GitHub, Notion, and custom APIs. Use it when setting up MCP integrations, configuring external tools, or working with Claude's Model Context Protocol.
This skill helps developers choose between Claude Code Web and CLI interfaces based on task analysis, then enables seamless session teleportation between these environments. It optimizes workflow by managing session state and context when switching between web, CLI, or mobile. Use it for complex projects requiring different tools at various stages.
