What problem does it solve? Claude Code sessions slow down or disconnect when the context window fills up, losing in-progress work. This Skill prevents context exhaustion with project rules, monitors measured token limits, and captures recovery state so a new session can resume seamlessly. ## Core Features & Use Cases - Prevention mode: Installs a CLAUDE.md rule block (file-read limits, scope caps, 80/90% warning rules) and a .claudeignore file blocking node_modules, dist, .git, and other heavy paths. Idempotent via a marker comment. - Monitoring mode: Tracks measured context limits in context_limit_log.json with a configurable safety margin, and warns at 80% and 90% of the effective limit. Never hardcodes limits so model upgrades stay accurate. - Recovery mode: Generates SESSION_RECOVERY.md from git status, diff stats, branch, and .env.example variable names (values excluded), with an automatic secret-pattern scan that aborts on detected API keys or tokens. - Use Case: Mid-refactor your session hits 85% context. Run the recovery script, start a fresh session, paste the generated resume prompt, and continue from the first unfinished task without losing state. ## Quick Start Ask the agent to install context-guardian prevention rules into this project and create a session recovery file before the context limit is reached.