evaluator-optimizer
Skill4 starsChanged 15 days agoMITView on GitHub
Run a maker≠checker evaluator-optimizer loop — a separate, skeptical, calibrated evaluator grades the maker's output each round and the loop repeats with feedback until a sprint-contract of hard-threshold criteria passes or an iteration cap is hit. Use when generating code/content/designs that need iterative refinement against clear criteria, when you want a second agent to catch what the maker talked itself into, or when building any verification loop. This is Anthropic's #1 stated harness lever (separating the doer from the judge). Trigger phrases: evaluator optimizer, maker checker, second-agent review, iterate until it passes, grade my output, refine with feedback, self-improving loop.
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
If quality is already fine first-try, or "good" is purely subjective, skip it — the loop just burns tokens.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Evaluator-Optimizer Loop
Anthropic's single strongest stated harness lever: "agents tend to respond by confidently praising
the work they've produced — even when, to a human observer, the quality is obviously mediocre.
Separating the agent doing the work from the agent judging it proves to be a strong lever." This
skill packages that loop, backed by the tested control logic in lib/eval_optimizer.py.
When to use it (Anthropic's two signs of fit)
- The output demonstrably improves when a human articulates feedback, AND
- an LLM can produce that feedback against clear criteria. If quality is already fine first-try, or "good" is purely subjective, skip it — the loop just burns tokens. (Building Effective Agents, 2024.)
The shape (4 moves)
- Agree a sprint-contract BEFORE work. A list of hard-threshold, testable "done" criteria
(Anthropic's 2026 harness used 27+). e.g.
["pytest -q exits 0", "no source file > 200 lines", "the /login route returns 200 for valid creds"]. This is what the checker grades against. - Maker generates against the task + contract (round 1) or task + contract + accumulated prior feedback (later rounds).
- A SEPARATE checker evaluates → returns
{status: PASS|NEEDS_IMPROVEMENT|FAIL, feedback}. The checker must be a different agent (different model AND independent context) — never the maker. - Loop on the feedback until
PASSor the iteration cap. Always cap (the cookbook loop omits the cap and spins forever —lib/eval_optimizer.pyenforces one).
Make the checker trustworthy (Anthropic eval discipline)
- Different model family + fresh context. Maker on Haiku 4.5 / Sonnet 5 (cheap); checker on Opus 4.8 / Fable 5 (strong). The checker must not inherit the maker's reasoning.
- Skeptical framing — its job is to find why the work fails, default to NEEDS_IMPROVEMENT when unsure; give it an explicit "Unknown / not enough info" escape so it can't hallucinate a PASS.
- Few-shot-calibrate it with 2–3 scored examples → aligns judgment, reduces drift across rounds.
- Drive the real artifact where possible (run the tests, hit the route via Playwright/Puppeteer MCP) — grade the running system, not a description of it. Grade outcome/final-state, not the path the maker took.
- Weight the dimensions the model is weak at (design, originality) higher than the ones it already nails (craft, functionality).
Wire real agents to the lib
lib/eval_optimizer.py::run_eval_optimizer(task, generate_fn, evaluate_fn, *, contract, max_iters,
maker_id, checker_id) is injectable control logic (mirrors autonomous_loop's dispatch_fn). It
enforces the two non-negotiables: maker ≠ checker (raises if same callable/id) and a hard cap.
Three ways to supply the two functions:
- In-session subagents (Agent tool):
generate_fncallsAgent(general-purpose, model=haiku, …)to produce the artifact;evaluate_fncallsAgent(code-reviewer, model=opus, …)with a rubric + the contract, parsing its{status, feedback}. Passmaker_id="haiku",checker_id="opus". - Headless workers: each fn shells
claude -p --model <m> --output-format json(the bespokeautonomous_loopdispatch pattern), maker cheap / checker strong. - Agent SDK: each fn is a
query()call with its ownallowed_tools/model; the checker gets read+exec tools to actually verify, the maker gets write tools.
Runnable example: examples/eo_with_claude.py — a working Haiku-maker / Opus-checker loop via
claude -p (python3 examples/eo_with_claude.py "<task>"). Its verdict parser is unit-tested in
tests/test_eo_parse_verdict.py, so the brittle read-the-checker's-reply step is pinned without spending tokens.
The return {status, result, iters, passed, trajectory, reason} — read trajectory (every
round's output + the checker's verdict) per Anthropic's "read the transcripts" discipline.
Guardrails
- Cap iterations (default 5; harness post used 5–15/feature). Each round costs maker+checker tokens
— the strong checker dominates cost, so cap it and gate multi-round on task value (see
loop-designer/references/economics.md). - The checker grading its own maker's work is the failure mode this whole pattern exists to prevent —
run_eval_optimizerrefuses to start if maker and checker aren't distinct. - Feed the loop's accept/reject outcome into the CAPC ledger (
probe_cost_per_accepted_change) so the cost-per-accepted-change of the loop is measured.
Companion: loop-designer (when/whether to loop at all), quality-gates (evidence-before-assertions),
plans/anthropic-loop-harness-playbook.md (the full Anthropic prescription this implements).
Other versions4 projects use a version of this.
Word for word · 1
- OpenxIntelligence/Coding-Agent-Skills★ 4100% same
Edited · 0
None found.
Wrote their own version · 3
- baekenough/oh-my-customcode★ 42same name
- flpbalada/fb-skills★ 8same name
- mnzralee/claude-multi-agent-architecture★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository169 other files it gives its agents.
- epub-skill/CLAUDE.mdCLAUDE.md
- linear-cli-skill/CLAUDE.mdCLAUDE.md
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- agent-evalSkill
- agentic-jujutsuSkill
- agile-product-ownerSkill
- ai-tool-pickerSkill
- algorithmic-artSkill
- api-connectorSkill
- api-design-patternsSkill
- architecture-diagram-creatorSkill
- article-extractorSkill
- aws-agentic-aiSkill
- aws-cdk-developmentSkill
- aws-cost-operationsSkill
- aws-serverless-edaSkill
- biogeobearsSkill
- brainstormingSkill
- brand-guidelinesSkill
- canvas-designSkill
- capa-officerSkill
- ceo-advisorSkill
- changelog-generatorSkill
- code-auditorSkill
- codebase-documenterSkill
- code-executionSkill
- code-explainerSkill
- code-refactorSkill
- code-reviewerSkill
- code-transferSkill
- content-creatorSkill
- content-research-writerSkill
- conversation-analyzerSkill
- csv-data-summarizerSkill
- cto-advisorSkill
- d3-vizSkill
- dashboard-creatorSkill
- defense-in-depthSkill
- deploy-itSkill
- developer-growth-analysisSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- docxSkill
- domain-name-brainstormerSkill
- dwa-councilSkill
- error-fixerSkill
- escalation-reasoningSkill
- executing-plansSkill
- extract-from-pdfsSkill
- fda-consultant-specialistSkill
- feature-planningSkill
- file-operationsSkill
- file-organizerSkill
- finishing-a-development-branchSkill
- firebase-buddySkill
- flowchart-creatorSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

