Context Management
Use when managing Claude Code context window during long sessions, when context feels degraded, or when deciding between /compact, /clear, /rewind, and sub-agents. Covers context rot detection, compaction timing, branching strategy, and sub-agent isolation patterns.
Install
/plugin marketplace add Sagargupta16/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add Sagargupta16/claude-skills --skill context-managementgit clone --depth 1 https://github.com/Sagargupta16/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/context-management/skills/context-management ~/.claude/skills/context-managementPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 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 1. **Manual compact at 50%** -- don't wait for auto-compaction 2. **Use sub-agents** for exploration tasks (research stays in child context, only results bubble up) 3. **New session for new tasks** -- don't carry unrelated context 4. **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:
Details
- Skill name
context-management- Repository
- Sagargupta16/claude-skills
- Path
plugins/context-management/skills/context-management/SKILL.md- License
- MIT
- Repo updated
- 13 November 2026
FAQ
What does the Context Management skill do?
Use when managing Claude Code context window during long sessions, when context feels degraded, or when deciding between /compact, /clear, /rewind, and sub-agents. Covers context rot detection, compaction timing, branching strategy, and sub-agent isolation patterns.
How do I install the Context Management skill?
Claude Code plugin: /plugin marketplace add Sagargupta16/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Context Management popular?
It lives in Sagargupta16/claude-skills, which has 5 GitHub stars and 0 forks.
Related skills
Clean Code
5Sagargupta16/claude-skills
Use when the user writes new Python, or asks for review, refactor, or cleanup of Python code, names, comments/docstrings, functions, or tests. Applies Robert Martin's complete Clean Code catalog -- naming, functions, comments, DRY, boundary conditions, and tests -- to the code being changed.
Debug Triage
5Sagargupta16/claude-skills
Use when triaging a pasted error, stack trace, or terminal transcript. Activates on "debug this", "fix this", "why is this broken", or when a user pastes red terminal output. Produces a tight cause-fix-test report, not a lecture.
Deps Audit
5Sagargupta16/claude-skills
Use when auditing, updating, or securing project dependencies. Covers multi-language dependency detection, security vulnerability scanning, outdated package identification, unused dependency detection, and update strategies for npm, pip, cargo, and go.
Conventions Improver
5euxx/claude-skills-for-copilot
Audit and improve project conventions files (AGENTS.md, CLAUDE.md, GEMINI.md). Scans for all conventions files, evaluates quality against a scoring rubric, outputs a quality report, then makes targeted improvements with user approval. Use when asked to check, audit, update, or improve AGENTS.md or similar files.
Confidence Gated Routing
9sandbaseai/workbuddy-skill
Use before delegating work to multiple agents or model tiers; assign the cheapest verifiable tier, escalate only objective failure or disagreement residue, and preserve an auditable handoff.
Domain Modeling
9sandbaseai/workbuddy-skill
Use when establishing or changing domain vocabulary, relationships, boundaries, context documents, or architecture decisions so the model stays precise and consistent with code.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.