compact
БесплатноБез исполняемых скриптовНе проверенCheck context usage and compact the conversation from the Python REPL. Use when context is filling up, so the session is summarized and context is freed for…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
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 the Python REPL:
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, andpercent(Noneright after a compaction until the next model response), plusscheduled(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. Optionalinstructionsfocus the summary on what matters for the remaining work.
Rules
- Compaction never runs mid-cell. A scheduled compaction runs when the current turn ends, and the turn then stays ended — you are not resumed automatically. Before scheduling, record the state the summary must carry (plan, handles, file paths, the concrete next step) and tell the user how to pick the work back up. Work continues from the summary on the next instruction.
- Conversation compaction does not itself prune the live Python namespace. Kernel snapshots and restores are separate: oversized or unserializable values may not be saved (the default per-variable limit is 16 MiB). Keep large or essential source data on disk and record how to reload it.
- Compact at a natural boundary — a milestone reached, results saved, the
next step easy to state — rather than mid-analysis. Check
await compact.status()when unsure. - One request per turn is enough; calling
runagain before the turn ends only updates the instructions.
Установить compact в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл compact?
Check context usage and compact the conversation from the Python REPL. Use when context is filling up, so the session is summarized and context is freed for the next stretch of work.
Как установить скилл compact?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл compact запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic