/mini-harness:code-simplificationfrom mini-harness
Simplifies code diffs for clarity while preserving exact behavior: reduces nesting, splits long functions, removes redundancy/dead code, and fixes unclear names. Used by a mini-harness review stage when simplify=local is set.
Ships in mini-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The platform-independent alternative to Claude Code's native /simplify. An mh-* skill's review
stage spawns the implementer with this file when the dial simplify=local is set — see
.harness/harness.md §5 for how it is launched.
Distilled from addyosmani/agent-skills · code-simplification (MIT).
Make the diff you were handed easier to read without changing what it does, then apply
the edits to the working tree. This is the write step; the code_review pass that may follow
reads the resulting diff. Report what you changed under the output label [simplify].
Scope is binding, not advisory: simplify only the files in the diff you were handed. No
drive-by refactors of untouched code. Never commit, branch, or open a PR (.harness/harness.md
§1). Under the default autonomous gate (.harness/harness.md §2) do not ask
questions — choose the most reasonable reading, record it as a one-line assumption, proceed.
Your intake is what you were handed — the diff, plus the context in your prompt. That is
the whole default at every effort level; no tier reads more just to be thorough. Open a file,
or run git blame, only for a reason you can name:
Never read speculatively. If the question stays unanswered, skip that simplification: the cheap path is never allowed to become a behavior risk.
git blame when the reason isn't obvious and the answer decides the edit (§Intake). Still
can't answer? Don't simplify.if/else. Explicit beats compact whenever compact needs a mental pause.| Signal | Remedy |
|---|---|
| Nesting 3+ deep | Guard clauses / early returns; extract a helper |
| Function 50+ lines, multiple responsibilities | Split into focused, well-named functions |
| Nested ternaries, boolean flag params | if/else chain, lookup table, or separate functions |
| The same conditional repeated | Extract a named predicate |
Generic or misleading names (data, tmp, a get that mutates) | Rename to what it actually is/does |
| Comments restating the code | Delete — but keep every comment explaining why |
| 5+ duplicated lines | Extract a shared function |
| Dead code: unreachable branches, unused vars/imports, commented-out blocks | Remove once confirmed dead |
| Wrapper or pattern that adds no value (factory-for-a-factory) | Inline it; call the real thing |
Terse by construction — no preamble, no before/after code blocks, no summary of the diff the main agent already has.
api/auth.py:42 — nested ternary → if/else.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hangyu8123/mini-harness --plugin mini-harness9 skills in this plugin
/breakdown-prPlan and optionally execute a large pull request split into small stacked PRs. Use for PR breakdown, split PR, stacked PRs, branch decomposition, oversized diffs, gh-stack, Graphite, git range-diff, or PR too large./code-review-and-qualityMulti-axis, review-only code review of a diff across six axes — request achievement, correctness, readability/simplicity, architecture, security, and performance — with severity-labelled findings. TRIGGER: invoked by a mini-harness skill's review stage when the dial `code_review=local` is set. Not a planning-time skill./i-have-adhdShape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. Invoke with /i-have-adhd; stays on until "stop adhd mode".Other plugins' skills for the same job