agent-skills / evals
CLAUDE.md2 starsChanged 2 months agoMITView on GitHub
This file provides guidance when working in the evals/ directory. It auto-loads in Claude Code when you read or edit files here.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- specs/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- js-depsSkill
- learnSkill
- peer-reviewSkill
- pr-commentsSkill
- pr-human-guideSkill
- ship-itSkill
- uv-depsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
Two-turn evals via
followup_prompt: if an eval has this field, tell the executor subagent to issue it as a second user message after …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Evals
This file provides guidance when working in the evals/ directory. It auto-loads in Claude Code when you read or edit files here.
Evals and Benchmarking
- Each skill with an
evals/directory should have a correspondingevals/<skill-name>/benchmark.json. - After running evals for a skill, always update
evals/<skill-name>/benchmark.jsonwith the new results. Do not leave stale benchmark data. benchmark.jsonrun entries are the authoritative source for pass rates —benchmark.mdprose sections can silently fall behind. When a spec or review cites a baseline percentage, always verify it from thepass_ratefield inbenchmark.json'srunsarray, not from the prose description.- The benchmark.json format mirrors
evals/ship-it/benchmark.json: ametadatablock, arunsarray (one entry per eval × configuration), and arun_summarywith mean/stddev/min/max stats plus adeltasection comparingwith_skillvswithout_skill. The top-levelnotesarray belongs at the root of the file, not insidemetadata— place it between the closing}ofmetadataand the opening[ofruns. - Eval
evidencestrings must be repo-relative — no absolute/Users/...paths inbenchmark.jsonorgrading-*.json. grading.jsonmust include asummaryblock oraggregate_benchmark.pywill report 0% for all runs even when expectations pass. Required shape:{"summary": {"passed": N, "failed": N, "total": N, "pass_rate": 0.N}, "expectations": [{"text": "...", "passed": true, "evidence": "..."}]}. Theexpectationsfield names must be exactlytext,passed, andevidence— the eval viewer depends on them.- After updating benchmark.json, immediately update the
Eval Δcolumn in theREADME.mdAvailable Skills table to reflect the new pass-rate delta (e.g.+62%). Do not finish the task or open a PR without doing this. Also check the PR description — if it mentions the old delta percentage, update it to match. Also update thebenchmark.mdSummary table — its±stat values mirrorbenchmark.json'srun_summaryand are not auto-generated; they drift silently whenrun_summaryis corrected. Also update theEval costbullet in the skill's Skill Notes section inREADME.md— it contains the delta percentage and discriminating eval count and does not auto-update. - When adding a new skill to README.md, add an Eval cost bullet to its Skill Notes section:
- **Eval cost**: +X seconds, +N tokens over baseline ([details](evals/<skill>/benchmark.md)). Spell out "seconds" (not "s"). If time/token stats are sparse (e.g. most runs use simulated transcripts), add a caveat. Source values from the Summary table in the skill'sbenchmark.md. - Spawn eval subagents with
mode: "auto"to suppress per-tool approval prompts. Default permission mode causes interruptions that slow down parallel eval runs and can break the workflow. - After creating a PR, check which skills were modified and whether the changes affect eval-relevant behavior (workflow steps, decision logic, command sequences, assertion-tested output). If so, recommend the user run evals for those skills before merging. If the changes are documentation-only, cosmetic, or don't affect behavior tested by evals (e.g. adding notes, security guidance, or comments), note that re-running evals is not needed and explain why.
eval_namemust be present for ALL runs inbenchmark.json, not just newly added ones. When adding runs for new evals, backfilleval_namefor any existing runs that lack it — a partial population breaks schema uniformity with the ship-it format.- Use
null(not0or0.0) inbenchmark.jsonfor unrecorded run stats:tokens: nullwhen token count wasn't recorded andtime_seconds: nullwhen elapsed time wasn't recorded. Those fields currently feedrun_summary, so0and0.0would be treated as measured zeros and skew mean/stddev aggregates. Treattool_callsanderrorsas optional per-run metadata: usetool_calls: nullorerrors: nullonly when those counts are truly unknown or weren't observed, and keep0when zero was actually measured. When updating or adding runs, backfill any existingtokens: 0,time_seconds: 0.0,tool_calls: 0, orerrors: 0entries tonullonly when they represent unknown measurements rather than observed zero values. - When adding new runs or re-running existing evals in benchmark.json, also update
metadata.evals_run(append any new eval ID) andmetadata.skill_versionto match the current skill version — easy to miss when adding a single targeted eval or updating existing run entries rather than re-running the full suite. Exception: for validation-only runs (e.g. full-suite regression checks before/after a refactor), do not record new run entries and do not updatemetadata.skill_version— the version should reflect the skill version under which actual run entries were produced. If all recorded runs are from v1.X but the skill advances to v1.Y without new runs, keepskill_versionat"1.X"and add a prose note inbenchmark.mdexplaining the validation history. - When prompting the grader subagent, pass the full assertion text strings from
evals.jsonexplicitly in the prompt — otherwise the grader uses assertion IDs as thetextfield ingrading.json(e.g."skips-previously-replied-thread"instead of the full sentence), which breaks alignment with the eval viewer. Do not pass assertion text to the executor subagent (see the executor bullet below) — it contaminates baseline behavior. - Non-discriminating evals (both configurations score 100%) are expected when the scenario makes the correct behavior explicit enough for the baseline to handle it. Document them with a note in
benchmark.json— they establish a baseline but don't contribute to the delta. Evals with a partial delta (e.g. 80% without-skill) are nearly non-discriminating — do not group them with fully non-discriminating evals; the distinction affects both the problem-statement percentage and the discriminating-evals count in the impact table. - Before proposing to add an assertion to an eval, check whether it already exists:
rg '"id":.*<keyword>' evals/<skill>/evals.json. A proposed assertion that duplicates an existing one produces a no-op task and inflates the spec scope. - When adding supplementary regression runs (run_number > 1 for specific evals): add a
regression_run_evalsfield tometadatalisting which eval IDs have supplementary runs, scope token stats notes to "primary (run_number=1) runs", and updatebenchmark.mdaccordingly. Keepruns_per_configurationequal to the primary suite's value — do not bump it to the maxrun_number, which would misrepresent evals that only have one run. - For structural refactors that move logic to a reference file (no behavioral change), run only the evals that exercise the moved logic rather than the full suite. Get the old-skill baseline via
git show HEAD:skills/<name>/SKILL.md > "${TMPDIR:-/private/tmp}/<name>-snapshot.md". - When adding new evals to
evals.json, run them immediately — do not wait for the user to ask. Spawn with_skill and without_skill subagents, grade the results, and updatebenchmark.jsonas part of the same task. - When evals are listed in a spec's tasks.md or plan, run them without asking — inclusion in the plan/tasks constitutes prior approval. Do not prompt "should I run evals?" or wait for explicit instruction; proceed directly to spawning eval subagents, grading, and updating
benchmark.json. - When a grader flags a missing assertion, add it to
evals.jsonand re-grade the existing transcript — no need to re-spawn the executor if the transcript is detailed enough to provide evidence. - When changing pass/fail verdicts on existing benchmark expectations, re-run the eval rather than re-grading with hypothetical reasoning ("General assistant would..."). Hypothetical re-grades can describe fundamentally different behavior from what was originally observed and produce the right pass rate for the wrong reasons. The same requirement applies when adding a new assertion to an existing run entry — evidence must come from an observed transcript, not inferred reasoning (e.g. "baseline would naturally..."). Spawn a fresh executor run to get real evidence. Re-running is also required when an assertion's criterion is tightened (e.g., "first-line match" → "entire-response match"), not only when semantics invert — the agent's output under the tighter rule may actually differ.
run_summary.delta.pass_ratemust use 2-decimal precision (e.g.,"+0.68", not"+0.683"). All benchmark files in the repo use this format — extra decimals create inconsistency without adding information since the README percentage is already rounded.run_summary.deltavalues must be computed from exact (unrounded) run-data means, not from the roundedmeanfields stored inrun_summary. When stored means are rounded for display, the delta derived from them may differ from the exact delta by a rounding error (e.g., exact means 42.9625 and 45.625 give −2.6625 → "−2.7", while the rounded stored means 43.0 and 45.6 imply −2.6). When the stored means are rounded, add a sentence tobenchmark.mdafter the token-statistics sentence: "Summary-table Delta values are computed from unrounded means, so they may differ slightly from subtracting the displayed rounded means."- When a reviewer suggests specific computed values for
benchmark.json(mean, stddev, etc.), verify independently using the actual run data — the reviewer may have computed from a different dataset. Always recompute from therunsarray rather than copying a suggested number. - A convention inferred from sibling files may be drift — verify a reviewer's "other files do X" against the written rule (
pr-human-guide's benchmark violates theskill_versionrule it seems to demonstrate). run_summarystddev uses sample standard deviation (divide by N−1, not N). The repo convention, as seen inevals/js-deps/benchmark.json, is sample stddev. Population stddev (N denominator) systematically underestimates variance for small run counts (N=3 or N=4). Recompute from therunsarray — don't copy a suggested value.- When
benchmark.jsonrun entries haveexpectations: null, there is no stored per-assertion pass/fail data. Bot reviewers that claim specific assertions passed or failed are inferring from context — their claims can be wrong. Thenotesfield written at grading time is the only authoritative source for which assertions differentiated. Decline reviewer suggestions that contradictnotes. - When updating
pass_rate,passed,failed, ortotalin a benchmark.json run entry, also scan both the run-levelnotesarray and the top-levelnotesarray for matching prose counts (e.g. "3/5 (60%)") and update them. Numeric fields and prose strings drift independently — a correctpass_ratewith a stalenotesstring misleads reviewers. - When adding version-scoped notes to
benchmark.json's top-levelnotesarray, also audit older entries that reference the same eval IDs — they can describe behavior removed in an earlier version (e.g., "eval 2 differentiates via spec mode detection" surviving a spec-mode removal). Stale semantic descriptions contradict newer entries and mislead reviewers. Update or replace them in the same commit. - When renaming action labels or vocabulary in a SKILL.md, search the repo for the old term in
evals.jsonassertiontextfields,benchmark.jsonexpectationtextfields,expected_outputstrings, spec files, and all CLAUDE.md files (CLAUDE.md,evals/CLAUDE.md,skills/CLAUDE.md) — they don't auto-update. CLAUDE.md files often contain hardcoded step references (e.g. "Step 13 / Step 6c") that must be updated alongside the skill. This applies to any vocabulary change — not just action label renames. Mode/behavior terminology changes (e.g. renaming default mode semantics) also require propagation toevals.jsonexpected_outputandpromptstrings. - When renaming an eval's
namefield inevals.json, also updateeval_namein all matchingbenchmark.jsonrun entries, any prose mentions of the old name inbenchmark.jsonnotesstrings, and the correspondingbenchmark.mdsection header (e.g.### Eval N — \old-name``). - When renaming an assertion id in
evals.json, also update the assertiontextfield (not just theid) and replace the matching expectationtextstring in any existingbenchmark.jsonrun entries for that eval — in-place replacement, no new run needed. Exception: if the assertion's pass/fail semantics are inverted (not just renamed — e.g., flipping from "agent waits for confirmation" to "agent applies without confirmation"), the storedpassedandevidencevalues in benchmark.json are wrong under the new criterion and require a re-run, not just a text replacement. Check whether the existing evidence describes the opposite of what the new assertion expects. When semantics are inverted, null ALL result fields —pass_rate,passed,failed,time_seconds,tokens,tool_calls, anderrors— not justpass_rate/passed/failed. The measurement fields still feedrun_summaryaggregates even when pass/fail is null, making perf deltas misleading. After nulling, recomputerun_summaryexcluding those runs from all stat calculations, then updatebenchmark.mdSummary table and README Eval Δ. - When a run is excluded from both sides of the paired comparison (e.g. contaminated), null all result fields in BOTH the
with_skillandwithout_skillentries — not just the contaminated side. Leaving one side non-null makes the documented paired-eval count (e.g. "27 paired evals") inconsistent with what mechanical consumers derive from filtering non-null entries. When nulling result fields, also null thepassedandevidencefields in the run'sexpectationsarray — leaving verdicts set while results are null implies the grading is valid when it is not. - When a benchmark.json run entry has null result fields, the corresponding
benchmark.mdtable row must showN/A | — | —in the Pass rate, Passed, and Failed columns — not the original computed values. - When adding new evals, also update the token count denominator in
benchmark.md— the sentence beginning "Token statistics are computed only over..." contains "N of M" counts referencing the total primary runs per configuration; update M to the new total eval count and the combined count to 2×M. Also check thatbenchmark.mdhas a per-eval section for every eval inbenchmark.json— sections for new evals must be added, and any existing evals that lack sections should be backfilled at the same time (sections can silently fall behindbenchmark.jsonwhen evals are added without updating the doc). - Before adding evals for a new mode or behavior, scan existing eval assertions for ones that encode the opposite behavior — e.g., if adding evals that assert auto-mode skips confirmation, check whether any existing eval asserts the agent waits for confirmation. Contradictions must be resolved first (assertion renamed or split into mode-specific evals), or the suite will silently contain conflicting expectations that both pass individually but encode contradictory requirements.
- For conditional rules (if X → do A; if not X → do B), add an eval for each branch — they discriminate on different failure modes. A single eval would not catch both.
- When specifying discrimination acceptance criteria for new evals, require that each new eval has at least one failing assertion without_skill — not just "some discriminate." "Some discriminate" passes if one eval discriminates and the rest don't; per-eval discrimination is the correct bar.
- Eval assertions must test user-facing output, not internal signals: if a skill uses an internal return value from a subagent (e.g.
NO FINDINGS) and translates it to user-visible text (e.g.'No issues found.'), the assertion must test the user-visible string — not the internal signal. An assertion testing the internal signal will never catch regressions in the translation/presentation layer. - In multi-model benchmarks, literal-string assertions penalize paraphrase-prone models even when behavior is correct (e.g. Opus 4.7 paraphrased "no findings" rather than the literal
"No issues found."oncopilot-empty-findings). Prefer semantic-equivalence checks. - Fixture-based eval prompts must embed the fixture in the
promptfield, notexpected_output:expected_outputis prose describing the expected grading outcome for the eval runner — it is not readable by the executor. Putting fixture CLI/tool responses inexpected_outputwould confuse the executor about what to output, or cause the grader to treat fixture data as the expected result. - Eval prompts must not name the skill or say "the user has invoked the X skill" — skill-name leakage in the prompt context reaches the baseline agent, causing it to follow the skill's output format without needing the skill. All evals become non-discriminating and the delta collapses to 0%. Write prompts as natural user requests that don't reference the skill by name (e.g. "Can you add a review guide to PR #42?" not "The user has invoked the pr-human-guide skill on PR #42").
- Subagent-based eval execution: spawn the executor subagent with
mode: "auto". Prompt the executor tomktemp -da workspace under${TMPDIR:-/private/tmp}, Write fixtures there,cdin, and forbid reads outside the workspace (includingskills/<name>/SKILL.mdonwithout_skillruns). Pass the executor only the eval prompt and fixture/setup instructions — never assertion text. Assertions live with the grader subagent (see the grader-prompting bullet above), which evaluates the transcript and writesgrading.json. - Fence the executor out of
evals/explicitly — a recursivegrep/rgacross the repo can return the eval's ownexpected_outputand assertion text, silently contaminating the run. Scope the executor's searches to the skill directory, and audit each transcript forevals/-touching tool calls before trusting its results. - Two-turn evals via
followup_prompt: if an eval has this field, tell the executor subagent to issue it as a second user message after turn-1 completes and return bothSUMMARY_TURN1/SUMMARY_TURN2. Runners silently skip the follow-up otherwise. - When a reviewer flags one per-model
benchmark.jsonentry,rgfor the stale substring before committing — the same fix usually applies to other models/runs of the same eval. - Eval executor subagents must NOT call Claude Code's
Skilltool — bothwith_skillandwithout_skill. Forwith_skill, the executor must follow SKILL.md directly (read it and act); callingSkilldelegates to a fresh sub-instance instead, which is not what's being measured. Forwithout_skill, prohibiting SKILL.md reads alone is insufficient — the agent can still register-and-invoke the skill via theSkilltool, contaminating the baseline. Phrase the agent prompt as: "Do NOT call theSkilltool. Forwith_skill, do the work yourself by reading SKILL.md." Detection signature:TOOLS_USED: Other: Skill (...). - Per-run
tokensin benchmark.json =input_tokens + output_tokenssummed across assistant turns (matcheslearn/pr-comments/peer-review). Track cache tokens in a separatecache_tokensfield — they bill at 0.1× (reads) and 1.25–2× (creation), and folding them in inflates the headline 50–100× without proportional cost. - Validate expectation key schema after grading:
jq '[.runs[] | .expectations[] | select((. | keys) != ["evidence","passed","text"])] | length'must return0. Graders drift from{text, passed, evidence}despite explicit prompts — common drifts:description/assertioninstead oftext, strayid/nfields. - Use
evals/scripts/extract_subagent_usage.pyto backfill per-run usage from subagent JSONL transcripts — implements thetokens(input + output) /cache_tokens(creation + reads) split and emits per-agent JSON. Don't roll your own parser. - Before committing a new category of artifact in
evals/(transcripts, scratch scripts, intermediate JSON), survey what parallel skills commit —ls evals/*/. If no other skill keeps that artifact, don't be the first. Fix "dangling reference" findings by removing the reference, not committing the file. - All
run_summary.deltavalues are signed strings ("+0.31","+835") — not numbers. Applies topass_rate/time_seconds/tokens/cache_tokens. Storing as numbers breaks consumers that expect the documented schema. - Commit grading json selectively; don't commit raw transcripts. Other skills (
learn/peer-review/ship-it) commit onlyevals.json+benchmark.{json,md}+fixtures/.pr-commentsadds selectivegrading-eval{N}-{config}.jsonfiles only where graders made judgment calls — not the full set. Transcript content goes inline as quotedevidenceinbenchmark.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

