The Strategic Compact skill enhances Claude Code sessions by monitoring token usage and tool calls to recommend the /compact command at optimal moments. Unlike automated compaction which can trigger during sensitive multi-step operations, this skill identifies logical transitions—such as moving from research to implementation—ensuring critical reasoning is preserved while maintaining peak performance and reducing response latency in high-token sessions.
主要功能
01Intelligent window scaling for both 200k and 1M token context windows
02214,597 GitHub stars
03Phase-based decision logic for preserving state during transitions
04Customizable environment variables for threshold sensitivity
05Context-aware compaction suggestions based on token thresholds (160k/250k)
06Tool-call tracking to identify long-running sessions requiring cleanup
使用场景
01Ensuring critical reasoning isn't lost during arbitrary auto-compaction events
02Managing multi-phase development tasks like research, planning, and coding
03Preventing performance degradation and incoherence in 200k+ token sessions