Skip to content
davila7 avatar

Context Window Management

Strategies for managing LLM context windows through summarization, trimming, routing, and avoiding context rot.

CCM score
52 of 100
skills.sh installs
592
GitHub stars
34.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers tiered context strategy, serial position optimization, and importance-based summarization for long dialogues
  • Lists capabilities including context summarization, context trimming, context routing, token counting, and context prioritization
  • Flags anti-patterns such as naive truncation, ignoring token costs, and one-size-fits-all context handling
  • Designed for LLM applications that hit token limits or lose key information mid-conversation, and pairs with rag-implementation and prompt-caching

Install

$ npx -y skills add davila7/claude-code-templates --skill context-window-management -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/davila7/claude-code-templates
Categories
Memory & Context, AI Agents & LLM Apps
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 398

Similar to Context Window Management

More Memory & Context