/mini-harness:mh-eval [all | setup | run | measure | report | clean | status] [--questions <file>] [--model <alias>] [--effort <level>] [--chat continue|fresh|split] [--only Q1,Q2] [--out <dir>]from mini-harness
A/B benchmarks the mini-harness against itself using two disposable git worktrees (harness on/off), runs the same questions as headless Claude Code sessions, measures token/time with mh.sh usage, compares results, and generates a report with improvement suggestions. Invoked via /mh-eval or /mini-harness eval.
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: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Helper: py "${CLAUDE_SKILL_DIR}/mh_eval.py" <cmd> [options] (Codex: python3; the skill folder is .agents/skills/mh-eval standalone). Every artifact lands under <repo>/analysis/eval/<stamp>/: QUESTIONS.md, RUN.json, traj/q<NN>_{on,off}.{json,md}, usage_{on,off}.json, COMPARE.txt, METRICS.md, harness_traj/ (the ON arm's sealed records), repo_info_on/, REPORT.md. The two arms are git worktrees beside the repo, <repo>-eval-on and <repo>-eval-off, on throwaway branches; clean removes them. Nothing is committed.
--questions, the helper copies questions.example.md; better: write <out>/QUESTIONS.md first, ## Q<n> — <title> per question, 6–10 questions that mirror the repo's real work — at least one query, one debug, one update with a test, one check, one that names an external fact (so the researcher trigger can fire), one with a genuine design choice (so the diversifier can), and one deliberately routine edit (so the gate can skip). Questions about the harness itself bias every trigger to fire; prefer the repo's own domain. Say in the file which fix or rule each question is meant to exercise.setup — creates the arms from the current working tree (uncommitted changes and untracked files included), repairs symlink stubs on Windows, writes each arm's .claude/settings.json (route hook + effort), runs mh.sh on in the ON arm. Relay its summary; stop if a worktree failed.run — one headless session per arm per question (claude -p … --output-format json --dangerously-skip-permissions, cwd = the arm, the arms in parallel). --chat split (default) continues one session per arm for the first half and starts fresh for the second — the fresh half shows whether the ON arm's repo memory carries over. It is resumable: rerun run after an interruption and finished questions are skipped. Expect 5–60 minutes per question per arm; do nothing else in the repo meanwhile.measure — mh.sh usage --json --all per arm, then usage --compare (the pack's release criterion), METRICS.md, and copies of the ON arm's records and memory. The verdict line is the headline number.report — writes REPORT.md with the metrics, every pair's ## Run report, and six empty headings. Fill them yourself from traj/*.md, harness_traj/*.md, and METRICS.md:
METRICS.md and COMPARE.txt: pooled ratio, per-pair ratio, where the ON arm's extra cost went (advisor spawns vs main-thread context vs bookkeeping calls). Name the outliers and why.git -C <arm> diff --stat, run a test file) before trusting a report.harness_traj/*.md: dispositions that changed the outcome, idle waits, spawns that returned nothing), then list suggestions the numbers support — gate triggers that never discriminated, budget overruns, memory lines never read back, record lines never filled.clean unless the user wants the arms kept for porting fixes (say where they are).eval inside another request, and never on a repo with uncommitted work you cannot afford to snapshot: setup copies the working tree, it does not stash it..harness/ is untouched. Fixes worth keeping are ported by hand from an arm, never by merging its branch blindly.mh.sh usage counts what the transcripts hold: a session resumed after a long gap reports wall-clock across the gap; sub-agents spawned by the arms count toward their arm.is_error in the JSON) as a result, not as a missing sample.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
benchmark, a-b-testing, harness-evaluation, headless-claude, worktree
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./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"./mh-initmini-harness · initialize or re-initialize a repo's memory under .harness/repo_info/ with a multi-agent pass — three-perspective codebase overview, ranked scripts map, issue scan, git-seeded update log — validated by an isolated verifier; workers' model and effort are selectable per run. Re-runs validate and diff-update existing memory instead of regenerating. Use only when the user invokes it (/mh-init · $mh-init · /mini-harness init)./mh-loopmini-harness · repeat a pass toward a verifiable goal until a check passes or a safety stop fires — spec → validate → confirm → loop (pass · observe · exit check · ledger) → review → record. Each pass runs the way the platform normally would; the loop adds the objective, the evidence rule, the caps, and resume state. Use only when the user invokes it (/mh-loop · $mh-loop · /mini-harness loop).npx claudepluginhub hangyu8123/mini-harness --plugin mini-harnessOther plugins' skills for the same job