What problem does it solve? Automatic context compaction triggers at arbitrary points, often mid-task, losing important context and interrupting complex multi-step operations. This Skill helps you compact at logical boundaries instead, preserving the context that matters for each task phase. ## Core Features & Use Cases - Tool Call Tracking: A PreToolUse hook script counts tool calls in the session and detects when a configurable threshold is reached. - Threshold-Based Suggestions: Recommends running /compact after a default of 50 tool calls, then reminds every 25 calls afterward. - Configurable Behavior: Adjust the first-suggestion threshold with the COMPACT_THRESHOLD environment variable. - Use Case: After finishing codebase exploration and locking in an implementation plan, the hook reminds you to compact research context so execution starts with a clean, focused window. ## Quick Start Add the suggest-compact.sh script as a PreToolUse hook for Edit and Write tools in your Claude settings.json so you receive compaction suggestions at logical intervals.