mcpField
C
context-window-management

context-window-management

github.com/davila7Agent workflows33.0k583 installsUpdated 1d ago
Repository

About context-window-management

A context-management skill for agents that helps curate limited LLM context by importance, reducing information loss from truncation and context rot.

Key features

  1. 01Tiered context strategies
  2. 02Optimized placement of key content
  3. 03Importance-based summarization
  4. 04Context trimming and routing
  5. 05Token counting and prioritization

Use cases

  1. 01Organizing content near token limits
  2. 02Retaining key details in long conversations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davila7/claude-code-templates --skill context-window-management

After installing, type/context-window-managementin Claude Code to confirm it loaded.

Details

From the project README

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

Comments

Markdown supported