performance — Claude Code rule: what it does, how to install
performance — a Claude Code rule that matches model to task and keeps heavy refactors away from the tail of the context window.
MIT ★ 6,739 updated 2026-01-23
/plugin marketplace add WorldFlowAI/everything-claude-code
/plugin install everything-claude-code@everything-claude-codeWhat performance does
Model choice is the first half. Haiku 4.5 covers lightweight agents that get called often, plus pair programming, code generation and worker agents inside a multi-agent setup. Sonnet 4.5 takes main development work, orchestration of multi-agent workflows and complex coding. Opus 4.5 is for architectural calls, heavy reasoning, research and analysis.
The second half is about budget. The last 20% of the context window should not go to large refactors, multi-file feature work or debugging tangled interactions. Single-file edits, standalone utilities, docs and simple bug fixes are fine there. For hard tasks the rule points to ultrathink, Plan Mode, a few critique rounds and split-role sub-agents.
When a build breaks, it hands off to the build-error-resolver agent: read the message, fix one thing at a time, verify after each change. The stance is blunt: pair the model to the job and watch how much window is left, because a multi-file refactor started near the end tends to go wrong.
What it helps with
- pick between Haiku, Sonnet and Opus for a given task
- keep a multi-file refactor out of a nearly full context window
- switch on
ultrathinkand Plan Mode before a hard change - walk a broken build back one fix at a time
- give sub-agents separate roles for analysis
Example prompts for the agent
- Plan the move of this logic into its own module — Plan Mode first,
ultrathinkon, then we fix things step by step. - The build fails on types. Hand the error to
build-error-resolverand verify after every fix. - Use Haiku for the test scaffolding, leave the architecture pass to Opus.
How to install performance
1Plugin marketplace
/plugin marketplace add WorldFlowAI/everything-claude-code/plugin install everything-claude-code@everything-claude-code2Manually: put the files in place
.claude/rules/performance.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/performance.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/performance.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/performance.mdManually: put the files in place
.clinerules/performance.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about performance
How to install performance in Claude Code?
Run /plugin marketplace add WorldFlowAI/everything-claude-code, then /plugin install everything-claude-code@everything-claude-code. The rule lands at .claude/rules/performance.md.
What does the performance rule do?
It sets which model fits which task, caps what you attempt near the end of the context window, and points to Plan Mode and the build-error-resolver agent.
What is the difference between Sonnet 4.5 and Opus 4.5 here?
Sonnet 4.5 handles main development and multi-agent orchestration; Opus 4.5 is reserved for architecture and reasoning-heavy research.
Source text
performance.md · MIT
# Performance Optimization ## Model Selection Strategy **Haiku 4.5** (90% of Sonnet capability, 3x cost savings): - Lightweight agents with frequent invocation - Pair programming and code generation - Worker agents in multi-agent systems **Sonnet 4.5** (Best coding model): - Main development work - Orchestrating multi-agent workflows - Complex coding tasks **Opus 4.5** (Deepest reasoning): - Complex architectural decisions - Maximum reasoning requirements - Research and analysis tasks ## Context Window Management Avoid last 20% of context window for: - Large-scale refactoring - Feature implementation spanning multiple files - Debugging complex interactions Lower context sensitivity tasks: - Single-file edits - Independent utility creation - Documentation updates - Simple bug fixes ## Ultrathink + Plan Mode For complex tasks requiring deep reasoning: 1. Use `ultrathink` for enhanced thinking 2. Enable **Plan Mode** for structured approach 3. "Rev the engine" with multiple critique rounds 4. Use split role sub-agents for diverse analysis ## Build Troubleshooting If build fails: 1. Use **build-error-resolver** agent 2. Analyze error messages 3. Fix incrementally 4. Verify after each fix
© Affaan Mustafa · MIT · WorldFlowAI/everything-claude-code