Vibeguard strategic-compact

Strategic compression — Manual compression of contexts at logical boundaries rather than arbitrary automatic compression. Key decisions and constraints are preserved and intermediate exploration is discarded.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/vibeguard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/vibeguard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/strategic-compact" ~/.claude/skills/majiayu000-vibeguard-strategic-compact && rm -rf "$T"
manifest: skills/strategic-compact/SKILL.md
source content

Strategic Compact

Overview

In long sessions, the context window is limited. This skill guides when to compact, what to keep, and what to discard.

Core principle: **Compress at logical boundaries, not at any time. **

Compress decision table

Current stageNext stageWhether to compressReason
Research/ExplorationPlanningYesExploration details do not need to be brought into planning
PlanImplementYesKeep the plan, discard the planning process
Implementation step NImplementation step N+1NoCompression during implementation will lose context
Implementation completeValidationOptionalIf the context is close to the upper limit
VerifySubmitNoVerification results need to be submitted
Task A completedTask B startedYesCompression between different tasks

Keep list after compression

Must be retained:

  • Current mission goals and constraints
  • Architectural decisions made and reasons
  • list of modified files
  • Unfinished steps
  • Issues found and TODO
  • VibeGuard constraints (always retained)

Can be discarded:

  • A complete reference to the file content (just keep the path)
  • Intermediate results during search
  • Full stack of resolved bugs
  • Exploratory code reading record

Usage

When it feels like the context is running out:

  1. Determine which stage you are currently in
  2. Check the compression decision table to confirm whether compression is suitable
  3. If appropriate, organize summaries by retention list
  4. Perform compression

Anti-pattern

  • Minification mid-implementation → Loss of critical context, resulting in duplication of work
  • Constraints discarded during compression → subsequent steps violate rules
  • No compression until overflow → Passive truncation is more dangerous than active compression