occams-razor — Claude Code command: compare explanations
The occams-razor command weighs competing explanations against the facts and removes unsupported assumptions. Use it when a bug or decision has several plausible causes.
MIT ★ 1,988 updated 2026-04-01
/plugin marketplace add glittercowboy/taches-cc-resources
/plugin install taches-cc-resources@taches-cc-resourcesWhat occams-razor does
occams-razor applies Occam’s Razor to the supplied argument or to the current discussion when no argument is given. It lays out possible explanations, identifies the assumptions behind each one, and checks which assumptions have evidence.
The command then removes explanations that depend on unsupported assumptions. It selects the simplest option that still accounts for every observed fact, with the result organised into candidates, an evidence check, the selected explanation, and the reason it wins. With no argument, the current discussion becomes the subject of the analysis.
To install it in Claude Code, add the glittercowboy/taches-cc-resources marketplace, install taches-cc-resources@taches-cc-resources, and use the command file at .claude/commands/occams-razor.md.
What it helps with
- compare competing causes of a failure
- count the assumptions behind each hypothesis
- remove explanations unsupported by evidence
- choose an explanation that fits every observed fact
Example prompts for the agent
- Use
/taches-cc-resources:occams-razorto analyse this bug and compare the possible causes. - Run
/taches-cc-resources:occams-razoron the current discussion, then identify the explanation with the fewest unsupported assumptions. - Apply
/taches-cc-resources:occams-razorto the case where a test fails only in CI and show the evidence check.
How to install occams-razor
1Plugin marketplace
/plugin marketplace add glittercowboy/taches-cc-resources/plugin install taches-cc-resources@taches-cc-resources2Manually: put the files in place
.claude/commands/occams-razor.mdCall it with /occams-razor. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/occams-razor.mdCall it with /prompts:occams-razor. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/occams-razor.prompt.mdManually: put the files in place
.gemini/commands/occams-razor.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about occams-razor
How do I install occams-razor in Claude Code?
Run /plugin marketplace add glittercowboy/taches-cc-resources, then run /plugin install taches-cc-resources@taches-cc-resources. The command file is .claude/commands/occams-razor.md.
What does occams-razor do?
It compares possible explanations, checks the assumptions each one needs, and selects the option with the fewest unsupported assumptions while still fitting the facts.
What happens when I leave the argument blank?
The command analyses the current Claude Code discussion. If you provide an argument, it analyses that situation instead.
Source text
occams-razor.md · MIT
--- description: Find simplest explanation that fits all the facts argument-hint: [situation or leave blank for current context] --- <objective> Apply Occam's Razor to $ARGUMENTS (or the current discussion if no arguments provided). Among competing explanations, prefer the one with fewest assumptions. Simplest ≠ easiest; simplest = fewest moving parts. </objective> <process> 1. List all possible explanations or approaches 2. For each, count the assumptions required 3. Identify which assumptions are actually supported by evidence 4. Eliminate explanations requiring unsupported assumptions 5. Select the simplest that still explains all observed facts </process> <output_format> **Candidate Explanations:** 1. [Explanation]: Requires assumptions [A, B, C] 2. [Explanation]: Requires assumptions [D, E] 3. [Explanation]: Requires assumptions [F] **Evidence Check:** - Assumption A: [supported/unsupported] - Assumption B: [supported/unsupported] ... **Simplest Valid Explanation:** [The one with fewest unsupported assumptions] **Why This Wins:** [What it explains without extra machinery] </output_format> <success_criteria> - Enumerates all plausible explanations - Makes assumptions explicit and countable - Distinguishes supported from unsupported assumptions - Doesn't oversimplify (must fit ALL facts) - Reduces complexity without losing explanatory power </success_criteria>
© Lex Christopherson · MIT · glittercowboy/taches-cc-resources