strategic-compact

Installation
Summary

Strategic context compaction at logical task boundaries instead of arbitrary auto-triggers.

  • Suggests /compact at configurable thresholds (default: 50 tool calls) via PreToolUse hooks on Edit and Write operations
  • Provides a decision guide for when to compact across common phase transitions (research to planning, debugging to next feature, etc.)
  • Clarifies what persists through compaction (CLAUDE.md, TodoWrite, memory files, git state) versus what's lost (intermediate reasoning, file contents, conversation history)
  • Includes token optimization patterns for lazy-loading skills, monitoring context consumption, and detecting duplicate instructions across rules and skill files
SKILL.md

Strategic Compact Skill

Suggests manual /compact at strategic points in your workflow rather than relying on arbitrary auto-compaction.

When to Activate

  • Running long sessions that approach context limits (200K+ tokens)
  • Working on multi-phase tasks (research → plan → implement → test)
  • Switching between unrelated tasks within the same session
  • After completing a major milestone and starting new work
  • When responses slow down or become less coherent (context pressure)

Why Strategic Compaction?

Auto-compaction triggers at arbitrary points:

  • Often mid-task, losing important context
  • No awareness of logical task boundaries
  • Can interrupt complex multi-step operations
Related skills
Installs
4.3K
GitHub Stars
180.7K
First Seen
Jan 22, 2026