What problem does it solve? Long Claude Code sessions hit context limits at arbitrary moments, and auto-compaction often fires mid-task, discarding reasoning, file paths, and partial state that the next steps depend on. This Skill replaces arbitrary auto-compaction with timed suggestions at natural phase transitions. ## Core Features & Use Cases - Context-size monitoring: A PreToolUse hook reads the session transcript's usage records and sums input, cache-read, and cache-creation tokens to measure true context size, suggesting /compact at window-scaled thresholds (160k on a 200k window, 250k on a 1M window). - Tool-call fallback signal: Counts tool invocations per session and suggests compaction at a configurable threshold (default 50 calls, then every 25). - Phase-transition guidance: Provides a decision table for when to compact (research to planning, after debugging, after failed approaches) and what survives compaction (CLAUDE.md, TodoWrite, memory files, git state). - Use Case: During a multi-phase feature build, after finishing research and writing the plan to TodoWrite, the hook detects 165k tokens of context and suggests running /compact before implementation, so coding starts with a fresh window. ## Quick Start Ask the assistant to monitor this session's context usage and suggest when to run /compact at logical task boundaries.