rahulsub/code-practices-plugin/context-management
Claude Code and agent skill by rahulsub/code-practices-plugin
- community
Checking that the SKILL.md file is still in the repository.
Manage Claude Code sessions effectively. Use during long sessions, multi-step tasks, or when responses start degrading. Covers /clear, checklists, and subagents.
Install
npx vskill@latest install rahulsub/code-practices-plugin/context-managementSKILL.md
The same SKILL.md was published earlier as rahulsub/code-practices-plugin/context-management.
Context Management Skill
Trigger
Use during long sessions, multi-step tasks, or when Claude's responses start degrading in quality.
The Insight
From Anthropic's Claude Code best practices: "Regularly reset context between tasks to prevent irrelevant conversation and file contents from degrading performance."
Why Context Matters
- Claude has limited context window
- Old, irrelevant content crowds out useful information
- Accumulated context from failed approaches confuses new attempts
- Fresh context = better responses
Techniques
1. Use /clear Between Tasks
After completing a task, before starting a new one:
This resets the conversation while keeping:
- CLAUDE.md instructions
- Project context
- Tool permissions
When to clear:
- Switching to unrelated task
- After a complex debugging session
- When responses feel "confused"
- Before important implementations
2. Checklists for Large Tasks
For migrations, bulk fixes, or multi-file changes:
Have Claude maintain this checklist:
- Update after each step
- Verify completion before proceeding
- Track what's done vs remaining
3. Course Correction Tools
Escape to interrupt:
- Press
Escapeonce to stop current generation - Useful when Claude is going down wrong path
Double-tap Escape to edit:
- Press
Escapetwice to edit your previous prompt - Explore alternate directions without losing context
Request undo:
4. Subagents for Investigation
Early in complex tasks, use subagents to investigate details:
Benefits:
- Preserves main conversation context
- Subagent does deep investigation
- Main context gets summarized findings
5. Explicit Context Boundaries
Tell Claude what's relevant and what isn't:
Signs You Need to Manage Context
| Symptom | Solution | |
|---|---|---|
| Claude references old, abandoned approaches | /clear | |
| Responses getting slower | /clear or reduce file reads | |
| Claude confused about current state | Summarize current state explicitly | |
| Repeating the same mistakes | Clear and re-explain requirements | |
| Losing track of multi-step task | Use checklist |
Checklist Template for Large Tasks
Anti-Patterns
Don't:
- Keep adding to context indefinitely
- Assume Claude remembers everything from 50 messages ago
- Debug the same issue repeatedly without clearing
- Mix multiple unrelated tasks in one session
Do:
- Clear between distinct tasks
- Summarize context when resuming
- Use checklists for tracking
- Interrupt early when going off track
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/context-management/SKILL.md
Popularity
- Repository stars
- 1
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rahulsub/code-practices-plugin/context-management)