Strategic Compact for Claude Code

•
113k
•

Manages context window efficiency by suggesting manual compaction at logical task boundaries to prevent critical context loss.

Strategic Compact is a performance optimization skill for Claude Code that replaces unpredictable automatic compaction with intelligent, manual reminders. By monitoring tool usage through PreToolUse hooks, it identifies optimal moments—such as after a research phase or following a successful debug—to suggest the /compact command. This ensures that essential implementation details are preserved while unnecessary session history is cleared, maintaining high model performance and reducing token overhead during complex development workflows.

主な機能

01112,917 GitHub stars
02Prevents context loss during high-stakes multi-step implementations
03Identifies logical task boundaries for safe context reduction
04Integrates directly with Claude Code's PreToolUse hook system
05Provides configurable thresholds for initial and recurring reminders
06Monitors tool usage counts for Edit and Write operations

ユースケース

01Resetting session history after a complex debugging cycle to start the next task with a clean slate
02Clearing research context after a plan has been finalized and implementation is ready to begin
03Managing token usage in long-form development sessions without losing track of current file changes