What problem does it solve?
Auto-compaction can cause loss of important context by triggering at arbitrary points during a task. This Skill prompts strategic, manual compaction to preserve exploration context through task phases.
Core Features & Use Cases
- Strategic prompts at logical boundaries to compact research data before execution.
- Hook-driven integration via PreToolUse to remind and guide when to compact.
- Configurable thresholds (COMPACT_THRESHOLD) to tailor prompts to session length and complexity.
- Use Case: In a multi-phase AI-assisted project, compact after planning to start execution with a clean context and after milestones to reset context for the next phase.
Quick Start
Activate the strategic-compact skill by ensuring the SKILL.md and suggest-compact.sh script are present in the skill's root. Set COMPACT_THRESHOLD in your environment (default 50). The tool will count invocations and emit prompts at the threshold and then every 25 calls thereafter.