本文へスキップ
Skillpedia
その他10k · #11899

half-clone

できること

このスキルは、現在の会話の後半の新しいコピーを作り、前半は落とします。チャットが長くなり、文脈を減らして作業を続けたい人向けです。

使う場面

  • ✓会話が非常に長くなり、続けるのが遅くなったとき。
  • ✓最近の作業は残したいが、チャットの初期の部分は落としたいとき。
  • ✓新しいメッセージごとに使うトークンを減らしたいとき。

スキルのリンク

https://github.com/ykdojo/claude-code-tips/blob/main/skills/half-clone/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/ykdojo/claude-code-tips/blob/main/skills/half-clone/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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:

  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
  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> <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 [HALF-CLONE <timestamp>], e.g. [HALF-CLONE Jan 7 14:30], so claude -r and 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

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル