Systematically simplifies implementations by removing redundant guards, derived state, dead branches, excessive synchronization, duplicate helpers, and premature abstractions. Uses statechart and spock for subtractive verification before editing code.
Ships in implementation-simplification. 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.
Read when SKILL.md points to them.
Complexity often accumulates defensively: a guard added after an incident, a shadow boolean tracking what a primary collection already records, a wrapper preserving an obsolete abstraction, or an extra lock added out of caution. Subtractive simplification eliminates machinery that no longer earns its keep — and proves with statechart and spock that removing it cannot violate intended behavior.
Ask before keeping machinery: What breaks if this guard, state variable, lock, branch, or wrapper is deleted — and can we prove it with
statechartandspock?
statechart + spock Default (Level 2–3): Whenever deletion candidates touch mutable or derived state, defensive guards, locks/coordination, retry/recovery logic, intermediate lifecycle phases, or cross-module contracts, actively apply statechart (to discover redundant guards via Assume_* sensitivity, unreachable states, and collapsible transitions) and spock (for guard-implication proofs, unbounded safety invariants, behavioral refinement, liveness, and runtime trace conformance).abstraction-discovery.| Reference | Read when you need |
|---|---|
| references/simplification-catalog.md | 11 complexity signals → concrete deletions/consolidations paired with deletion hazards and the Anti-False-Simplification Filter |
| references/subtractive-verification.md | Using statechart (Assume_*, --witness) to find deletion candidates, Spock's 3-Part Redundancy Proof, 4-outcome CTI triage, machine-int bounds, negative controls, and conformance binding |
| references/evaluation-and-handoff.md | Before/After Simplification Scorecard, Deletion Ledger template, 3-Tier Guarantee Ledger, Stage 4 hand-off checklist, and reusable prompt |
| references/examples/redundant_guards/README.md | Runnable worked example (BeforeDispatch.tla → dispatch_contract.spock → dispatch_simplify.spock) proving 2 redundant guards + shadow state removable while catching unsafe deletion of a load-bearing guard |
(This skill's own 4-stage gated workflow is formally verified in the repo at notes/implementation-simplification/ via workflow.spock.)
statechart)abstraction-discovery.statechart: When code has state, concurrency, or multi-step transitions, write a faithful baseline TLA+ model in a scratch folder outside the repo and tag suspect defensive guards in positive guard position as Assume_* operators (Assume_GuardX == ...). Run statechart so:
Assume_* relaxation reruns flag guards whose removal breaks zero rules.--witness probes reveal dead branches and unnecessary intermediate states.Never blindly lock in bugs of the baseline code (statechart traces often expose defective defensive paths).
.spock spec main contract in Level 2–3), intentionally excluding internal shadow state and dead defensive branches.spock + statechart)A mutation surviving a finite run is never enough to justify deletion. Require the 3-Part Redundancy Proof (details and .spock templates in references/subtractive-verification.md):
statechart --witness or a spock reachability expect = invariant(...)), preventing vacuous passes on dead transitions.spock):
spock prove (relational EPR) or spock check --symbolic --depth N that reaching the site already implies the guard (at_site ==> guard_holds).const KEEP_X: Bool) and verify refines = [contract::main via State::as_contract] plus spock prove / --symbolic invariants.spock Int is mathematical unbounded Int).spock prove failures, triage all 4 CTI outcomes cleanly (reachable bug, reachable false inductive helper, bounded unresolved CTI, or genuinely unreachable CTI).Temporal liveness on finite models without symmetry (spock prove and --symbolic skip liveness and deadlock).Assume_* scope that the deleted guard does not protect an unmodeled external caller, FFI boundary, malformed deserialization, crash/restart, lock poisoning, or memory-ordering hazard.expect = invariant(...)). In default mode, present the scorecard, Deletion Ledger, and proof results, and wait for user approval before editing code.Carry out deletions incrementally once approved:
spock_trace with --require-all-actions --require-all-fields or everystate conform -trace) where applicable, and report the 3-Tier Guarantee Ledger.abstraction-discovery.Assume_* / --witness visualization: hand off to statechart..spock authoring, proofs, or runtime trace validation: hand off to spock.test-audit or test-sloc-cut.code-walkthrough.references/evaluation-and-handoff.md (opens in a new tab)references/examples/redundant_guards/BeforeDispatch.cfg (opens in a new tab)references/examples/redundant_guards/BeforeDispatch.tla (opens in a new tab)references/examples/redundant_guards/README.md (opens in a new tab)references/examples/redundant_guards/dispatch_contract.spock (opens in a new tab)references/examples/redundant_guards/dispatch_simplify.spock (opens in a new tab)references/examples/redundant_guards/view.py (opens in a new tab)references/simplification-catalog.md (opens in a new tab)references/subtractive-verification.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/implementation-simplification:implementation-simplificationfrom implementation-simplification
npx claudepluginhub dashed/claude-marketplace --plugin implementation-simplificationOther plugins' skills for the same job