Skills

Compress Session

Distill the current conversation into a structured note (decisions made, open...

Install

npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -g -a claude-code -y
Category
Engineering
Updated
1mo ago
License
MIT
Context cost
Mediumabout 2,164 tokens
Runs scripts
No, instructions only

What it does

Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1, 3 actions) and save to `quality_reports/session_logs/` before auto-compression. Differs from `/checkpoint` (explicit stop-point snapshot) and from auto-compaction (which truncates rather than distills). Use when context is approaching auto-compact threshold, when a long pipeline has accumulated many decisions, or when the user says "compress", "distil this session", "before we hit auto-compact", "structured handoff before context resets".

/compress-session, distil, don't truncate

Auto-compaction is lossy: it keeps recent turns and drops earlier ones, with no preservation of what was decided mid-session. /compress-session is the distil-not-truncate alternative, produce a structured note that the next session can resume from in under a minute.

Why this skill exists

Drew Breunig's "How Long Contexts Fail" identifies four failure modes for long-context sessions:

  1. Poisoning, early hallucinated content gets quoted by later turns, compounding the error.
  2. Distraction, irrelevant earlier context dilutes the model's attention to current task.
  3. Confusion, contradicted facts pile up; the model doesn't know which to trust.
  4. Clash, multiple plans, decisions, or specs accumulate without explicit reconciliation.

The template's 200-line MEMORY.md cap defends against distraction. The plan-on-disk convention defends against clash. Nothing currently defends against poisoning or directly against confusion, that's what this skill is for.

Distinction from /checkpoint

Read the whole SKILL.md on GitHub

More in Engineering