/elon-musk-algorithm-skills:musk-step-3-simplify-optimizefrom elon-musk-algorithm-skills
Step 3 of the Musk algorithm: simplify and optimize what survived deletion. Applies to refactoring, performance tuning, query optimization, and choosing simplest viable implementations.
Ships in elon-musk-algorithm-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Only after steps 1 and 2. Optimizing a thing that should not exist is the most common smart-engineer failure.
Part of the [[musk-algorithm]]. Third in the strict order.
Before this step, verify in the conversation or diff:
If either is absent, stop. Run the missing step first. This is the most common skip point. Refuse aggressively.
Schools train convergent logic: answer the question. Engineers instinctively optimize before questioning whether the thing should exist. Musk identifies this as the single most common failure mode in smart engineering teams.
A simplification or optimization of a part that survived steps 1 and 2 is high-leverage. The same work on a part that should have been deleted is wasted, and worse, it hard-codes the unjustified part deeper into the system.
For each surviving part:
Part: [what is being simplified]
Justification sentence: "This exists because [named person] requires [requirement] and removing it causes [failure]."
Pre-optimization state:
- Parts: N
- Lines: N
- Parameters: N
- Branches: N
- Dependencies: N
- Special cases: N
Optimization moves:
1. [move + justification]
2. [move + justification]
Post-optimization state:
- Parts: N (delta)
- Lines: N (delta)
- Parameters: N (delta)
- Branches: N (delta)
- Dependencies: N (delta)
- Special cases: N (delta)
Out-of-scope code touched: [should be empty, or explicitly justified]
This step is done when:
Only then can [[musk-step-4-accelerate-cycle-time]] begin.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wezendy/elon-musk-algorithm-skills --plugin elon-musk-algorithm-skills6 skills in this plugin
/musk-algorithmApply Elon Musk's 5-step engineering algorithm in strict order. PRIMARY USE CASE is reviewing, auditing, cleaning up, or restructuring existing systems (brownfield work). Trigger on phrases like "clean this up", "optimize this", "we have too many", "should we keep X", "let's automate Y", "this is bloated", "review this architecture", or any request to evaluate or compress an existing system. SECONDARY USE CASE is greenfield planning ("should we build X", "do we need this feature") with translation. Steps 2, 4, 5 reinterpret as "default to no", "design for iteration", "design for manual first". DO NOT use for function-level coding decisions like variable naming, error handling style, or refactoring patterns; for those, pair this framework with andrej-karpathy-skills which operates at the function level./musk-step-1-question-requirementsStep 1 of the Musk algorithm. Question every requirement and demand a named human originator. Applies to BOTH brownfield (reviewing existing requirements) and greenfield (evaluating new requirements before building). Use whenever the user introduces a requirement, constraint, policy, or "we need to" statement. Trigger on phrases like "we need to", "the requirement is", "compliance says", "best practice is", "the team wants", "X is required because", "should we build X", "do we need this feature", or any rule or feature request that lacks a clear named owner. Also trigger as the first step when the [[musk-algorithm]] overview is invoked./musk-step-2-delete-partsStep 2 of the Musk algorithm. Delete aggressively. PRIMARILY BROWNFIELD - use whenever the user is reviewing an existing system, codebase, process, set of features, dashboard, document collection, or any inventory of accumulated parts. Trigger on phrases like "clean this up", "we have too many", "should we keep", "is this still used", "let's prune", "what can we remove", or any review of accumulated complexity. The 10% add-back rule is the calibration signal. GREENFIELD ANALOG - "default to no" on every speculative abstraction, configurability hook, or feature that lacks a named requirement from step 1. Requires [[musk-step-1-question-requirements]] to be complete first./musk-step-4-accelerate-cycle-timeStep 4 of the Musk algorithm. Accelerate cycle time on what survived simplification. BROWNFIELD ONLY. Requires an existing, operational process with measurable cycle times. Not applicable to greenfield work where no cycle exists yet. Use whenever the user wants to reduce latency, shorten build/deploy time, speed up an existing pipeline, reduce time-to-insight on an established workflow, or compress any measured feedback loop. Trigger on phrases like "make this faster", "reduce cycle time", "speed up", "shorten the loop", "reduce latency", "less waiting", or "compress this process". Requires steps 1, 2, and 3 to be complete first./musk-step-5-automateStep 5 of the Musk algorithm. Automate only what survived steps 1 through 4. BROWNFIELD ONLY. Requires the target process to have been operated manually long enough to surface edge cases. Not applicable to greenfield work; for new applications, design for manual operation first, automate later. Use whenever the user wants to automate an existing manual task, build a workflow, create an N8N/Make/Zapier flow, write a script for an established repetitive process, or replace proven manual work with code. Trigger on phrases like "let's automate this", "build an automation for", "create a workflow", "script this", "make this run on a schedule", or "the AI should handle this automatically". The Fremont rule applies - automating too early is the costliest engineering mistake. Requires steps 1 through 4 to be complete first.Other plugins' skills for the same job