chat-compactor
Generate structured session summaries optimized for future AI agent consumption. Use when (1) ending a coding/debugging session, (2) user says "compact", "summarize session", "save context", or "wrap up", (3) context window is getting long and continuity matters, (4) before switching tasks or taking a break. Produces machine-readable handoff documents that let the next session start fluently without re-explaining.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o chat-compactor.zip https://jpskill.com/download/21245.zip && unzip -o chat-compactor.zip && rm chat-compactor.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21245.zip -OutFile "$d\chat-compactor.zip"; Expand-Archive "$d\chat-compactor.zip" -DestinationPath $d -Force; ri "$d\chat-compactor.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
chat-compactor.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
chat-compactorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] chat-compactor
チャットコンパクター
AIエージェントがセッション間で継続性を保てるよう最適化された、構造化された要約を生成します。
これが存在する理由
人間が書いた要約や、その場しのぎのAIによる要約では、重要なコンテキストが失われます。
- 意思決定の根拠が失われる(なぜYではなくXなのか)
- 行き止まりが忘れられる(エージェントが失敗したアプローチを再試行する)
- 暗黙の知識が捕捉されない(ファイルの場所、命名規則、注意点)
- 状態が不明確である(何が完了し、何が保留中で、何がブロックされているのか)
このスキルは、次のセッションに備えるエージェントに最適化された引き継ぎドキュメントを作成します。
出力形式
以下の構造を持つMarkdownファイルを生成します。
# Session: [Brief Title]
Date: [YYYY-MM-DD]
Duration: ~[X] messages
## Context Snapshot
[1-2 sentences: What project/task, what state it's in right now]
## What Was Accomplished
- [Concrete outcome 1]
- [Concrete outcome 2]
## Key Decisions & Rationale
| Decision | Why | Alternatives Rejected |
|----------|-----|----------------------|
| [Choice] | [Reason] | [What didn't work and why] |
## Current State
- **Working**: [files/features that are functional]
- **Broken/Blocked**: [what's not working and why]
- **Modified files**: [list with brief note on changes]
## Dead Ends (Don't Retry)
- ❌ [Approach that failed] — [why it failed]
## Next Steps (Prioritized)
1. [ ] [Most important next action]
2. [ ] [Second priority]
## Environment & Gotchas
- [Any setup notes, versions, quirks discovered]
## Key Code/Commands Reference
[Only if there are non-obvious commands or snippets the next session needs]
ワークフロー
- 会話をスキャンして、意思決定、成果、失敗、ファイル変更、ブロッカーを探します。
- 「引き継ぎの瞬間」を特定します — 新しいエージェントが作業を継続するために何が必要でしょうか?
- 上記の形式を使用して構造化された要約を生成します。
- ファイルに保存します: プロジェクトルートまたは
/home/claude/sessions/にsession-[topic]-[date].mdとして保存します。
圧縮トリガー
以下の状況でこのスキルを呼び出します。
- ユーザーが「compact」、「wrap up」、「save session」、「summarize for next time」と言う場合
- コンテキストウィンドウが容量の約50%を超え、タスクが進行中の場合
- 主要なコンテキスト切り替えの前に
- デバッグ/実装セッションの終わりに
品質基準
良い圧縮とは、以下の特徴を持つものです。
- スキャン可能: 次のエージェントが30秒以内に状況を把握できる
- 実行可能: 漠然とした要約ではなく、明確な次のステップがある
- 防御的: 再探索を防ぐために行き止まりが文書化されている
- 最小限: 無駄がなく、すべての行がトークンに見合う価値がある
アンチパターン
避けるべきこと:
- 物語的な散文(「まずXを試して、次にY、そしてZを試しました…」)
- 冗長なコンテキスト(コードコメントにある内容を繰り返さない)
- 漠然とした要約(「機能について良い進捗がありました」)
- 失敗の文書化の欠落(最も価値のある部分です!)
トリガーと応答の例
ユーザー: 「これで終わりにしましょう、このセッションをコンパクトにしてください」
エージェント:
- 会話から主要な意思決定、成果、失敗を確認します。
- 上記の形式に従って構造化されたMarkdownを生成します。
session-[topic]-[date].mdに保存します。- 確認します: 「セッションは
session-auth-refactor-2025-01-06.mdに圧縮されました — 次回に備えて準備ができました。」
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Chat Compactor
Generate structured summaries optimized for AI agent continuity across sessions.
Why This Exists
Human-written summaries and ad-hoc AI summaries lose critical context:
- Decision rationale gets lost (why X, not Y)
- Dead ends get forgotten (agent re-tries failed approaches)
- Implicit knowledge isn't captured (file locations, naming conventions, gotchas)
- State is unclear (what's done, what's pending, what's blocked)
This skill produces agent-optimized handoff documents that prime the next session.
Output Format
Generate a markdown file with this structure:
# Session: [Brief Title]
Date: [YYYY-MM-DD]
Duration: ~[X] messages
## Context Snapshot
[1-2 sentences: What project/task, what state it's in right now]
## What Was Accomplished
- [Concrete outcome 1]
- [Concrete outcome 2]
## Key Decisions & Rationale
| Decision | Why | Alternatives Rejected |
|----------|-----|----------------------|
| [Choice] | [Reason] | [What didn't work and why] |
## Current State
- **Working**: [files/features that are functional]
- **Broken/Blocked**: [what's not working and why]
- **Modified files**: [list with brief note on changes]
## Dead Ends (Don't Retry)
- ❌ [Approach that failed] — [why it failed]
## Next Steps (Prioritized)
1. [ ] [Most important next action]
2. [ ] [Second priority]
## Environment & Gotchas
- [Any setup notes, versions, quirks discovered]
## Key Code/Commands Reference
[Only if there are non-obvious commands or snippets the next session needs]
Workflow
- Scan conversation for: decisions, outcomes, failures, file changes, blockers
- Identify the "handoff moment" — what would a fresh agent need to continue?
- Generate structured summary using format above
- Save to file:
session-[topic]-[date].mdin project root or/home/claude/sessions/
Compaction Triggers
Invoke this skill when:
- User says: "compact", "wrap up", "save session", "summarize for next time"
- Context window exceeds ~50% capacity and task is ongoing
- Before major context switches
- End of debugging/implementation session
Quality Criteria
Good compactions are:
- Scannable: Next agent gets orientation in <30 seconds
- Actionable: Clear next steps, not vague summaries
- Defensive: Dead ends documented to prevent re-exploration
- Minimal: No fluff, every line earns its tokens
Anti-Patterns
Avoid:
- Narrative prose ("First we tried X, then Y, then Z...")
- Redundant context (don't repeat what's in code comments)
- Vague summaries ("Made good progress on the feature")
- Missing failure documentation (most valuable part!)
Example Trigger & Response
User: "Let's wrap up, compact this session"
Agent:
- Reviews conversation for key decisions, outcomes, failures
- Generates structured markdown per format above
- Saves to
session-[topic]-[date].md - Confirms: "Session compacted to
session-auth-refactor-2025-01-06.md— ready for next time."