Skip to content
Development
Skill

/context-compression

Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work.

From plugin
agent-powerups
8114 skills46 agents54 commands

Claude Code

$ npx -y skills add yeaight7/agent-powerups --skill context-compression --agent claude-code

SKILL.md

context-compression.SKILL.md
name: context-compression
description: Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work.

Context Compression

When to use

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.

Requirements / Checks

  • Active session contains long stack traces, large file dumps, or multiple failed iterations.

Workflow

1. **Diagnose bloat** — identify: redundant outputs (same file read multiple times), contradictory instructions that accumulated over turns, constraint forgetting (earlier requirements no longer respected).

2. **Draft summary** — synthesize the *current* valid state of the code or plan in 3–5 sentences.

3. **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.

4. **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]

5. **Restart** — tell the user to start a new chat session and attach the handoff file as the first message.

Quality Probes

Before finalizing, verify the handoff can answer:

  • **Recall**: exact commands, errors, versions, decisions that still matter.
  • **Artifact**: files created, modified, inspected, intentionally untouched.
  • **Continuation**: next action, current blocker, validation state, open risks.
  • **Decision**: why key tradeoffs were chosen and what alternatives were rejected.

Safety Constraints

  • Do NOT silently drop critical architectural constraints or user preferences during compression.
  • Write the handoff document to disk before asking the user to restart.

Validation / Done Criteria

  • Handoff artifact exists on disk and is in the template format above.
  • User is explicitly told to restart the session and attach the file.
  • All four quality probes (recall, artifact, continuation, decision) can be answered from the artifact without re-reading the full transcript.

Anti-loss Checklist

  • [ ] Goal is clearly stated.
  • [ ] Current blocker / next step is identified.
  • [ ] Failed approaches are documented to prevent looping.
  • [ ] Relevant file paths are listed.
  • [ ] Key decisions and their reasons are recorded.

References

  • `references/compression-quality-probes.md`
Read more
@yeaight7
Ships withagent-powerups

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

8114 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8
Star history of yeaight7/agent-powerups on GitHub, a chart by star-history.com

Other skills on agent-powerups.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about context-compression.

Which coding agents can use context-compression?
context-compression installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.