
thinking-occams-razor
Use when multiple causes could explain a bug — test the fewest-assumption hypothesis first; escalate to complex only when evidence forces it. Skip the full procedure when one step resolves it.
- Installs
- 130
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tjboudreaux/cc-thinking-skills --skill thinking-occams-razor- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads thinking-occams-razor automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Occam's Razor
Overview
Occam's Razor states: among competing hypotheses that fit the evidence equally well, prefer the one with the fewest assumptions. This skill operationalizes that principle for debugging: test the simplest hypothesis first, and escalate to complex explanations only when evidence forces it.
The skill has a trigger-shrink gate: if the simplest hypothesis can be tested in one step, just test it — don't run the full enumeration-and-scoring procedure. Reserve the full procedure for situations where multiple hypotheses genuinely compete and the simplest is not obviously testable.
Core Principle: "Everything should be made as simple as possible, but no simpler." — Einstein
When to Use
- Multiple hypotheses could explain a bug and the simplest is NOT obviously testable in one step
- You're about to investigate a complex hypothesis without first testing a simpler one
- Architecture or design decisions where several approaches are viable and differ in complexity
- Root cause analysis where several causes seem plausible
Decision flow:
Multiple explanations exist?
→ No → Use the available explanation
→ Yes → Can the simplest be tested in one step?
→ Yes → JUST TEST IT (trigger-shrink — skip full procedure)
→ No → Do they explain the evidence equally well?
→ No → Prefer the better explanation
→ Yes → RUN FULL OCCAM'S RAZOR PROCEDURE
When NOT to Use
- Evidence already points to a specific cause. Follow the evidence; don't downgrade to a "simpler" hypothesis it contradicts.
- The domain is irreducibly complex (distributed consensus, concurrency, security threat models). The simplest model is wrong; don't oversimplify ("but no simpler").
- Only one plausible explanation exists. There's nothing to compare — just test it.
- "Simple" would mean ignoring a known interaction or skipping a load-bearing safeguard. Local simplicity that creates systemic risk isn't parsimony.
- The trigger check resolves it. If you can test the simplest hypothesis in one step and it's confirmed, you're done — don't enumerate for completeness.
Trigger Card
Before running the full enumeration-and-scoring procedure, ask one question: "Can I test the simplest hypothesis in one step?"
- Identify the simplest hypothesis — the one with the fewest assumptions that still explains the evidence.
- Can you test it in one step? → Yes → Just test it. If confirmed, report and stop. If refuted, move to the next simplest.
- If it can't be tested in one step → run the full Occam's Razor procedure (enumerate, count assumptions, verify explanatory power, test in order).
If evidence already points to a specific cause, follow the evidence — don't downgrade to a "simpler" hypothesis it contradicts. For irreducibly complex domains (distributed consensus, concurrency), the simplest model is wrong.
Procedure
Trigger Check (Fast Path)
Before running the full procedure, ask: "Can I test the simplest hypothesis in one step?"
- Yes → Test it. If confirmed, report and stop. If falsified, move to the next simplest.
- No → The simplest hypothesis requires non-trivial investigation → run the full procedure below.
Full Procedure: When the Trigger Check Doesn't Resolve
Step 1: Enumerate Competing Hypotheses
List all plausible explanations for the observed behavior:
Bug: Users intermittently can't log in
Hypotheses:
A. Session token expiration edge case
B. Race condition in auth service
C. Database connection pool exhaustion
D. Complex interaction between CDN cache, load balancer, and session service
Step 2: Count Assumptions per Hypothesis
| Hypothesis | Assumptions |
|---|---|
| A. Token expiration | 1. Token validation has an edge case |
| B. Race condition | 1. Concurrent requests possible, 2. Shared mutable state exists |
| C. DB pool exhaustion | 1. Pool is undersized, 2. Connections are leaking |
| D. Complex interaction | 1. CDN caches auth, 2. LB sticky sessions fail, 3. Session sync delayed |
Count each independent assumption: +1 per assumption, +1 per component involved, +2 per external dependency, +2 for timing-dependent behavior, +3 for rare conditions, +5 for "perfect storm" scenarios.
Step 3: Verify Explanatory Power
Ensure simpler hypotheses actually explain the evidence:
Evidence: Failures correlate with high traffic periods
Hypothesis A (token edge case): Doesn't explain traffic correlation ✗
Hypothesis C (DB pool exhaustion): Explains traffic correlation ✓ — fewer assumptions than D
→ PREFERRED by Occam's Razor
Step 4: Test in Order of Fewest Assumptions
Investigate hypotheses from fewest to most assumptions. Do not skip to complex hypotheses until simple ones are ruled out.
Step 5: Escalate Complexity Only When Evidence Forces It
When simple explanations are ruled out with evidence, move to more complex ones. Never escalate on intuition alone.
Output Contract
A completed Occam's Razor analysis produces:
- Trigger Check Result — whether the simplest hypothesis was testable in one step
- Hypothesis Ranking — ordered by assumption count, with each hypothesis' assumptions listed
- Explanatory Power Check — which hypotheses fit the evidence
- Test Order and Results — which hypotheses were tested, in what order, and the outcome
- Conclusion — the confirmed hypothesis (or the next to test if unresolved)
For trigger-shrink cases, the output may be a single line: "Tested simplest hypothesis X — confirmed/refuted."
Anti-Patterns
| Anti-Pattern | Symptom | Correction |
|---|---|---|
| Oversimplifying irreducible domains | Applying "simplest" to distributed consensus or security models | "But no simpler" — respect domain complexity |
| Complexity bias | Assuming complex = sophisticated, testing complex hypotheses first | Test fewest-assumption hypotheses first, always |
| Trigger inflation | Running the full enumeration for a one-step test | If the simplest is one-step testable, just test it |
| Ignoring explanatory power | Choosing the simplest hypothesis that doesn't fit the evidence | Fewer assumptions doesn't beat not fitting the data |
| Local simplicity, systemic risk | Choosing a simple local fix that creates fragility elsewhere | Prefer systemic simplicity over local simplicity |
| Ritualistic assumption counting | Spending more time counting assumptions than testing | The point is prioritization, not precision; rough count is enough |
FAQ
What does the thinking-occams-razor skill do?
Use when multiple causes could explain a bug — test the fewest-assumption hypothesis first; escalate to complex only when evidence forces it. Skip the full procedure when one step resolves it.
How do I install thinking-occams-razor?
Run npx skills add https://github.com/tjboudreaux/cc-thinking-skills --skill thinking-occams-razor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/thinking-occams-razor/ (personal) or .claude/skills/thinking-occams-razor/ (project).
Which AI agents can use thinking-occams-razor?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is thinking-occams-razor safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains thinking-occams-razor?
It is published by tjboudreaux in tjboudreaux/cc-thinking-skills. It has 130 recorded installs.
More from tjboudreaux/cc-thinking-skills
thinking-first-principles
tjboudreaux/cc-thinking-skills
When a constraint is treated as fixed, separate physics from convention, keep only independently supported primitives, and rebuild the simplest solution that satisfies real constraints.
thinking-red-team
tjboudreaux/cc-thinking-skills
For authorized security review of code, auth, or APIs you control, model the attacker, map the attack surface, and report only findings with a reproducible exploit path and verified mitigation.
thinking-pre-mortem
tjboudreaux/cc-thinking-skills
Before committing to a plan or launch, assume it already failed and reason backward through concrete causes — convert failure paths into mitigations, gates, and stop checks.
thinking-theory-of-constraints
tjboudreaux/cc-thinking-skills
When throughput or latency is pipeline-limited, identify the single binding constraint and exploit, subordinate, elevate, then recheck—ignore non-constraints.
thinking-socratic
tjboudreaux/cc-thinking-skills
When a request is vague, assumption-laden, or "obvious," ask the few load-bearing questions that expose hidden requirements before building or committing.
thinking-opportunity-cost
tjboudreaux/cc-thinking-skills
Before committing scarce time, people, or money, name the best forgone use of those resources and the value delta of the chosen path versus that alternative.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work