Strategic Context Compaction
Optimizes Claude's context management by suggesting manual compaction at logical task boundaries to prevent critical data loss.
Strategic Context Compaction is a performance optimization skill for Claude Code that replaces unpredictable automatic compaction with intelligent, milestone-based prompts. By monitoring tool usage and session length, it identifies logical transitions—such as moving from research to implementation—where a manual `/compact` will clear bulky reasoning history without losing essential project plans or file states. This ensures Claude remains responsive and accurate during long, complex development sessions exceeding 200K tokens, preventing the 'context pressure' that leads to hallucinations or slow response times.
主な機能
01Seamless integration with PreToolUse hooks for Edit and Write actions
02Context preservation guidance for critical project state
03Transition-aware suggestions (Research → Plan → Implement)
04156,033 GitHub stars
05Customizable notification thresholds for strategic intervention
06Intelligent tool-call tracking to monitor session density
ユースケース
01Managing high-token sessions during large-scale codebase refactoring or migrations.
02Clearing session noise after a deep debugging dive before starting a new feature.
03Ensuring project plans are preserved while flushing out verbose file exploration logs.