mcpbeat

Context Window Management

dokhacgiakhoa/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.

481 tokens
context cost
the whole folder, loaded on every use
7
files
instructions only
0
copies elsewhere
how many repositories repackaged it
505
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill context-window-management

What comes with it

423 bytes besides the instruction
sub-skills/ignoring-token-costs.md
sub-skills/intelligent-summarization.md
sub-skills/naive-truncation.md
sub-skills/one-size-fits-all.md
sub-skills/serial-position-optimization.md
sub-skills/tiered-context-strategy.md

The instruction itself

10 sections, as written by the author

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

🧠 Knowledge Modules (Fractal Skills)

1. Tiered Context Strategy

2. Serial Position Optimization

3. Intelligent Summarization

4. ❌ Naive Truncation

5. ❌ Ignoring Token Costs

6. ❌ One-Size-Fits-All

How to use it

Copy the folder

Take dokhacgiakhoa/context-window-management from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.