manage-context-window

manage-context-window is a skill for Claude Code from abstractonion/cadence. It costs 33 tokens per session (418 once invoked), scanned A, original, MIT.

A working guide for keeping long coding-agent sessions useful as the amount of conversation grows. It recommends focused reading, delegating large investigations, saving progress, and handing work to a fresh session.

In plain words
What is it for?
Use it during large debugging, research, or implementation tasks that span many files or messages. It helps decide what to read, what to record, and when to continue in a new session.
Why use it?
Long sessions can make an agent lose track of details, repeat fixes, or leave work half-finished. The guide provides ways to notice and reduce that decline.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the cadence plugin — 38 skills, 15 commands, 5 agents shipped together

Good fit Use it during large debugging, research, or implementation tasks that span many files or messages. It helps decide what to read, what to record, and when to continue in a new session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abstractonion/cadence/manage-context-window
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 abstractonion/cadence --skill manage-context-window
Clone the repo
git clone --depth 1 https://github.com/abstractonion/cadence

Made for: Claude Code.

Or install cadence, the plugin that ships this one along with the rest of its 38 skills, 15 commands, 5 agents.

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 manage-context-window

README.md
[![agentmods](https://agentmods.dev/badge/skills/abstractonion/cadence/manage-context-window/github.svg)](https://agentmods.dev/skills/abstractonion/cadence/manage-context-window)
Your own site
<a href="https://agentmods.dev/skills/abstractonion/cadence/manage-context-window"><img src="https://agentmods.dev/badge/skills/abstractonion/cadence/manage-context-window/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 manage-context-window

Your own site · 80×15
<a href="https://agentmods.dev/skills/abstractonion/cadence/manage-context-window"><img src="https://agentmods.dev/badge/skills/abstractonion/cadence/manage-context-window.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 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.00033 $0.00418
Opus 5 $0.00016 $0.00209
Sonnet 5 $0.00007 $0.00084
Haiku 4.5 $0.00003 $0.00042

Measured 8d ago against content hash ced0c2972323, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

manage-context-window 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 8d 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.

plugins/cadence/skills/manage-context-window/SKILL.md · 29 lines

What it actually says

Manage your context window

A long session degrades. Vague language, skipped steps, half-finished tasks, and the same bug "fixed" three different ways are all symptoms of context pressure. Notice it early — quality drops gradually, well before any hard limit fires.

What to do, in order of preference

  1. Read narrowly. Use search to land on the few lines you need; don't paste whole files when a snippet suffices. Skim summaries or frontmatter before bodies.
  2. Delegate heavy reads. If answering one question would require loading a large file or long trace into main context, hand that question to a subagent and consume only its summary (see delegate-with-fresh-context).
  3. Checkpoint. When a long session is getting hazy, write the current state — what's done, what's next, what's known, what's unresolved — to a durable artifact (a PR description, a scratch doc, a TODO at the top of the file) so a fresh session can pick up cleanly.
  4. Hand off. If a phase is finished, end the session and start the next one clean. Don't push one more task through a polluted context just because you're already there.

Warning signs you're already degraded

  • You're reaching for "appropriate handling" or "standard pattern" instead of writing the actual code.
  • You're skipping steps you'd normally do (tests, runtime checks, scope diff).
  • A change you "just made" doesn't show up in the diff.
  • You've fixed the same symptom more than once.

When you notice these: stop, summarize what's true, and either delegate the next piece or hand off to a fresh session.

What's worth keeping in main context

The plan, the user's stated intent, the current diff, and the next verification command. Everything else is recoverable on demand.

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. 8d ago First seen · 29 lines · 33 tokens per session scan A ced0c2972323

Subscribe to this mod's changes

manage-context-window is a skill published in the GitHub repository abstractonion/cadence (4 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 418 once invoked, about $0.0002 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

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens