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 $0.00010 $0.00709
Sonnet 5 $0.00004 $0.00284
Haiku 4.5 $0.00002 $0.00142

Measured 9d ago against content hash 2c51bcbffd42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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. 9d 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 1mo ago), licensed MIT. It adds 21 tokens to every session and 1,418 once invoked, about $0.0001 per session on Opus 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

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

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 tokens

claude-md-updater

Scans the session for lessons and workflows, then proposes scoped CLAUDE.md edits. Use for save this lesson or add to context.

jamditis/claude-skills-journalism · 34 tokens

agent-wiki

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

Dianel555/DSkills · 89 tokens

self-improving-agent

Low-noise self-improvement skill. Captures learnings, errors, and corrections into a local .learnings/ cache layer. Never auto-promotes to long-term memory files (SOUL.md, MEMORY.md, AGENTS.md, TOOLS.md). Promotion requires explicit user approval after repeated validation.

YiShu5/claude-skills · 68 tokens

knowledge-priming-refiner

Facilitate a structured conversation to create a project-specific knowledge base document. Produces a knowledge-base.md that primes AI with the project's tech stack, architecture, trusted sources, and project structure. Use when the user says 'set up knowledge base', 'prime the project', 'onboard AI', 'create…

techygarg/lattice · 84 tokens