Skip to content
Skills Library
AI & agents · Planning

context-window-management

/context-window-management

Manage LLM context budgets—prioritization, summarization, compaction, and what to load vs reference. Use for long sessions, large repos, or multi-doc tasks. Triggers: "context window", "too long", "summarize context", "token budget".

Licence
MIT
Last repository change
20.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 20.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Manage LLM context budgets—prioritization, summarization, compaction, and what to load vs reference. Use for long sessions, large repos, or multi-doc tasks. Triggers: "context window", "too long", "summarize context", "token budget".

Triggers from the description

context windowtoo longsummarize contexttoken budget
Original author description

Manage LLM context budgets—prioritization, summarization, compaction, and what to load vs reference. Use for long sessions, large repos, or multi-doc tasks. Triggers: "context window", "too long", "summarize context", "token budget".

How it works

  1. Lifecycle
  2. Strategy order
  3. What to keep in active context
  4. What to offload
  5. Compaction pattern
  6. Multi-file work
  7. Anti-patterns
  8. Session setup (context engineering)
  9. Pairing
Original SKILL.md headings · 70 lines, 328 words
SKILL.md preview
---
name: context-window-management
description: >
  Manage LLM context budgets—prioritization, summarization, compaction, and
  what to load vs reference. Use for long sessions, large repos, or multi-doc tasks.
  Triggers: "context window", "too long", "summarize context", "token budget".
---

# Context window management

## Lifecycle

| Phase | Action |
|-------|--------|
| Bootstrap | Load spec, constraints, key paths only—not whole repo |
| During task | Append deltas; replace full file reads with summaries after use |
| Before compaction | Write `Session state` block (objective, done, open, paths) |
| Session end | Drop tool noise; keep decisions and verification evidence |

## Strategy order

1. **Do not load** — use search/read targeted files only.
2. **Reference** — pointers (paths, line ranges) instead of full paste.
3. **Summarize** — compress completed work; keep decisions and open items.
4. **Drop** — remove obsolete tool output and duplicated content.

## What to keep in active context

- Current objective and acceptance criteria
- Constraints (env, versions, "do not touch")
- Recent errors and fixes
- Open questions

## What to offload

- Full file contents already summarized
- Long command outputs (keep exit code + last N lines)
- Exploratory branches that did not ship

## Compaction pattern

```text
## Session state (compacted)
Objective: ...
Done: ...
Open: ...
Key paths: ...
Do not repeat: [list already-established facts]
```

## Multi-file work

- Load one module at a time when possible.
- Prefer ripgrep/semantic search over dumping trees.
- For RAG: retrieve only top-k relevant chunks.

## Anti-patterns

- Pasting entire repos or logs into chat.
- Re-explaining architecture every turn without delta.
- Keeping failed attempts at full length after resolution.

## Session setup (context engineering)

Before long tasks, establish a minimal working set:

1. **Objective block** — one paragraph: goal, non-goals, done-when
2. **Constraint block** — versions, env, files off-limits
3. **Reference map** — paths to spec, ADR, or ticket; load on demand
4. **Tool policy** — which tools/skills apply; avoid loading unused skill bodies

Refresh the objective block after major pivots; do not re-paste full history.

## Pairing

Use with `rag-systems` for external knowledge; `clarify-underspecified` when scope grows mid-session; `interview-me` before loading large specs.

Versions

RepositoryScoreLicence
This page · charlieviettq/awesome-agent-skill100MIT
seyhunak/skilldeck100MIT
fabiensalles/claude-marketplace100MIT
Wsh7Ash/skillmcp100MIT
rootcastleco/rei-skills90MIT
Amey-Thakur/AI-SKILLS90MIT

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version bebd898d2411 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 4 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100context-budget
    Context window management for AI agents. Optimize context usage, prevent overflow, and ensure critical information is always available. Use when working with large codebases or long sessions.
  • 100context-window
    Use when allocating context-window budget across system, skill-injection, working, and output zones; monitoring context health; deciding when to compact; preserving state before compaction; recovering after compaction; or choosing strategies for 1M, 200K, or 128K context…
  • 100context-window-hygiene
    Manage what enters and stays in the context window — pruning, compaction, summary fidelity, ordering — so the agent stays coherent on long runs without inflating cost. Use when the user is hitting context limits, running long agentic loops, paying for full-history replays, or…
  • 100context-window-compaction-kv-cache
    Use this skill when managing long-context conversations through rolling summarization, token pruning, and KV-cache reuse.
  • 100context-compression
    This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve decisions, files, risks, and next actions.
  • 100agent-context-budget-management-strategies
    Use this skill when monitoring, budgeting, and optimizing context window tokens during complex, multi-turn technical workflows.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.