Skip to main content
skill CX Codex

harness-experiment — Claude Code skill: what it does, how to install

Harness-experiment is a Claude Code skill that runs controlled experiments to validate agent scaffolding changes. It triggers when adjusting prompts, tools, or subagent layouts for performance tracking.

MIT ★ 741 updated 2026-11-11

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add MiniMax-AI/mcode-stack
/plugin install ronny@mcode-stack
Open on GitHub

What harness-experiment does

This utility enforces a rigorous testing cycle for agent development by isolating single changes and comparing baseline metrics against post-change results. It evaluates pass rates, request counts, token usage, and cache hit rates to identify regressions that aggregate averages often mask.

The framework requires pinning model versions and repository states to ensure consistency across repeated runs. Users must define a hypothesis and select a set of golden tasks that the agent did not generate itself to maintain objective evaluation standards.

Every experiment concludes with a summary record documenting the specific change and its impact on task trajectories. Without a recorded decision to keep, revert, or iterate, the experiment remains incomplete.

What it helps with

  • measure impact of prompt modifications
  • compare token consumption before and after changes
  • evaluate success rate per task
  • detect regressions after model upgrades

Example prompts for the agent

  • Run harness-experiment to evaluate changes to system_prompt
  • Perform harness-experiment after adding a new tool
  • Compare current agent performance using harness-experiment

How to install harness-experiment

1Plugin marketplace

/plugin marketplace add MiniMax-AI/mcode-stack
/plugin install ronny@mcode-stack

This installs the whole ronny plugin with all its skills

2Skills CLI (Vercel)

npx skills add MiniMax-AI/mcode-stack --skill harness-experiment -a claude-code

3Manually: put the files in place

~/.claude/skills/harness-experiment/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/harness-experiment/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about harness-experiment

How to install harness-experiment in Claude Code?

Run /plugin marketplace add MiniMax-AI/mcode-stack followed by /plugin install ronny@mcode-stack.

What does harness-experiment do?

It structures the agent development process into controlled experiments, measuring how specific changes affect task outcomes, token usage, and latency.

What is required to use harness-experiment?

You need a set of golden end-to-end evaluation tasks that were not written by the agent being tested.

Source text

SKILL.md · MIT
---
name: harness-experiment
description: Run a harness change as a controlled experiment, with a small end-to-end eval, one change at a time, repeated runs, and looking at flipped tasks, request count, tokens and cache hits, not just the average score. Use before and after changing prompts, tools, skills, subagent layout, compaction or other agent scaffolding, or when asked whether a change helped.
---

# Harness Experiment

Harness engineering moves forward by experiment. The principle:
**measure first, change one thing at a time, keep what survives testing.**

Companion to MCode Engineering Notes 01, 02 and 05.

## 1. Before changing anything

1. **State the hypothesis** in one sentence: what you change, what you expect
   to improve, and what might get worse.
2. **Pick or build a small end-to-end eval.** A handful of golden tasks is
   enough to start. Include tasks for every chain the agent runs in production
   and every rule it must not break. The checks must not be written by the
   agent under test; tests an agent writes for itself share its blind spots.
3. **Pin everything else.** Same model version, same settings, same tool set,
   same repository state. If the model itself changes, treat that upgrade as
   the one change and rerun the same eval.
4. **Record a baseline.** Run each task several times; agent runs are noisy and
   one run can hide a failure.

## 2. Make exactly one change

One prompt edit, one tool moved, one subagent merged, one threshold changed.
If you need several, run several experiments.

## 3. Measure the same things on both sides

For baseline and candidate, record:

| Metric | Why |
| --- | --- |
| Pass rate per task (over repeated runs) | Quality, with noise visible |
| Flipped tasks (pass to fail, fail to pass) | Averages hide regressions |
| Model requests per task | Many wins come from fewer round trips |
| Input and output tokens | Cost and context pressure |
| Cache hit rate | A change can save tokens but break caching |
| Wall-clock time | Latency the user feels |

Only report numbers you actually measured, with run counts.

## 4. Read the result

- Open every flipped task and read the trajectory, not just the final answer
  (see `trajectory-review`). Find out why it flipped.
- A change that keeps the score flat but cuts requests or tokens can be a win.
  A change that raises the average while breaking a must-not-break rule is not.
- If the evidence is mixed, keep the simpler version.
- Write the result down: hypothesis, change, numbers, flipped tasks, decision.
  Next to the code (a PR description or an experiments log) is best.

## 5. Re-check after model upgrades

Scaffolding built around a model's weak spots ages fastest. After each model
upgrade, rerun the eval and ask which parts of the harness still earn their
keep.

## Output

A short experiment record: hypothesis, the single change, eval set and run
count, the metric table for baseline and candidate, flipped tasks with causes,
and the decision (keep / revert / iterate).

© Ronny (MiniMax Code team) · MIT · MiniMax-AI/mcode-stack

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set27

The whole set →
handoff-doc handoff-doc is a Claude Code skill that writes a structured handover file before a session reset or task switch. It preserves critical context without relying on full chat history. CX Codex +1 ★ 741repo stars review-capacity-check review-capacity-check is a Claude Code skill that checks unfinished agent work before another launch. It runs before parallel batches and during weekly reviews. CX Codex +1 ★ 741repo stars taste-to-checks taste-to-checks is a Claude Code skill that turns repeated review fixes into tests, lint rules, hooks, CI steps, or project rules. It activates after the same miss returns. CX Codex +1 ★ 741repo stars trajectory-review trajectory-review is a Claude Code skill that examines an agent’s path to a result. It runs after a task or eval finishes, fails, or changes outcome. CX Codex +1 ★ 741repo stars independent-review independent-review is a Claude Code skill that reviews changes from a clean context before merge. It compares the diff with the requirement and test output. CX Codex +1 ★ 741repo stars agent-brief The agent-brief skill for Claude Code structures task delegation to AI agents. It forces clarity on stakes, hypotheses, and verification criteria before an agent starts working. CX Codex +1 ★ 741repo stars evidence-first-review evidence-first-review is a Claude Code skill that audits an agent’s finished work from command logs and test evidence. It runs before a PR merge or an analysis is accepted. CX Codex +1 ★ 741repo stars pr-description pr-description is a Claude Code skill that drafts and verifies pull request descriptions for GitHub and GitLab. It runs when opening a PR or when MCode Review reports missing sections. CX Codex +1 ★ 741repo stars

Project sponsors

Companies that keep this analytics open