meta-harness
БесплатноЗапускает вложенные скриптыНе проверенRun a Meta-Harness-style optimization loop NATIVELY — automatically search over the scaffolding around a FIXED base model (memory, retrieval, context…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
Meta-Harness (native)
What this is
Meta-Harness optimizes the harness, not the model. The harness is the code around a fixed base model that decides what to store, retrieve, compress, and show while the model works. You hold the model frozen and search over that scaffolding: propose candidate variants, score each on a cheap deterministic eval, keep a Pareto frontier (quality up, cost down), and iterate. The proposer is an LLM agent writing code; the inner loop is a cheap scorer.
The Stanford repo (stanford-iris-lab/meta-harness) ships a Python driver —
claude_wrapper.py (~720 lines) + meta_harness.py (~540 lines) — that reimplements an
agent runtime to drive a headless Claude: spawn a session, parse stream-json, track tool
calls, log everything, loop. You already are that runtime. So you run the same loop with
native tools (Agent, Workflow, /loop) and keep only the irreducible domain logic — a $0
scorer. The orchestration was never the hard part; your harness provides it.
This skill is the method, reusable for any harness-optimization task. A fully worked
example (optimizing proteus's campaign-memory summarizer) lives at ~/mh-proteus/ and is
walked through in references/proteus-example.md.
When to use this
Strong fit when several of these hold (full criteria in references/method.md):
- The base model is fixed and the opportunity is better retrieval / memory / context / prompting / tool scaffolding. (This is the whole premise — if the gain must come from the model weights, this is the wrong tool: do RL/fine-tuning instead.)
- There are repeated episodes / tasks, not a one-off.
- There is a cheap, deterministic eval with a real success signal — or you can build one.
- The search set is large enough to expose failure modes, small enough to iterate.
- There are recurring error patterns a harness could fix systematically.
Poor fit: no stable eval loop, or purely subjective quality with no measurable criterion.
The loop (mental model)
seed frontier with the incumbent harness (the thing to beat)
repeat until budget/convergence:
PROPOSE k candidate harness variants (proposer agents write code)
VALIDATE each imports / type-checks (cheap reject of broken candidates)
SCORE each on the held-out-protected eval set ($0 deterministic scorer)
FRONTIER Pareto-merge (quality up, cost down), floor-respecting
FINAL: score the frontier once on the untouched TEST split
The proposer is the mutation+crossover operator. The frontier is the persistent search memory. The held-out test split is touched exactly once, at the end — never during the search.
The five things YOU supply (everything else is native)
The orchestration is native; the domain is yours. Build these five — templates in assets/,
how-to in references/building-blocks.md:
- Candidate interface — one clean, swappable boundary (an ABC / Protocol). A candidate is a
drop-in implementation. If your harness logic is tangled into one big function, extract the
boundary first. →
assets/candidate_base-template.py - A $0 deterministic scorer + rubric — the inner loop. It must vary with the candidate
(see the frozen-replay trap below) and run with no LLM / no network so you can call it
hundreds of times for free. →
assets/scorer-template.py - An eval corpus with a held-out split — the tasks/records candidates are graded on, split so the test set shares no leaky structure with the search set.
- A proposer prior — a short mini-SKILL the proposer agents load that steers them toward
mechanism-level changes (not constant-tuning) and enforces anti-leakage.
→
assets/proposer-prior-template.md - A frontier + run log — the state carried across iterations (a JSON/JSONL pair, or just
workflow variables). →
scripts/pareto.pycomputes the frontier deterministically.
Non-negotiable guardrails — read before you run
These are where naive harness searches silently fail. Full treatment in references/method.md.
- The frozen-replay defect (the #1 trap). If your eval replays cached outputs (a recorded run, a frozen trace), then a scaffolding candidate cannot change the recorded result — only the cost axis moves. A naive Pareto search then "wins" by emptying the context while the frozen quality score never drops, producing a confident, meaningless frontier. Fix: grade a quantity that genuinely varies with the candidate (retrieval relevance, compression fidelity, decision counterfactuals), and/or run quality as a one-sided do-no-harm floor rather than a maximize axis.
- Held-out discipline. The proposer must see only the search-set results and the frontier — never the test split. Score test once, at the end.
- Anti-Goodhart floor. The proposer is the most capable optimizer you have; it will exploit a soft metric. Put a hard floor on quality (and
Установить meta-harness в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл meta-harness?
Run a Meta-Harness-style optimization loop NATIVELY — automatically search over the scaffolding around a FIXED base model (memory, retrieval, context construction, prompt templates, summarization, tool-selection logic) by proposing candidate variants, scoring each on a cheap deterministic eval, and keeping a Pareto frontier of quality vs cost — using native Agent / Workflow / loop tools instead of a standalone Python harness. Use this whenever the user wants to optimize, evolve, tune, distill, or search over a harness, scaffold, prompt system, memory or retrieval policy, context-assembly code, or summarizer while keeping the model fixed; whenever they mention Meta-Harness, harness optimization, scaffold evolution, automatic prompt/memory optimization, an evolutionary or Pareto search over candidate implementations, or "make the harness/agent better without retraining"; and whenever the gain must come from the code AROUND the model rather than the model weights. Reproduces the Meta-Harness paper's method natively, with no claude_wrapper.py and no metered solver API.
Как установить скилл meta-harness?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл meta-harness запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic