Agent skill
context-monitor
Monitors context token usage and warns when approaching limits. Automatically activates when context usage exceeds thresholds (30k, 50k, 70k tokens). Provides recommendations for context management and /clear usage. Auto-activates based on token usage, no specific keywords needed.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/context-monitor
SKILL.md
Context Usage Monitor
Purpose
Monitor and warn about context usage to prevent context exhaustion.
Usage Thresholds
- 30k tokens: First warning (Yellow)
- 50k tokens: Strong warning (Orange)
- 70k tokens: Critical warning (Red) - Consider /clear
Monitoring Points
- After each agent invocation
- Before complex tasks
- When reading large files
Warning Messages
Yellow (30k)
⚠️ Context Usage: ~30k tokens
Consider focusing on current task only.
Orange (50k)
🟠 Context Usage: ~50k tokens
Recommend completing current task then /clear.
Red (70k+)
🔴 Context Usage: 70k+ tokens
CRITICAL: Use /clear soon to prevent errors.
Save important context before clearing.
Best Practices
- Use subagents to preserve main context
- Clear context between major features
- Avoid reading unnecessary large files
- Use Task tool for complex searches
Context-Saving Commands
Before /clear, save important info:
# Save current branch and status
git status > /tmp/context_save.txt
git diff --staged >> /tmp/context_save.txt
# After /clear, restore context:
cat /tmp/context_save.txt
Skill Version: v1.0 Last Updated: 2025-12-25 Project: career_ios_backend
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?