# quarter-clone

This skill trims an active conversation down to its final quarter. It cuts token consumption while preserving the latest instructions and files.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 10273
- Author: ykdojo
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ykdojo/claude-code-tips/tree/HEAD/skills/quarter-clone/SKILL.md
- Updated: 2026-09-25
- HTML: https://affpapa.org/en/nevibecode/skills/quarter-clone

## What it does

The skill reads the active session ID and project folder from `~/.claude/history.jsonl` using `jq`. It searches `~/.claude` for the `half-clone-conversation.sh` script, sorting multiple copies by version if present.

A preview step confirms conversation boundaries before executing the clone with the `--quarter` argument. The tool writes a new session stamped with the current time, appending a note pointing back to the source file. Without `jq` and the shell script present in `~/.claude`, the execution fails.

It yields a ready `claude --resume` call with the new session identifier. Picking it via `claude -r` works too.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill quarter-clone -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/quarter-clone/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/quarter-clone/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill quarter-clone -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/quarter-clone/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill quarter-clone -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/quarter-clone/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ykdojo/claude-code-tips quarter-clone
```

2. **Manually: put the files in place**
- File: `.github/skills/quarter-clone/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill quarter-clone -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ykdojo/claude-code-tips --path skills/quarter-clone
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/quarter-clone/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill quarter-clone -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ykdojo/claude-code-tips/tree/HEAD/skills/quarter-clone/SKILL.md

## When to use it
- drop older dialogue history to decrease token load
- retain immediate context when starting a fresher session
- trace the new branch back to the original transcript
- obtain a direct resume command without manual session selection

## Example prompts
- Clone the last quarter of this chat into a new session
- Trim earlier history and keep only recent context
- Run quarter-clone to prune this conversation

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [ykdojo/claude-code-tips](https://affpapa.org/en/nevibecode/by/ykdojo/claude-code-tips.md) — 8 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
