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

quarter-clone

できること

このスキルは、現在の会話の最後の4分の1の新しいコピーを作り、それ以前の文脈は落とします。チャットが非常に長く、最新の作業だけが必要な人向けです。

使う場面

  • ✓会話が非常に長く、今すぐ必要なのは最新の作業だけのとき。
  • ✓ハーフクローンよりもさらに短いチャットのコピーがほしいとき。
  • ✓新しいメッセージごとのトークンの使用を減らせる、短いセッションが必要なとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

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:

  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.)
よくある質問

ハーフクローンとどう違いますか?

会話の最後の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

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

0

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

コメント

  • …

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

似ているスキル