# context-optimizer

> Claude/Codex skill by [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars · Updated 2026-07-27

Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.

Tags: agent-orchestration, ai-agents, ai-coding, ai-workflow, claude, claude-code, claude-code-plugin, claude-code-skills, claude-skills, codex, context-engineering, cursor, developer-tools, gemini-cli, hooks, productivity, self-correction, workflow, worktrees

## Install

```sh
git clone https://github.com/rohitg00/pro-workflow /tmp/pro-workflow && ln -s /tmp/pro-workflow/skills/context-optimizer ~/.claude/skills/context-optimizer
```

## From README

Context Optimizer Manage your context window and token budget effectively. Quick Diagnosis Run /context to check current If \> 70% → compact now before it degrades If \> 90% → you're in the "dumb zone", compact immediately Optimization Strategies Immediate | 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 | Configuration Set proactive auto-compaction: MCP Audit Keep \<10 MCPs enabled, \<80 tools total. Each MCP adds overhead to every request.

## Links

- HTML page: https://omgskills.com/library/rohitg00/pro-workflow/skills/context-optimizer/
- GitHub: https://github.com/rohitg00/pro-workflow
- Author: [@rohitg00](https://omgskills.com/library/rohitg00/index.md)

## More from this repo

- [context-engineering](https://omgskills.com/library/rohitg00/pro-workflow/skills/context-engineering/index.md) — Master the four operations of context engineering — Write, Select, Compress, Isolate.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.9k stars
- [auto-setup](https://omgskills.com/library/rohitg00/pro-workflow/skills/auto-setup/index.md) — Auto-configure quality gates, hooks, and settings for a new project.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars
- [batch-orchestration](https://omgskills.com/library/rohitg00/pro-workflow/skills/batch-orchestration/index.md) — Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars
