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.
npx skills add Sagargupta16/claude-skills --skill context-managementgit clone --depth 1 https://github.com/Sagargupta16/claude-skillsWrote 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.
[](https://agentmods.dev/skills/sagargupta16/claude-skills/context-management)<a href="https://agentmods.dev/skills/sagargupta16/claude-skills/context-management"><img src="https://agentmods.dev/badge/skills/sagargupta16/claude-skills/context-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.
<a href="https://agentmods.dev/skills/sagargupta16/claude-skills/context-management"><img src="https://agentmods.dev/badge/skills/sagargupta16/claude-skills/context-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01087 |
| Opus 5.5 | $0.00022 | $0.00435 |
| Sonnet 5.5 | $0.00011 | $0.00217 |
| Haiku 4.5 | $0.00006 | $0.00109 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Management
Quick Reference
| Signal | Action |
|---|---|
| At ~50% context usage | Manual /compact with focus instructions |
| Approach fails, output quality drops | /rewind to before the failed attempt |
| New unrelated task mid-session | /clear or start new session |
| Need to explore/research | Spawn sub-agent (keeps main context clean) |
| Over 300K tokens used | Strongly consider new session |
| Auto-compact triggered | Too late -- quality already degraded |
Context Rot
Context rot is the gradual degradation of output quality as the context window fills up. It typically starts around 300-400K tokens (on 1M token models), but varies by task complexity.
Symptoms
- Claude repeats previous mistakes or ignores corrections
- Output becomes more generic, less project-specific
- Instructions from CLAUDE.md start being ignored
- Code patterns drift from established conventions
Prevention
- Manual compact at 50% -- don't wait for auto-compaction
- Use sub-agents for exploration tasks (research stays in child context, only results bubble up)
- New session for new tasks -- don't carry unrelated context
- Focus compaction:
/compact "keep only the auth implementation details and test results"
Branching Strategy
Every turn in a Claude Code session is a branching point. Choose deliberately:
Current turn outcome:
├── Good result → Continue (carry all context forward)
├── Mediocre result → Two options:
│ ├── /rewind (drop the attempt, retry clean)
│ └── Correct in context (adds noise, sometimes fine for small fixes)
├── Bad result / wrong direction → /rewind (always)
├── Task complete, new task → /clear or new session
└── Need deep research → Spawn sub-agent
/rewind vs Correct In Context
| Scenario | Use /rewind | Correct in context |
|---|---|---|
| Wrong approach entirely | Yes | No |
| Small typo or missed detail | No | Yes |
| Generated wrong file | Yes | No |
| Right idea, minor adjustment | No | Yes |
| Multiple failed attempts | Yes (go back further) | No |
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.
- 1mo ago First seen · 116 lines · 56 tokens per session scan A f34edde85117
context-management is a skill published in the GitHub repository Sagargupta16/claude-skills (5 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 1,087 once invoked, about $0.0002 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.
Other skills, from other repositories
doctor
Use to health-check the user's haku memory directory — validate file layout, catch problems before they cost data. Triggers: "run haku doctor", "check my reflection files", "is my data okay", "back up my reflections", "I'm moving to a new machine". Validates /haku-work-reflections/ (or $HAKUWORKREFLECTIONSHOME)…
capture
Use to log something from the current conversation into the user's haku memory — a decision just made, a win that surfaced, a stakeholder observation, a self-insight. Triggers: "log this", "capture this", "save that decision", "remember this", or a substantive conversation just concluded. Distinct from decision-log /…
phpunit-migration-test-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
phpunit-unit-test-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
dev-environment-bootstrapping
Use this skill when the user asks to bootstrap, set up, create, or initialize a Shopware development environment from scratch — phrases like "set up a Shopware dev environment", "clone and install Shopware", "initialize a Shopware plugin project", "bootstrap Shopware and a new plugin called X", "get a fresh Shopware…
structuring-documentation
Use when writing, editing, auditing, splitting, or measuring Markdown documentation surfaces — README.md, AGENTS.md, CLAUDE.md, and docs/ siblings. Triggers include "is this doc too long", "split this README", "measure the docs", "where does this documentation belong", "audit the documentation", and any request to…