一键导入
context-compression
Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | context-compression |
| description | Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work. |
Use when context approaches limits or response quality degrades (repeated mistakes, forgotten constraints, lost-in-the-middle effects) — typically after many turns of debugging or complex planning.
Diagnose bloat — identify: redundant outputs (same file read multiple times), contradictory instructions that accumulated over turns, constraint forgetting (earlier requirements no longer respected).
Draft summary — synthesize the current valid state of the code or plan in 3–5 sentences.
Extract anti-patterns — list what failed and why: "Attempted X → failed because Y". These are critical to prevent the next session from looping on the same mistakes.
Generate handoff artifact — write the following template to disk:
## Goal
[One-sentence objective]
## Current state
[What is working / what is in place right now]
## Blocker / next step
[The exact next action to take]
## Anti-patterns (do not repeat)
- Tried X → failed because Y
- Tried A → blocked by B
## Key files
- `path/to/file.ts` — [what it does / why it matters]
## Open risks
- [Anything uncertain or requiring verification]
## Decisions made
- [Key tradeoffs and why alternatives were rejected]
Restart — tell the user to start a new chat session and attach the handoff file as the first message.
Before finalizing, verify the handoff can answer:
references/compression-quality-probes.mdUse when starting work in a repository with Agent Powerups installed, when a task may match a reusable local skill, command, workflow, hook recipe, AGENTS.md template, or MCP feature.
Use when validating rendered web pages, local dev servers, browser automation, screenshots, forms, auth sessions, or UI evidence with strict browser safety boundaries.
Use when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations.
Use when implementing any feature or bugfix, before writing implementation code
Use when completing tasks, implementing major features, or before merging to verify work meets requirements.
Use when receiving code review feedback, before implementing suggestions — requires technical verification and reasoned pushback, not performative agreement or blind implementation.