Context Window Manager is a skill for AI coding agents that addresses the degradation in reasoning quality that occurs when a session’s context window exceeds 60–70% capacity. At that threshold, agents begin to forget instructions, lose track of architectural decisions, and produce inconsistent or incorrect code. This skill implements a structured, phased workflow to extend session longevity and preserve accuracy throughout long development sessions.
The skill introduces four core strategies. Session Anchoring creates lightweight project maps using CLAUDE.md or AGENTS.md files that encode architecture and conventions without consuming unnecessary tokens. Intelligent Compaction applies a decision tree at three usage thresholds — 60%, 80%, and 90% — to summarize conversations while retaining critical architectural decisions and code constraints. Selective File Loading moves away from full-file indexing toward targeted line-range loading and an interface-first hierarchy, reducing token consumption from large codebases. State Handoffs provide automated protocols for migrating session progress to a fresh context when the current session is saturated.
Unlike a simple “summarize this chat” prompt, which risks dropping subtle code constraints or edge case handling, this skill enforces specific preservation rules and command structures. It is intended for use during extended refactoring sessions, large feature implementations, or any AI-assisted coding task that risks exceeding a single session’s capacity. It is not an MCP server and has no tools to invoke; it operates as an instructional skill applied to an existing AI coding agent.