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