From pro-workflow
Manages context window and token budget with compaction strategies, MCP audits, subagent delegation, and prompt engineering tips.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pro-workflow:context-optimizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage your context window and token budget effectively.
Manage your context window and token budget effectively.
/context to check current usage| Action | Saves | When |
|---|---|---|
/compact | 30-50% context | At task boundaries |
| Disable unused MCPs | ~5% per MCP | When switching domains |
| Use subagents for exploration | Keeps main context clean | Heavy search/read tasks |
Fresh session via /resume | 100% reset | When starting unrelated work |
Set proactive auto-compaction:
{
"env": {
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50"
}
}
Keep <10 MCPs enabled, <80 tools total. Each MCP adds overhead to every request.
/mcp # List active servers
# Disable what you're not using
Heavy operations that generate lots of output should go to subagents:
The main session stays clean while subagents handle the volume.
| Phase | Target Usage | Action If Over |
|---|---|---|
| Planning | < 20% | Keep plans concise |
| Implementation | < 60% | Compact between files |
| Testing | < 80% | Delegate to subagent |
| Review | < 90% | Start fresh session |
Switch response style based on context:
Signs:
Fix:
/compact/resumenpx claudepluginhub rohitg00/pro-workflow --plugin pro-workflowTeaches the four operations of context engineering — Write, Select, Compress, Isolate — for managing token budgets, compaction strategies, and context partitioning to keep AI sessions sharp and efficient.
Optimizes Claude Code context-window usage for accuracy and cost. Helps when hitting context limits, structuring prompts, or trimming injected content.
Manages Claude Code context windows with token arithmetic, anchor budget math, compact strategies, progressive loading, and large codebase partitioning.