rahulsub/code-practices-plugin/context-management

Claude Code and agent skill by rahulsub/code-practices-plugin

Trust tier 3
  • community
Source check pending

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

SKILL.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:

/clear

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:

markdown
## Migration Checklist
### Completed
-[x] Update User model
-[x] Update User service
-[x] Update User controller
### In Progress
-[ ] Update User tests ← CURRENT
### Remaining
-[ ] Update API documentation
-[ ] Update client SDK
-[ ] Run full test suite

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 Escape once to stop current generation
  • Useful when Claude is going down wrong path

Double-tap Escape to edit:

  • Press Escape twice to edit your previous prompt
  • Explore alternate directions without losing context

Request undo:

Undo the last change to user-service.ts
4. Subagents for Investigation

Early in complex tasks, use subagents to investigate details:

Use a subagent to research how error handling is done in this codebase.
Report back the patterns found.

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:

Forget about the authentication changes we discussed earlier.
Focus only on the new payment integration.
The relevant files are:
- src/payments/
- src/api/checkout.ts

Signs You Need to Manage Context

SymptomSolution
Claude references old, abandoned approaches/clear
Responses getting slower/clear or reduce file reads
Claude confused about current stateSummarize current state explicitly
Repeating the same mistakesClear and re-explain requirements
Losing track of multi-step taskUse checklist

Checklist Template for Large Tasks

markdown
## Task: [Migration/Refactor/Bulk Fix Name]
### Overview
[Brief description of the full task]
### Progress Tracking
#### Phase 1: [Name]
-[ ] Step 1.1
-[ ] Step 1.2
-[ ] Step 1.3
#### Phase 2: [Name]
-[ ] Step 2.1
-[ ] Step 2.2
#### Phase 3: [Name]
-[ ] Step 3.1
-[ ] Step 3.2
### Current Focus
[Which item is being worked on NOW]
### Blocked Items
[Items waiting on something]
### Verification
-[ ] All tests pass
-[ ] Manual verification complete
-[ ] Ready for review

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rahulsub/code-practices-plugin/context-management/badge)](https://verified-skill.com/skills/rahulsub/code-practices-plugin/context-management)

Something wrong with this skill or its page? Tell us.