/quarter-clone
Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
Claude Code
$ npx -y skills add ykdojo/claude-code-tips --skill quarter-clone --agent claude-code
Codex
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a codex -y
Cursor
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a cursor -y
Gemini CLI
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a gemini-cli -y
GitHub Copilot
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a github-copilot -y
OpenCode
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a opencode -y
Windsurf
$ npx skills add ykdojo/claude-code-tips --skill quarter-clone -a windsurf -y
SKILL.md
quarter-clone.SKILL.mdname: quarter-clone
description: Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
Clone the last quarter 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
- The same script handles both half and quarter cloning; `--quarter` selects quarter mode
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> --quarter <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 `[QUARTER-CLONE <timestamp>]`, e.g. `[QUARTER-CLONE Jan 7 14:30]`, so `claude -r` and picking it works as a fallback.)
Read more
name: quarter-clone description: Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
Clone the last quarter 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
- The same script handles both half and quarter cloning; `--quarter` selects quarter mode
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> --quarter <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 `[QUARTER-CLONE <timestamp>]`, e.g. `[QUARTER-CLONE Jan 7 14:30]`, so `claude -r` and picking it works as a fallback.)
Here are my tips for getting the most out of Claude Code, including a custom status line script and Claude Code running itself in a container. Also includes the dx plugin: skills for everyday dev workflows.
Other skills on dx.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about quarter-clone.
- Which coding agents can use quarter-clone?
- quarter-clone installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

