context-window-management

context-window-management is a skill for Claude Code, Codex from varunk130/ai-workflow-playbooks. It costs 21 tokens per session (1,418 once invoked), scanned A, original, MIT.

A method for deciding which project information an agent should load into its limited working context. It prioritizes the task, relevant source files, tests, and configuration over unrelated material.

In plain words
What is it for?
Selecting files to inspect, reading tests early, managing context limits, and keeping coding sessions focused on the work at hand.
Why use it?
It reduces noise and helps the agent stay focused as a task grows. Loading the right evidence also lowers the chance of missed requirements or invented details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Selecting files to inspect, reading tests early, managing context limits, and keeping coding sessions focused on the work at hand.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/varunk130/ai-workflow-playbooks/context-window-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add varunk130/ai-workflow-playbooks --skill context-window-management
Clone the repo
git clone --depth 1 https://github.com/varunk130/ai-workflow-playbooks

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-window-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/varunk130/ai-workflow-playbooks/context-window-management/github.svg)](https://agentmods.dev/skills/varunk130/ai-workflow-playbooks/context-window-management)
Your own site
<a href="https://agentmods.dev/skills/varunk130/ai-workflow-playbooks/context-window-management"><img src="https://agentmods.dev/badge/skills/varunk130/ai-workflow-playbooks/context-window-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-window-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/varunk130/ai-workflow-playbooks/context-window-management"><img src="https://agentmods.dev/badge/skills/varunk130/ai-workflow-playbooks/context-window-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.01418
Opus 5.5 $0.00008 $0.00567
Sonnet 5.5 $0.00004 $0.00284
Haiku 4.5 $0.00002 $0.00142

Measured 1mo ago against content hash 2c51bcbffd42, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-window-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/context-window-management/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Window Management

What This Skill Enables

Agents with this skill can work effectively within their finite context window by making deliberate choices about what to load, when to load it, and what to leave out. Without it, agents either overload their context with irrelevant files (leading to confused reasoning and missed details) or underload it (leading to hallucinated APIs and wrong assumptions). Skilled context management is the difference between an agent that stays sharp on task and one that degrades as complexity grows.

Core Competencies

1. Understand the Context Budget

Think of the context window as a fixed budget measured in tokens. Every file, every message, every tool output consumes part of that budget. Once exhausted, older information is lost or the agent must start a new session.

Budget Category Priority Guidance
Task specification Always load The issue, ticket, or user request that defines what "done" looks like.
Directly relevant source files Always load Files you are about to read or edit.
Related test files Load early Tests define expected behavior and catch mistakes.
Config and schema files Load when needed tsconfig.json, .env.example, database schemas -- load when the task touches them.
Framework boilerplate Avoid Large generated files, lockfiles, and vendor directories are noise.
Unrelated modules Avoid Code in other features or services that the current task does not touch.

Rule of thumb: if a file will not influence a decision you make in the next few steps, do not load it yet.

2. Choose What to Load vs. What to Omit

Before reading any file, ask: "Will this change what I do next?"

Load:

  • The file(s) you are about to modify.
  • The test file(s) that cover those modules.
  • The specification or issue body for the current task.
  • Type definitions or interfaces that the modified code depends on.
  • Configuration files only when the task involves config changes.

Read the full file on GitHub · 113 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 113 lines · 21 tokens per session scan A 2c51bcbffd42

Subscribe to this mod's changes

context-window-management is a skill published in the GitHub repository varunk130/ai-workflow-playbooks (2 stars, last pushed 24d ago), licensed MIT. It adds 21 tokens to every session and 1,418 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

context-bankruptcy

Declare bankruptcy on a long-lived AI agent's accumulated memory — audit what it currently believes, separate ground truth from stale and wrong, purge deliberately, restate the truths that survive, and log what was lost. Use when an agent keeps acting on outdated facts, contradicts itself across sessions, 'remembers'…

mohitagw15856/pm-claude-skills · 108 tokens

context-engineering-review

Review what an LLM feature or agent actually puts in its context window — and find what's bloating, missing, or fighting itself. Use when asked to review a system prompt and context assembly, cut token usage without losing quality, debug an agent that ignores instructions, or audit how retrieval results, history, and…

mohitagw15856/pm-claude-skills · 111 tokens

memory-file-maintenance

Keep your AI memory/context file (MEMORY.md, CLAUDE.md, custom instructions) healthy over time — pruning the stale, adding the new, and keeping it sharp so your AI keeps getting you right. Use when asked review my memory file, my AI context is outdated, clean up my CLAUDE.md, or maintain my AI instructions. Produces a…

mohitagw15856/pm-claude-skills · 146 tokens

agent-project-file

Set up the project file an AI agent keeps for work that runs over days or weeks: the goal, the definition of done, milestones, the current state, decisions made, open questions, and the exact point to resume from after an interruption. Use when asked to plan a long-running agent task, make my agent work on this over a…

mohitagw15856/pm-claude-skills · 109 tokens

bochi

A Japanese-speaking thinking and context assistant for the Mac command line. It helps with notes, light conversation, idea development, summaries, and routing deeper discussions to Discord.

fideguch/bochi · 281 tokens

customer-journey-map

Construye un mapa de recorrido del cliente para un producto, servicio o experiencia. Úsalo cuando se te pida mapear un recorrido del cliente, crear un viaje del usuario, documentar puntos de contacto y puntos de fricción, o diseñar un mapa de experiencia. Produce un mapa de recorrido completo con etapas, puntos de…

mohitagw15856/pm-claude-skills · 86 tokens