Agent skill
context
Context window management. Use when: - User asks about "context window", "context usage", "context limit" - User mentions "running out of context", "context full" - User wants to "compact", "clear context", "optimize context" - Context is getting full and needs management
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/context-darkroomengineering-cc-settings
SKILL.md
Context Window Management
Monitor and manage Claude Code context window usage.
Check Context Usage
Run /context in Claude Code to see current usage.
Context Thresholds
Thresholds scale with your context window size:
Default Context (~200K tokens)
| Level | Usage | Action |
|---|---|---|
| Notice | 70% (~140K) | Consider handoff at next stopping point |
| Warning | 80% (~160K) | Create handoff, prepare to compact |
| Critical | 90% (~180K) | Create handoff NOW, then compact |
Managing Context
Create Handoff Before Compacting
/create-handoff
This saves:
- Current task state
- Key decisions made
- Files modified
- Next steps
Compact Context
/compact
Reduces context by summarizing earlier conversation.
Resume After Compact
/resume-handoff
Restores context from handoff file.
Tips for Reducing Context
- Use
context: fork- Skills that fork don't bloat main context - Delegate exploration - Let agents handle research
- Clean summaries - Agents return summaries, not raw output
- Avoid large file reads - Use TLDR for token-efficient analysis
When Context is Full
- Don't panic - Your work isn't lost
- Create handoff - Save current state
- Compact - Let Claude summarize
- Resume - Pick up where you left off
Automatic Protection
The setup includes:
- Warning at 70%, 80%, 90% thresholds
- Auto-handoff before compaction (PreCompact hook)
- Session start recalls relevant learnings
Output
Report:
- Current usage: X% of context
- Recommendation: Action to take
- Next steps: What to do
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?