What problem does it solve? Auto-compaction in Claude Code triggers at arbitrary points, often mid-task, losing important context like variable names, file paths, and partial state. This Skill helps you compact at logical phase transitions instead, preserving the context that matters. ## Core Features & Use Cases - Threshold-Based Suggestions: A PreToolUse hook counts Edit/Write tool calls and suggests running /compact after a configurable threshold (default 50 calls), with reminders every 25 calls afterward. - Compaction Decision Guide: Provides a phase-transition table (research → planning → implementation → testing) indicating when compacting is safe versus costly. - Context Survival Reference: Documents what persists across compaction (CLAUDE.md, TodoWrite tasks, memory files, git state) versus what is lost (conversation history, file contents read). - Use Case: During a long multi-phase session, after finalizing your implementation plan in TodoWrite, the hook reminds you to compact research context so you start implementation with a fresh, focused context window. ## Quick Start Add the suggest-compact hook to your Claude Code settings.json for Edit and Write matchers, then follow its suggestions to run /compact at logical phase boundaries.