Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Context Window Planning

ASecurity

Estimate a coding task's context demand and match it to a model tier whose window is sufficient, without quoting specific token counts that churn monthly. Reach for this skill when the task involves large codebases, long conversation histories, or multi-file agentic runs where context overflow would produce silent truncation errors.

7 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentsgoapi

Works with

api

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add mcorbett51090/RavenClaude --skill context-window-planning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Window Planning?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Context Window Planning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mcorbett51090-context-window-planning/badge)](https://www.skillsdirectory.com/skills/mcorbett51090-context-window-planning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: context-window-planning
description: "Estimate a coding task's context demand and match it to a model tier whose window is sufficient, without quoting specific token counts that churn monthly. Reach for this skill when the task involves large codebases, long conversation histories, or multi-file agentic runs where context overflow would produce silent truncation errors."
---

# Skill: Context Window Planning

Context window limits cause one of the most silent failures in AI coding tools: a request is truncated mid-input, the model completes it anyway, and the output is confidently wrong because half the code was never seen. This skill estimates demand, matches to a tier, and flags the overflow risk before it bites.

## The key principle: estimate relative demand, not absolute tokens

Specific context-window sizes change frequently and belong in the dated knowledge bank (`../../knowledge/cross-tool-model-lineup-2026.md`) with `[verify-at-use]` markers. This skill works with **relative demand tiers** that remain stable even as the specific numbers churn:

| Demand tier | Typical workload |
|---|---|
| Low | Single file or function; short chat turn; one-shot completion |
| Medium | 2-5 files; a PR diff; a focused refactor with context |
| High | Entire module or package; cross-repo project with many files |
| Very high | Full repo scan; long autonomous agent run; many-turn conversation with large file contents |

## Step 1 — Estimate the task's context demand

Walk through each input category and classify:

1. **Code payload** — how many files, LOC estimate, are imports/dependencies included?
2. **Conversation history** — is this a long multi-turn session, or a fresh request?
3. **Tool outputs** — does the agent run read test results, linting output, or API responses mid-run?
4. **Output space** — large generated artifacts (a full module, a test suite) consume output tokens that reduce the effective context.

Add up the categories and assign a demand tier (Low / Medium / High / Very High).

## Step 2 — Flag overflow-risk patterns

These patterns almost always exceed a medium-tier window and should be called out explicitly before the run:

- **Full-repo scans** — asking the agent to "review everything" or "find all usages" across a codebase
- **Long agentic runs** — an autonomous task that accumulates tool outputs over many steps
- **Very long diffs** — a PR diff exceeding several thousand lines
- **History-heavy sessions** — a chat conversation that has been running for hours with large file pastes

For each flagged pattern, recommend **chunking**: break the task into scoped sub-tasks that fit within a medium-demand window.

## Step 3 — Match demand tier to model tier

The model tier and the context window are independent axes, but they interact:

```
Low demand    → any tier works; optimize for cost/latency
Medium demand → balanced default tier; verify window in lineup [verify-at-use]
High demand   → frontier tier OR context-chunking strategy; verify window [verify-at-use]
Very high     → chunking is required regardless of model tier; no model currently covers all production codebases in a single call
```

**Do not recommend a frontier model purely for its window size when a chunking strategy on the balanced model would serve the task.** Chunking is almost always cheaper and produces more debuggable results.

## Step 4 — Verify before naming a specific SKU

After identifying the required tier, verify the current maximum window for that tier in the dated lineup before naming a model. Apply the `[verify-at-use]` marker to any specific window size quoted.

```
Report format:
  Task demand: [tier] — [1 sentence reason]
  Recommended model tier: [tier]
  Context strategy: [single-call | chunked into N sub-tasks]
  Verify window size: [verify-at-use — YYYY-MM] from [lineup source]
```

## Pitfalls

- Quoting a specific token limit without a retrieval date — limits change with model updates.
- Assuming the largest available model has an "unlimited" window — all current models have limits.
- Choosing a frontier model to avoid chunking when chunking produces better-scoped output anyway.
- Forgetting output tokens: a task that generates a large file consumes output space that reduces the effective input window.

## See also

- [`../../knowledge/cross-tool-model-lineup-2026.md`](../../knowledge/cross-tool-model-lineup-2026.md) — the dated lineup with `[verify-at-use]` window entries
- [`../../knowledge/ai-coding-decision-trees.md`](../../knowledge/ai-coding-decision-trees.md) — vendor-neutral task-tier tree
- [`../coding-agent-task-scoping/SKILL.md`](../coding-agent-task-scoping/SKILL.md) — companion skill for scoping autonomous runs

Attribution

mcorbett51090mcorbett51090
View sourceSee grades on GitHubMore from mcorbett51090 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →