What problem does it solve? Auto-compaction in long AI coding sessions triggers at arbitrary points, often mid-task, losing critical context like file paths, variable names, and partial reasoning. This Skill helps you compact context at logical phase transitions instead, preserving what matters across multi-phase work. ## Core Features & Use Cases - Threshold-Based Suggestions: A PreToolUse hook tracks tool calls per session and suggests /compact after a configurable threshold (default: 50 calls), with reminders every 25 calls afterward. - Compaction Decision Guide: A phase-transition table (research → planning → implementation → testing) tells you when compacting is safe and when it would destroy needed context. - Persistence Awareness: Documents what survives compaction (CLAUDE.md, TodoWrite, memory files, git state) versus what is lost, so you can save important context to files before compacting. - Use Case: During a long feature build, after finalizing your plan in TodoWrite, the hook reminds you to run /compact Focus on implementing auth middleware next so you start implementation with a clean context window. ## Quick Start Add the suggest-compact hook to your Claude settings.json for Edit and Write tool events, then follow its suggestions to run /compact at phase transitions during long sessions.