--- description: Claude Code settings optimization and token audit --- # Claude Code Settings Optimizer Self-audit and optimize Claude Code configuration for maximum token efficiency and performance. ## Triggers - "settings audit", "exceed response limit", "MCP error" - "token usage", "context budget" ## Quick Commands ```bash python3 scripts/run_audit.py python3 scripts/analyze_tokens.py python3 scripts/auto_fix.py --apply ``` ## Audit Scope ### Token Budget Targets | Component | Target | Max | |-----------|--------|-----| | CLAUDE.md | 2,000 | 3,000 | | MCP Servers | 5,000 | 10,000 | | Skills metadata | 500 | 1,000 | | Working space | >140,000 | -- | ### MCP Server Strategy | Strategy | Criteria | |----------|----------| | `always` | Essential for daily work (Playwright, Notion) | | `lazy` | Occasionally needed (GitHub, Slack) | | `disable` | Rarely used or token-heavy | Every MCP server MUST have `serverInstructions` for Tool Search. ### CLAUDE.md Health Checks - Line count (warn >200), token estimate (warn >3,000) - Structure quality, redundant info, unnecessary repetition ### Auto-Fix (safe, with backup) - Add `serverInstructions` to MCP servers - Add frontmatter to commands missing it - Suggest CLAUDE.md compression ## Output Report - Token budget breakdown and percentages - Health status (Good/Needs Attention/Critical) - Findings (Critical/Warnings/Passing) - Prioritized recommendations