Skip to content
Development
Skill

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

From plugin
awesome-agent-skill
27200 skills4 commands

Claude Code

$ npx -y skills add charlieviettq/awesome-agent-skill --skill context-window-management --agent claude-code

SKILL.md

context-window-management.SKILL.md
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."
allowed-tools: Read, Glob, Grep

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

## 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.

Read more
@charlieviettq
Ships withawesome-agent-skill

Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).

Stars on GitHub

Momentum

stars in total
27
Star history of charlieviettq/awesome-agent-skill on GitHub, a chart by star-history.com

Other skills on awesome-agent-skill.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about context-window-management.

Which coding agents can use context-window-management?
context-window-management installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.