quarter-clone
できること
このスキルは、現在の会話の最後の4分の1の新しいコピーを作り、それ以前の文脈は落とします。チャットが非常に長く、最新の作業だけが必要な人向けです。
使う場面
- ✓会話が非常に長く、今すぐ必要なのは最新の作業だけのとき。
- ✓ハーフクローンよりもさらに短いチャットのコピーがほしいとき。
- ✓新しいメッセージごとのトークンの使用を減らせる、短いセッションが必要なとき。
スキルのリンク
https://github.com/ykdojo/claude-code-tips/blob/main/skills/quarter-clone/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この会話のクォータークローンを作って、文脈を減らして作業を続けられるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、現在のセッションを見つけ、コピーされるメッセージが一致するかをプレビューで確認してから、スクリプトを実行して最後の4分の1から新しいセッションを作ります。その後、それを開くためのコマンドを示します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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.)
よくある質問
ハーフクローンとどう違いますか?
会話の最後の4分の1だけを残すため、ハーフクローンよりもコピーが短くなります。
最新のメッセージを失いますか?
いいえ。コピーには会話の最も新しい部分が残ります。
新しいセッションはどう開きますか?
このスキルは新しいセッションIDを含むコマンドを示すので、そのまま再開できます。
詳細
作者による元の説明
Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.
repo: ykdojo/claude-code-tips
人気
- GitHubのスター
- 10k
- ランキング
- #11903
- ライセンス
- —
- 更新日
- 2026/9/25
コメント
- …
このリポジトリの他のスキル
gha
10kエージェントが、GitHub Actionsのワークフローが失敗した理由と、同じジョブが繰り返し失敗しているかどうかを調べられるよう支援します。
half-clone
10kエージェントが、長いチャットの後半を新しいセッションにコピーできるよう支援します。最近の作業を残しつつ、使用するトークンを減らせます。
handoff
10kエージェントが、新しいチャットがプロジェクトを、明確な目標、進捗、次のステップとともに引き継げるように、引き継ぎ文書を書けるよう支援します。
hn-summarize
10kエージェントが、公式のHacker Newsのデータを使い、人気の記事の上位、または指定した1つの記事とそのコメントを要約できるよう支援します。