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.

5 starsAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Sagargupta16/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Sagargupta16/claude-skills --skill context-management
Manual install
git 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-management

Personal 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:
Read the full skill on GitHub

Details

Skill name
context-management
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

5

Sagargupta16/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.

Software Development

Debug Triage

5

Sagargupta16/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.

Software Development

Deps Audit

5

Sagargupta16/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.

Security

Conventions Improver

5

euxx/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.

AI, LLMs & Agents

Confidence Gated Routing

9

sandbaseai/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.

AI, LLMs & Agents

Domain Modeling

9

sandbaseai/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.

AI, LLMs & Agents

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.