Command Palette

Search for a command to run...

Назад к скиллам
скилл № 16712

context-pressure-compact

Compress a long-running multi-step task into a structured snapshot before continuing. USE WHEN: `todowrite` > 5 items, after ~20 tool calls, context getting…

БесплатноБез исполняемых скриптов
MiniMax-AIот MiniMax-AI★ 30 звёзд на GitHub

Установить context-pressure-compact в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Context Pressure Compact

Compress the running state of a long task into a structured snapshot, then keep working from the snapshot. The agent loses the noisy middle (failed attempts, finished steps, stale tool output) but keeps the goal, the decisions, and the next move.

v1.0 update: now incorporates the 64K retention budget from Codex's compact_remote_v2.rs — the "important" messages preserved after a compact should target ~64,000 tokens, not be unbounded.

When to use

Activate when any of these is true:

  • The active todowrite has more than 5 items, and at least 2 are still in progress.
  • The agent has executed roughly 20 or more tool calls since the user request.
  • The user says "compact", "summarize so far", "refocus", "we're getting lost", or "let me see the state".
  • A tool call from tool-output-budget is being applied to a string the agent will not need again (it has been superseded by newer output).
  • A sub-task boundary (a self-contained feature is done; the next user step starts a new one).
  • The estimated total tokens (history + current message) is approaching the model context window (typically 80% of the window is the trigger).

Do not use this Skill for short tasks (< 5 tool calls, < 3 todowrite items). Compaction has its own cost; the savings only matter once the conversation is genuinely heavy.

When NOT to use

  • A single one-shot question. The user wants an answer, not a checkpoint.
  • The user is in the middle of dictating a multi-step request. Finish listening first.
  • The user explicitly said "do not summarize" or "keep everything".

Process

  1. Freeze new work. Do not start any new tool call before the snapshot is written.

  2. Target the 64K retention budget. After compact, the retained messages (the important ones — current goal, recent decisions, key file paths) should target ~64,000 tokens. Discard the rest. This is RETAINED_MESSAGE_TOKEN_BUDGET from compact_remote_v2.rs. If you retain more, the next compaction will arrive sooner than expected; if you retain much less, the agent will lose context.

  3. Write the snapshot to a single fenced block, in this exact shape:

    ## Compact Snapshot — <ISO timestamp or "step N">
    
    **Goal**: <one sentence, copied verbatim from the user request>
    
    **Done** (these are finished; do not re-do them):
    - <step + key result + path/identifier>
    
    **In progress** (these are partially done; carry the partial state forward):
    - <step + where you stopped + the next concrete sub-step>
    
    **Decisions made** (so future you doesn't re-argue them):
    - <decision + one-line reason>
    
    **Key file paths** (absolute paths the next step will need):
    - /path/to/foo
    - /path/to/bar
    
    **Blockers / open questions** (so the user can answer them upfront next turn):
    - <question or "none">
    
    **Next concrete step**: <one verb-first sentence — "Edit X to add Y", "Run Z and report output", etc.>
    
    **Retained token estimate**: <N tokens>  (target: ~64K, see RETAINED_MESSAGE_TOKEN_BUDGET)
    **Discarded this turn**: <M tool calls and N lines of intermediate output>
    
  4. Optionally persist to disk if the user has a working directory. Default path: .minimax/snapshots/<ISO-date>-<short-id>.md. The user can read it later to reload context.

  5. Drop the noisy middle from the next prompt. After the snapshot, your next response should start from "Next concrete step", not from re-stating the goal.

  6. Continue working as if the snapshot is the only context. Do not re-fetch the files you already listed under "Key file paths" unless you need to re-read them.

  7. Coordinate with other state files (cross-references):

    • goal-persistence file: survives compaction unchanged (its file is on disk).
    • world-state-tracking file: survives compaction unchanged.
    • subagent-family-tracking file: survives compaction unchanged.
    • goal-token-budgeting usage log: keep the latest row, drop the history.
    • todowrite: keep Done/In progress sections, drop the granular "attempted X then Y then Z" history.

Output contract

Every time you apply this Skill, the user sees:

  • The Compact Snapshot block (as above).
  • An optional one-line "discarded N tool calls and M lines of intermediate output" note.
  • The next concrete step, phrased as an action the user can sanity-check.
  • The retained token estimate (so the user knows the budget is being respected).

Example

## Compact Snapshot — 2026-08-23T23:55:00Z — step 7

**Goal**: Refactor the auth subsystem to support OIDC without breaking the existing SAML path.

**Done** (these are finished; do not re-do them):
- Mapped current auth flow in src/auth/. Wrote findings to .minimax/snapshots/auth-flow.md
- Identified 4 injection points: login(), callback(), refresh(), logout()
- Confirmed test coverage: 12 of 14 files have unit tests (2 missing: logout, ses
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл context-pressure-compact?

Compress a long-running multi-step task into a structured snapshot before continuing. USE WHEN: `todowrite` > 5 items, after ~20 tool calls, context getting full, agent has lost track of goal, user said "compact" / "summarize" / "refocus" / "压缩" / "总结" / "到哪了", before context window fills (>80%), before `context-pressure-compact` boundary. TRIGGER PHRASES: "compact", "summarize", "refocus", "压缩", "总结", "到哪了", "context 满了", "忘了目标", "we're getting lost", "compress", "snapshot". SKIP WHEN: short task (<5 tool calls), user in middle of dictating a request, user said "do not summarize" / "keep everything".

Как установить скилл context-pressure-compact?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл context-pressure-compact запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить context-pressure-compact с