simplify
/simplify
Take a code surface — by default the current branch's diff against main — and reduce its complexity. Survey smells without fixing first; triage by impact × cost; apply structural changes (tidyings, in Beck's terminology) one per commit with tests staying green throughout. Default to deletion when in doubt: an inlined function call is almost always simpler than the extracted one. The opinionated canon driving the skill is grounded in .research/code-simplification.md, which surveys Ousterhout, Fowler, Beck, Metz alongside the dissenting voices (Muratori, Acton, Blow).
When to use
- User says "/simplify", "tidy this", "refactor this", "this is overengineered", "make this simpler", "too much abstraction".
- A surface has obvious smells: factory with one product, interface with one implementation, config knob with one caller, deeply nested control flow, methods over ~30 lines, wide parameter lists.
- The user wants Clean Code rules applied — push back gently and use this skill instead, which balances Martin's canon with Ousterhout/Muratori dissent.
When NOT to use
- The user wants alignment with project conventions or industry standards (adding tests, types, fixing naming, replacing broad excepts) rather than complexity reduction. →
/best-practice. - The code is performant-but-ugly and the goal is performance, not maintainability. Performance is a different optimization target with different rules.
- The user wants to add features. Don't sneak refactors into feature work; they belong in their own commits.
- The surface has no tests and you can't establish behavior on demand. Add characterization tests first (Feathers) — without them, a "tidying" can silently change behavior.
Hard rules
More from patrickruddiman/skills
spec
Write a detailed, objective specification of WHAT a system does and WHY. No code, no file paths, no library picks, no implementation prescriptions of any kind. The spec is read by an AI coding agent that will produce its own plan; the spec exists to bound the problem completely — every user-visible behavior, persona task, lifecycle transition, and failure mode.
11slice
Produce a scoped design doc for one technical vertical of a parent spec. Researches the existing codebase first, surfaces implementation choices as questions one at a time, and only drafts the doc after the user resolves them. No code, no tasks — design only.
10create-tasks
Break a slice into AI-executable task files. Each task has a checkbox Tasks section (file paths, line numbers, technical detail — no code) and a strictly code-verifiable Acceptance criteria section that always includes a test command. The consuming AI must tick checkboxes as it works; create-tasks uses that to decide whether to edit a task in place on re-run or append a new one.
10hunt
Aggressively debug, diagnose, or root-cause an issue. Drives a disciplined hunt — query telemetry, reproduce, bisect, instrument, hypothesize-test-confirm, and verify causation by reverting the fix. Refuses common anti-patterns (fix-without-repro, symptom suppression, multi-variable changes, theorize-without-running). Use when the user types /hunt or asks to debug, diagnose, root-cause, track down, or figure out a bug, crash, regression, flaky test, or unexplained behavior.
8worktree
Create or enter a git worktree for the current repo. New worktrees are named repo-<slug>, placed as a sibling of the repo root, and check out a branch (existing or new). Use when the user says "/worktree", "spin up a worktree", "branch off into a worktree", "hop into worktree X", or wants to work on a separate branch in parallel without disturbing the current checkout.
7schedule
Schedule a task (Windows/Linux/macOS) to run once or on a recurring trigger — at a specific time, after a delay, daily/weekly, or every N minutes/hours. Use when the user says "schedule", "/schedule", "in N minutes/seconds run", "at HH:MM run", "every day at HH:MM", "every N minutes", "remind me to run", "queue this for later", or wants a task to fire reliably while they step away.
7