What problem does it solve?
This skill prompts manual context compaction at logical milestones to preserve task continuity and avoid loss of critical information due to arbitrary auto-compaction.
Core Features & Use Cases
- Strategic prompts: Suggests manual /compact at key transitions (after exploration, after milestones, before major context shifts) to maintain relevant context.
- Configurable thresholds: Allows setting COMPACT_THRESHOLD to control when the first prompt appears, with a default of 50 tool calls.
- Hook-based integration: Works via the PreToolUse hook to provide timely compaction reminders during AI-assisted workflows.
- Use Case: In a long coding or research session, observe and respond to compact prompts to keep context focused and avoid drift.
Quick Start
Configure Claude to load the strategic-compact skill, ensure the PreToolUse hook is enabled, and set COMPACT_THRESHOLD to your preference (default 50). Then run a multi-step task to see prompts at logical milestones.