context-window-management
/context-window-management
Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot Use when: context window, token limit, context management, context engineering, long...
- Author
- rootcastleco ↗
- Repository
- rei-skills ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot Use when: context window, token limit, context management, context engineering, long...
Original author description
Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot Use when: context window, token limit, context management, context engineering, long...
How it works
- Capabilities
- Patterns
- Anti-Patterns
- Related Skills
- When to Use
SKILL.md preview
--- name: context-window-management description: "Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot Use when: context window, token limit, context management, context engineering, long..." source: rootcastle-rei risk: unknown --- # Context Window Management You're a context engineering specialist who has optimized LLM applications handling millions of conversations. You've seen systems hit token limits, suffer context rot, and lose critical information mid-dialogue. You understand that context is a finite resource with diminishing returns. More tokens doesn't mean better results—the art is in curating the right information. You know the serial position effect, the lost-in-the-middle problem, and when to summarize versus when to retrieve. Your cor ## Capabilities - context-engineering - context-summarization - context-trimming - context-routing - token-counting - context-prioritization ## Patterns ### Tiered Context Strategy Different strategies based on context size ### Serial Position Optimization Place important content at start and end ### Intelligent Summarization Summarize by importance, not just recency ## Anti-Patterns ### ❌ Naive Truncation ### ❌ Ignoring Token Costs ### ❌ One-Size-Fits-All ## Related Skills Works well with: `rag-implementation`, `conversation-memory`, `prompt-caching`, `llm-npc-dialogue` ## When to Use This skill is applicable to execute the workflow or actions described in the overview. --- > 🏰 **Rei Skills** — Curated by [Rootcastle Engineering & Innovation](https://www.rootcastle.com) | Batuhan Ayrıbaş > Engineering Beyond Boundaries | admin@rootcastle.com
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · rootcastleco/rei-skills | 90 | MIT |
| seyhunak/skilldeck | 100 | MIT |
| fabiensalles/claude-marketplace | 100 | MIT |
| Wsh7Ash/skillmcp | 100 | MIT |
| charlieviettq/awesome-agent-skill | 100 | MIT |
| Amey-Thakur/AI-SKILLS | 90 | MIT |
Database snapshot: 13.11.2026 · package version cb69ccc2731b (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90context-optimization
Use when optimizing token usage, KV cache efficiency, or context window management for LLM agents. Keywords: context optimization, KV cache, prompt caching, token budget, semantic pruning, lost-in-the-middle. - 100context-management
Use when managing Claude Code context window during long sessions, when context feels degraded, or when deciding between /compact, /clear, /rewind, and sub-agents. Covers context rot detection, compaction timing, branching strategy, and sub-agent isolation patterns. - 100cursor-context-management
Optimize context window usage in Cursor. Triggers on "cursor context", "context window", "context limit", "cursor memory", "context management". Use when working with cursor context management functionality. Trigger with phrases like "cursor context management", "cursor management", "cursor". - 90context-engineering
Engineer what enters the model's context window for reliability and cost using Write, Select, Compress, and Isolate. Use when: context engineering, context window budget, context rot, prompt caching, just-in-time retrieval, context compaction, sub-agent context isolation, tool output distillation. - 100agent-context-budget-management-strategies
Use this skill when monitoring, budgeting, and optimizing context window tokens during complex, multi-turn technical workflows. - 100long-context
Work with large Claude context windows deliberately — check the window for your model, count tokens before sending, structure long inputs for recall, cache the stable part, and manage growing conversations with compaction, context editing, or memory instead of stuffing…