/mini-harness:mh-loop goal: <one concrete sentence> | done when: <tool-based check> | body: <action | dispatch update|debug|exec|refactor> | max_iterations: 10 | no_progress_k: 3 | strategy: stable_advancing | exit_gater: onfrom mini-harness
Repeats a pass toward a verifiable goal until a check passes or a safety stop fires. Adds objective, evidence rule, caps, and resume state. Use via /mh-loop or /mini-harness loop.
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.
loop.instructions.md)Read .harness/harness.md once per session, then .harness/loop_control.md (progress accounting, verifier calibration, exploration, attribution, negative-result memory, scale-up, durable record) and .harness/stay_active.md (bounded waits). Plan-only when the request says so (plan only / dry run stops after stage 3). One todo per stage.
What the loop adds — and only that. An objective with tool-based checks, a baseline and noise floor, an OR-set of exit conditions with unconditional caps, a ledger that survives a context reset, and an independent exit check. Each pass runs as the platform normally would (harness.md §2): delegate when it would delegate, work directly when it would not; no controller/doer split is imposed. Native tools stay the native tools.
dispatch update|debug|exec|refactor — one request under the entry protocol with that task tag per pass; else decide it from the goal) · starting state (optional; default: current workspace).max_iterations: 10 · no_progress_k: 3 · strategy: stable_advancing | aggressive | fast_iteration · exit_gater: on | off · dials as in §11 (a loop enables the two fast advisors; research at auto requires external facts to verify).max_iterations cap and an unrecoverable blocker stop unconditionally); a cap stop is a stop, never goal-met.Read the named files (and persistent_issues.md §Refuted directions for a continuing campaign) → [repo context digest]. Parse the inputs into a draft [loop spec]:
| tail), pass = exit == 0 with a non-empty collected count; vacuous = failure; plus constraints that must not change.loop_control.md §Calibration).direction: minimize|maximize (+ target value when the goal is quantitative), cheap and hard to game.max_iterations · 4 no-progress (no new best for no_progress_k committed passes; an exploration episode defers it once) · 5 divergence (step worse than the floor twice) · optional human checkpoint before a named irreversible action.none allowed) · body (given, or decided now with a one-line rationale) · strategy copied verbatim.[PARALLEL] — the advisory pass for a loopGuardrail checklist: goal concrete · every criterion has a tool verifier · baseline captured · metric un-game-able · predicates boolean · body fits the goal · strategy fits the risk profile · verifier calibrated · resources declared. Enabled advisors run in one background batch with the separate advisory/research budgets and evidence boundaries from harness.md §5:
| Spawn | Dial · default | Task |
|---|---|---|
| devils-advocate | devils_advocate=on | Digest + [loop spec]. What makes this loop run forever or stop early; is the metric meaningful and un-game-able; are caps and baseline sane; flag destructive actions for a checkpoint → [spec critique]. |
| online-researcher | online_research=auto (externality) | Digest + [loop spec] + named external facts to verify. Check those facts and their implications for the criteria/verifiers → [research + verifier validation] with URLs. Local-only loops skip this advisor unless explicitly forced on. |
| diversifier | diversifier=on | Goal + invariants + context, without the proposed spec/body: alternative verification and search strategies → [diverse plans]. |
| The main agent folds returned items into the final [loop spec] and records dispositions in the trajectory, without asking the user to adjudicate. Resolve guardrail failures autonomously when possible; ask only when required information or native permission is missing. Reuse an advisory pass already completed for this request. |
Keep the [loop spec] (goal, body, pass, strategy, exit OR-set, caps, metric) in the loop record and proceed without a confirmation gate. Plan-only requests receive the spec and stop here.
Initialize the [loop ledger] and persist all loop state to a scratch file — baseline, best, previous_committed, counters, exploration state, noise floor, refuted list, verifier hashes and count, the [re-entry prompt] + resume-vs-replay marker (loop_control.md §Durable record) — so a fresh session can resume. Success criteria and exit conditions are frozen from here. If a check needs a script that does not exist, write it (natively) before pass 1.
Exit check. exit_gater=on (default): spawn a devils-advocate as the exit-gater holding the checks, the noise floor, the OR-set, and the exploration rules; the loop exits only when you and it agree (caps and blockers excepted); re-engage it at every exit check, re-spawn with the same info if it cannot persist. This is loop control — independent of the devils_advocate advisor dial. exit_gater=off: you apply the OR-set alone and record that.
For N = 1, 2, …:
.harness/harness.md with that task tag — advisors per this loop's dials, no separate record (the loop records once). At N == max_iterations wind down (no new fixes; document blockers; clean handoff). During an exploration episode the pass is a probe (cheap, single idea, own check). Stay engaged; bounded waits only (stay_active.md).raw_score, step_delta, best_delta (§Progress accounting). Probes: run only the probe's own check; best unchanged.completed: yes|no. Carry one lesson forward as a concrete next action. Refresh the re-entry prompt.Commit rule. A pass is committed once step 3 completed and its ledger entry is written; on a crash the next run re-runs the uncommitted pass — unless authoritative completion metadata for that same pass exists and its check passes, in which case accept it and commit normally (write-guard included).
[PARALLEL]Summarize from the ledger: goal met · which exit fired · net files changed · metric trajectory (baseline → final) · noteworthy · refuted. Only if some pass edited source: per dials run simplify / code_review (harness.md §11) on the net diff + spec + ledger; meanwhile write [direct review]. Reconcile, apply low-risk findings → [final report].
If repo state changed, refresh the overviews only where the loop made them wrong. update_logs.md line: - <YYYY-MM-DD> · loop · <goal in one sentence> · files: <net files> · functions: <net functions> (none when nothing changed). Refuted hypotheses (numbers + artifact paths) → persistent_issues.md under ## Refuted directions. Fill the trajectory created at run start: native path = passes run and the exit reason, metric trajectory baseline → final, advisors and exit-gater with items → adopted, harness effect. Seal with mh.sh traj complete <filename>. Consolidation remains on request (§8.6).
Final message in the i-have-adhd shape: passes, exit reason, net changes, trajectory, achieved; Next: = the verifier command. Keep operational status in the record; no routine task tag or footer.
| You are thinking… | Do instead |
|---|---|
| "The platform would delegate this pass, but I'll keep it in-context." | Run the pass the way the platform would — native first. |
| "Tests were edited but the count is the same." | Hash mismatch = gamed; reject and revert. |
| "We hit the cap but it's basically done." | Cap = stop, not goal-met; record remaining work. |
| "Same idea again, maybe it works now." | Only with new named evidence; read the refuted list. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 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./code-simplificationSimplify code for clarity while preserving exact behavior — reduce nesting, split long functions, remove redundancy and dead code, and fix unclear names. TRIGGER: invoked by a mini-harness skill's review stage when the dial `simplify=local` is set. Not a planning-time skill.npx claudepluginhub hangyu8123/mini-harness --plugin mini-harnessOther plugins' skills for the same job