Skip to content

/quarter-clone

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

From plugin
dx
10k9 skills

Claude Code

$ npx -y skills add ykdojo/claude-code-tips --skill quarter-clone --agent claude-code

SKILL.md

quarter-clone.SKILL.md
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.)

Read more
@ykdojo
Ships withdx

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.

Stars on GitHub

Momentum

stars in total
10.3k
Star history of ykdojo/claude-code-tips on GitHub, a chart by star-history.com

Other skills on dx.

gha
Auto-invoked

gha

Analyze GitHub Actions failures and identify root causes

@ykdojo@ykdojoInstall Skill
half-clone
Auto-invoked

half-clone

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

@ykdojo@ykdojoInstall Skill
handoff
Auto-invoked

handoff

Write or update a handoff document so the next agent with fresh context can continue this work.

@ykdojo@ykdojoInstall Skill
hn-summarize
Auto-invoked

hn-summarize

Fetch and summarize Hacker News / hckrnews.com top stories, articles, and their comment threads. Use when asked to summarize HN…

@ykdojo@ykdojoInstall Skill
private-github-search
Auto-invoked

private-github-search

Full-text search across all of the user's GitHub repos (including private ones) using a local mirror and ripgrep. Use for "where…

@ykdojo@ykdojoInstall Skill
reddit-fetch
Auto-invoked

reddit-fetch

Fetch content from Reddit via its JSON API using a browser session (DuckDuckGo-hop unlock). Use when accessing Reddit URLs,…

@ykdojo@ykdojoInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

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.