davila7

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 context."

davila7 30,438 3,443 Updated 7mo ago
GitHub

Install

npx skillscat add davila7/claude-code-templates/context-window-management

Install via the SkillsCat registry.

About this skill

We need to produce a 2-3 sentence plain-text summary, objective, factual, no marketing language, no superlatives, no calls to action. At most 60 words. No quotes, no markdown. Just plain text. We need to explain what the skill does, what problem it solves, when to use it. Let's craft: "The skill provides techniques for managing LLM context windows, including summarization, trimming, routing, and avoiding context rot. It addresses issues such as token limits, context loss, and inefficient use of limited context.

SKILL.md

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