context-management

context-management is a skill for Claude Code from sefaertunc/Worclaude. It costs 16 tokens per session (1,668 once invoked), scanned A, original, MIT.

A set of practices for managing the limited amount of conversation and project information an agent can hold at once. It explains when to compress the conversation, start fresh, or delegate work to another agent.

In plain words
What is it for?
Use it to monitor context usage, preserve the current task and progress during compaction, decide when to clear the conversation, and offload suitable work to subagents.
Why use it?
It reduces lost details and confused reasoning when a coding task involves many files, long discussions, or several major pieces of work.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it to monitor context usage, preserve the current task and progress…

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

Made for: Claude Code.

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-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/sefaertunc/worclaude/context-management.svg)](https://agentmods.dev/skills/sefaertunc/worclaude/context-management)
Your own site
<a href="https://agentmods.dev/skills/sefaertunc/worclaude/context-management"><img src="https://agentmods.dev/badge/skills/sefaertunc/worclaude/context-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,668 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.00016 $0.01668
Opus 5 $0.00008 $0.00834
Sonnet 5 $0.00003 $0.00334
Haiku 4.5 $0.00002 $0.00167

Measured 6d ago against content hash 9532f7a7e1e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

context-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 6d 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.

.claude/skills/context-management/SKILL.md · 175 lines

How it starts

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

Context Management

Note: The bash examples below are reference snippets. If you enable disableSkillShellExecution in Claude Code settings (v2.1.101+), any inline shell execution from skills is blocked. These fenced examples are safe to read; copy-paste them into your terminal to run.

The 70% Rule

Context windows are finite. When you estimate you've used roughly 70% of available context, it's time to act. Don't wait until you're out of room — you lose the ability to reason well before you hit the hard limit.

Signs you're running low:

  • You've read many large files in this session
  • You've had a long back-and-forth conversation
  • You're working on a second or third major task
  • Responses are getting slower or less coherent

Three Tools, Different Jobs

/compact — Compress and continue

Use when: you're mid-task and need more room but want to keep working. What it does: summarizes conversation history, freeing context. Pair with: PostCompact hook that re-reads CLAUDE.md and PROGRESS.md automatically.

After compaction, always re-orient:

  • What task am I working on?
  • What branch am I on?
  • What did I just do?

/clear — Fresh start

Use when: you're starting a genuinely new task with no relationship to the current one. What it does: wipes conversation entirely. Caution: you lose ALL context. Make sure PROGRESS.md is updated first.

Subagents — Offload without losing context

Use when: a side task would pollute your main context (research, testing, file generation). What it does: spawns a separate context that does work and returns results. Your main context stays clean.

Decision Matrix

Situation Action
~70% context, mid-task /compact
Task complete, starting unrelated work /clear
Need to research something tangential Subagent
Need to run tests while continuing design Subagent
Context feels sluggish, responses degrading /compact
Long debugging session, found the fix /compact, then implement

Read the full file on GitHub · 175 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. 6d ago First seen · 175 lines · 16 tokens per session scan A 9532f7a7e1e8

Subscribe to this mod's changes

context-management is a skill published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 27d ago), licensed MIT. It adds 16 tokens to every session and 1,668 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

raytsystem-save

Stage a cited synthesis as a typed raytsystem DRAFT bundle and escaped preview. Use for SAVE, preserving a verified query answer, preparing a knowledge proposal, or creating a reviewable draft; never treat SAVE as canonical promotion or publication.

romarayt/raytsystem-public-os · 53 tokens

handoff

Emit a paste-ready two-part handoff for a fresh session: a ## Goal statement hard-capped under 4000 characters (produced by the /goal skill), plus an unbounded ## Full prompt carrying cwd, ordered reading list, hard rules, pitfalls, and deliverables. Runs with or without a git repository — branch and PR facts are…

dryvist/claude-code-plugins · 116 tokens

diagnose-with-memory

A bug-diagnosis workflow that uses records of earlier failures, decisions, and lessons. It checks whether past findings still apply to the current version and environment before investigating the code.

ezBuilder/code-brain · 32 tokens

tdd-with-memory

A test-first implementation workflow that recalls past decisions, conventions, and lessons before coding. TDD, or test-driven development, means writing a failing test first, then implementing the code and finally cleaning it up.

ezBuilder/code-brain · 35 tokens

fable-context-thrift

Use at the start of any multi-step task and during exploration — before reading files, searching, or re-checking completed work, especially when tempted to read whole files, re-verify known facts, or run independent lookups one at a time.

DizzyMii/fable-skills · 56 tokens

remarkable-memory

Turns handwritten reMarkable notes into a queryable semantic memory. Syncs pages from a reMarkable tablet (via the reMarkable MCP server, rmapi, or a USB/SSH bridge), renders each page to an image and reads the handwriting with Claude vision — no OCR key — then extracts each page into confidence-scored, human-editable…

mostafa-drz/claude-skills · 194 tokens