Skip to main content

compact

Check context usage and compact the conversation from IPython. Use when context is filling up and substantial work remains, so the session is summarized and you keep working instead of stopping early.

ソース情報

リポジトリ
CaseMark/prime-linc
ソースの最終更新活動
2026年8月5日 20:50
検出された SKILL.md の言語
英語
スター
0
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

ファイルエクスプローラー
3 ファイル

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
compact
description
Check context usage and compact the conversation from IPython. Use when context is filling up and substantial work remains, so the session is summarized and you keep working instead of stopping early.
# Compact Compaction replaces older conversation history with a dense summary, freeing context so long-running work can continue. The implementation lives in the host (the same one behind the user's `/compact` command); this skill is the kernel-side interface to it. Call it directly from IPython: ```python await compact.status() await compact.run() await compact.run("keep the failing test names and the migration checklist") ``` ## API - `await compact.status()` — current context usage as a dict: `tokens`, `context_window`, and `percent` (`None` right after a compaction until the next model response), plus `scheduled` (whether a requested compaction is already pending). - `await compact.run(instructions=None)` — schedule compaction. Returns `{"scheduled": True}`, or `{"scheduled": False, "reason": ...}` when there is nothing to compact yet. Optional `instructions` focus the summary on what matters for the remaining work. ## Rules - Compaction never runs mid-cell. A scheduled compaction runs when the current turn ends; the harness then resumes you automatically with the summary plus recent messages, and you continue the task. - The IPython kernel persists through compaction — variables, imports, and helpers you defined all remain available. - Compact at a natural boundary when context usage is high and substantial work remains, instead of becoming terse or returning to the user early. Check `await compact.status()` when unsure. - One request per turn is enough; calling `run` again before the turn ends only updates the instructions.
GitHubで見る