ワンクリックで
smart-compact
セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | smart-compact |
| description | セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。 |
| disable-model-invocation | true |
セッションのコンテキストを分析し、ユーザーの意図に沿った /compact プロンプトを生成する。
会話履歴全体を分析し、以下の要素を抽出する:
分析結果を簡潔に箇条書きで表示する。
Phase 1の分析結果に基づき、AskUserQuestionでユーザーにヒアリングする。
質問の生成ルール:
質問テンプレート:
質問: "compactで重点的に保持したい情報はどれですか?"
header: "保持情報"
multiSelect: true
選択肢の例(セッション内容に応じて動的生成):
- "<具体的なタスク名>の実装進捗と残作業"
- "<ファイル名>周辺のエラー調査コンテキスト"
- "<技術名>に関する設計判断と理由"
- "<機能名>のAPI仕様と型定義"
重要: プリセットの汎用的な選択肢ではなく、セッション分析結果から導出した具体的な選択肢を生成すること。
ユーザーの回答に基づき、/compact に渡すプロンプトを生成する。
プロンプト生成ガイドライン:
生成フォーマット:
以下の情報を重点的に保持してコンテキストを圧縮してください:
1. [保持項目1の具体的な内容]
2. [保持項目2の具体的な内容]
3. [保持項目3の具体的な内容]
特に以下は正確に保持してください:
- [重要な固有名詞、パス、コマンドなど]
生成したプロンプトをユーザーに提示
以下のコマンドをコピーして実行してください:
/compact <生成したプロンプト>
> /smart-compact
=== Phase 1: セッションコンテキスト分析 ===
このセッションの主な内容:
- dotfiles CLIのMCPMerger機能の実装
- defu を使ったディープマージのバグ修正
- tests/core/mcp-merger.test.ts のテスト追加
=== Phase 2: ヒアリング ===
[AskUserQuestion]
compactで重点的に保持したい情報はどれですか?
[1] MCPMergerのdefu統合バグの調査経緯と修正内容
[2] mcp-merger.test.ts の追加テストケースと意図
[3] claude.jsonのマージ仕様(キー保持ルール)
[4] Other
> 1, 3 を選択
=== Phase 3: プロンプト生成 ===
生成したプロンプト:
---
以下の情報を重点的に保持してコンテキストを圧縮してください:
1. MCPMergerでdefuを使ったmcpServersマージ時に、既存キーが上書きされるバグの原因と修正内容(src/core/mcp-merger.ts の mergeConfig 関数)
2. claude.jsonのマージ仕様:mcpServersキーのみマージし、apiKey等の他キーはdefu経由で保持する設計判断
特に以下は正確に保持してください:
- src/core/mcp-merger.ts, tests/core/mcp-merger.test.ts のファイルパス
- defu の非破壊マージ挙動(ターゲット側の値が優先される仕様)
---
以下のコマンドをコピーして実行してください:
/compact 以下の情報を重点的に保持してコンテキストを圧縮してください:...
/compact はClaude Codeの組み込みコマンドのため、スキルから直接実行はできないStart implementation work with worktree isolation and cross-session file conflict avoidance. Use this skill when beginning any non-trivial code change: after plan mode, when creating a new branch, implementing features, fixing bugs across multiple files, or refactoring. Also use when the user mentions worktree, bit issue, session coordination, or parallel work.
Turn a report into a portable SVG by authoring a structured/graphical HTML layout and rendering it to SVG with satoru-render. Use when the user asks to compile, summarize, or visualize a report, or wants graphical output that stays viewable in environments that cannot render HTML (chat, PDF viewers, image-only tools, git diffs). Proactively offer SVG output whenever you produce a report that benefits from layout, charts, tables, or styling.
Plan modeで作成したプランに対して、プロジェクト特性を分析し適切なレビューエージェントを自動選択・並列起動するスキル。引数なしで実行可能。
Persist mid-session progress (plan refinements, task progress notes, scope changes, decisions, blockers) to the bit issues created by start-work. Use as a checkpoint before context compaction, after meaningful progress (multiple tasks done, plan refined, scope shifted), before pausing work, or when the user mentions 'save session', 'snapshot', 'checkpoint', 'update bit issue', or 'persist progress'.
Restore session state (plan, target files, in-flight tasks) from bit issues created by the start-work skill. Use when resuming work after Claude Code restart, when the in-memory task list is empty but bit issues exist for the current branch, or when the user mentions "restore session", "repair session", "pick up where I left off", or references a prior bit-issue-tracked session.
agent 向けテキスト指示(skill / slash command / task プロンプト / CLAUDE.md 節 / コード生成プロンプト)を、バイアスを排した実行者に動かしてもらい、両面(実行者の自己申告 + 指示側メトリクス)で評価して反復改善する手法。改善が頭打ちになるまで回す。プロンプトや skill を新規作成・大幅改訂した直後、またはエージェントの挙動が期待通りにならない原因を指示側の曖昧さに求めたいときに使う。