eval
Skill12 starsChanged 4 months agoMITView on GitHub
Measure whether a change to AI behavior actually improved things, the way a code change is measured: binary quality dimensions, a grid-sampled synthetic eval set with negative controls and a generated response side, a hand-labeled answer key, a judge written like code, then judge calibration with toolkit/calibrate.py (TP/TN/FP/FN counts, TPR, TNR, accuracy, precision, and a harsh/lenient bias reading) before gating on thresholds set before the run. Use when the user changed AI behavior (prompt wording, a skill description or body, an agent loop, a RAG pipeline) and needs to know whether it helped, or asks to "build an eval set", "calibrate a judge", or "evaluate the prompt". Not the harness command `claude plugin eval`, and not a substitute for ordinary code tests: those check deterministic code, this measures judgment behavior.
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
9
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 81
intent × persona × complexity: every cell that makes sense gets cases.
- Distinctive: line 148
Before trusting the judge at scale, measure the judge itself against the answer key.
- Distinctive: line 194
Keep two dashboards separate.
- Distinctive: line 208
When a gate fails, fix wording before structure: sharper label definitions, a better few-shot, a clearer boundary ruling.
- Distinctive: line 222
Never report accuracy alone.
- Distinctive: line 223
Never set or adjust thresholds after seeing the results.
- Distinctive: line 224
Never reuse eval cases as few-shot examples in the thing being graded.
- Distinctive: line 225
Never hard-code a fix for the one case you saw.
- Distinctive: line 227
Never let the judge see the human label, and never let the judge's own past output stand in for the answer key.
“Common” is measured: kept by at least 6 in 10 of the 31 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
Eval: measure AI behavior changes like code changes
A change to AI behavior (prompt wording, a skill's description or body, an agent loop, a RAG pipeline) is a code change with no compiler: without a measurement you cannot tell help from harm, and neither can a reviewer. This skill runs the loop Generate, Run, Evaluate, Analyze, Improve, repeated: evaluation is a cycle, not an event, and the goal is steady visible movement, not a perfect score in one pass. Measure before changing anything, or you cannot confirm the change helped.
The toolkit does the arithmetic. You, the agent, make the judgment calls: which dimensions matter, which grid cells to sample, what each label means, where the rubric wobbles, and whether a failure is a wording bug or a structure bug. Those calls are the skill; the script only keeps the numbers honest.
TOOLKIT below means the toolkit/ directory inside this skill's own
directory. The host prints that directory when the skill loads (Claude Code:
"Base directory for this skill: …"); use it. Do not derive it from $0:
in your shell that names the shell, not this file. Confirm the path before
running anything, so a wrong one fails loudly instead of phase 5 running
nothing:
TOOLKIT="<base directory for this skill>/toolkit"
# Fallback, only if the host printed no base directory. Never the shell's cwd:
# that would run whatever toolkit/ happens to sit there.
for d in "$TOOLKIT" "$HOME/.claude/skills/eval/toolkit"; do
[ -f "$d/calibrate.py" ] && { TOOLKIT="$d"; break; }
done
[ -f "$TOOLKIT/calibrate.py" ] || { echo "eval toolkit not found" >&2; exit 1; }Prerequisites
Python 3, standard library only. Nothing to install. The toolkit never calls a model: judging is the judge prompt's job, calibration is pure arithmetic.
Phases
1. Define "good" as binary dimensions.
Pick the dimensions the change is supposed to move (selection, safety, correctness, outcome) or the project's own, and define each one as a binary label: pass/fail, resolved/not-resolved. Graded scales multiply the disagreement surface before you can even measure it, so stay binary until the taxonomy is stable. Decide, in writing, which label is the positive class for reporting; FAIL is the usual choice when judging quality, because a false positive then means "the judge failed a run the human passed", which is the harsh direction. State the positive class next to every number you report: swapping it swaps TPR and TNR and changes what precision means.
2. Build the eval set on a declared grid, not at random.
Asking a model for "100 random questions" produces repetitive, obvious cases clustered around the easy middle. Sample on a deliberate grid instead:
- intent × persona × complexity: every cell that makes sense gets cases;
- negative controls are part of the plan, not an afterthought: requests that should not trigger the behavior, including near-miss neighbors;
- edge cases on purpose: ambiguity, misspellings, multi-turn context, adversarial inputs. Testing only typical inputs means production failures are discovered by users first;
- mix synthetic and real traffic where you have real traffic; synthetic data speeds iteration but must reflect the real distribution.
Generate the response side too: for each case, produce responses of each kind (complete, partial, workaround, escalation, vague/incorrect) so the judge is tested on every grade, not just the easy passes. Decide up front how workarounds, escalations and partial answers map onto the binary labels; a binary judge does not need a label per response type.
Two hygiene rules. Keep eval data unseen: never reuse evaluation cases as few-shot examples in the thing being graded, that is data leakage. And one observed failure is a class: when a case fails, generate more cases like it and fix the class, never a hard-coded fix for the one case you saw. Check the generated set before trusting it (quality, diversity, realism, coverage gaps); a judge calibrated on a narrow set is only calibrated for that narrow set.
3. Hand-label a representative subset: the answer key.
Label a representative subset of runs by hand. This subset is the ground truth every judge metric is computed against, so it must span the grid, including the awkward cells. Keep the labels binary per phase 1. After the judge runs, the calibration file is one pair per line, human first:
{"human": "FAIL", "judge": "PASS"}4. Write the judge like code.
The judge is a prompt with a job description, and it is writable, testable and improvable exactly like code:
- Exact label definitions. What counts as pass? Does pass require a complete fix, a workaround, or a correct escalation?
- Boundary cases decided in advance: the accurate-but-jargon-heavy answer, the correct redirect of an out-of-scope request, the partial resolution that needs one more user reply. Write the ruling into the rubric before running, not after seeing the judge wobble.
- Few-shot examples with reasoning: a positive, a negative, and why each is what it is. The reasoning is the part that transfers.
- Low temperature (≤ 0.2) so judgments repeat.
- Structured output: JSON with a label and a one-line reason, so grading is a parser, not a string hunt.
You grade whether the response resolved the user's issue.
Label definitions: PASS means ...; FAIL means ...
Boundary cases: a correct workaround is PASS; an accurate but jargon-heavy
answer is PASS; an out-of-scope request correctly redirected is PASS; ...
Example 1 (PASS, with reasoning): ...
Example 2 (FAIL, with reasoning): ...
User issue: {case}
Response: {response}
Answer with JSON only: {"label": "PASS"|"FAIL", "reason": "..."}5. Calibrate the judge with the toolkit.
Before trusting the judge at scale, measure the judge itself against the answer key. Run the judge over the labeled subset, write the human/judge pairs to a file (a two-column CSV, human first, also reads), then:
python3 "$TOOLKIT/calibrate.py" labels.jsonl # FAIL positive, the usual
python3 "$TOOLKIT/calibrate.py" labels.jsonl --positive PASS # the swapped conventionYou get the confusion counts (TP/TN/FP/FN), TPR (recall), TNR (specificity), accuracy, precision, all at 4 decimals, and a one-line bias reading: harsh when the judge fails good work more than it waves bad work through, lenient when the reverse, computed from the two error rates for the positive class you declared.
Sanity anchor, the method's worked example. 80 human-labeled runs, 50 FAIL and 30 PASS; the judge fails 44 of the 50 and passes 21 of the 30. Then TP=44 TN=21 FP=9 FN=6, TPR 0.8800, TNR 0.7000, accuracy 0.8125, precision 0.8302, and the reading is harsh: wrongly failed 9/30 (0.3000) versus waved through 6/50 (0.1200). Run the same input through the tool once when you set up; if your numbers disagree with this anchor, the input or the tool is wrong, not the method.
How to read the output:
- Report TPR, TNR, accuracy and precision together, never accuracy alone. Accuracy is blind to error direction: 85% correct could be a judge that fails good work or one that waves bad work through.
- A wide TPR-TNR gap is directional bias. Name the direction from the error rates, not a hunch: the wrongly-failed share versus the waved-through share. The bias line does this for the declared positive class; declaring the other class swaps TPR and TNR but must not flip the verdict.
- At small n the counts are the signal. TPR 0.88 over 50 labeled runs is a measurement; over 6 it is noise dressed up as a percentage.
- Every disagreement is a rubric bug before it is a model bug. Sharpen the label definitions, add a few-shot aimed at the direction it errs in, re-judge, re-measure. Do not ship a judge whose TPR and TNR disagree widely.
6. Gate and iterate, thresholds first.
Set pass thresholds before looking at results (choosing them after is how A/B tests lie), keep a rollback path, and feed observed failures back as new eval cases. The suite grows toward the stopping rule: add cases until new traces stop producing new failure modes.
Keep two dashboards separate. Judge metrics (phase 5) measure the judge against humans; a judge can agree perfectly with humans about a system that is failing. System metrics measure the thing you shipped: pass rate per dimension, failure rate per category, percent resolved per issue type, plus business outcomes (execution rate, escalation rate, latency). Compute system metrics per category while iterating, not only globally; an aggregate can hold still while a category burns. For agents, judge outcome plus process sanity, never step sequences: different valid paths reach the same answer, so grade decision quality and final-output correctness, with budgets (max steps, cost, timeout) and tool-error counts in the report. For RAG, retrieval metrics are leading indicators (Recall@k, Precision@k, MRR) before touching generation; fix retrieval first, a faithful generator over a broken retriever still fails.
When a gate fails, fix wording before structure: sharper label definitions, a better few-shot, a clearer boundary ruling. Change structure only if the measured category rate does not move after the wording fix.
Report
End with evidence, not a verdict word: the eval-set shape (grid cells, negative controls, counts), the answer-key size, the judge's four metrics with the positive class named, the bias reading with counts, the thresholds that were set beforehand, and which gates passed or failed. Name the top failure classes observed and what was fed back as new cases.
Never
- Never report accuracy alone.
- Never set or adjust thresholds after seeing the results.
- Never reuse eval cases as few-shot examples in the thing being graded.
- Never hard-code a fix for the one case you saw; one observed failure is a class.
- Never let the judge see the human label, and never let the judge's own past output stand in for the answer key.
Further reading
evals/METHODOLOGY.md in the superskills repo is the long-form method this
skill operationalizes; that path does not exist inside a standalone export of
this skill, which is why this file is self-contained.
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 40
- PrimeIntellect-ai/prime-rl★ 2.2ksame name
- rohanpsingh/LearningHumanoidWalking★ 1.2ksame name
- mikeyobrien/rho★ 372same name
- ai-analyst-lab/ai-analyst★ 304same name
- jh941213/ADLC-harness★ 125same name
- jh941213/my-cc-harness★ 125same name
- jh941213/my-claude-code-asset★ 125same name
- qtzx06/yolodex★ 96same name
- Kastalien-Research/thoughtbox★ 64same name
- Kanevry/session-orchestrator★ 53same name
30 more not listed
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.
Used alongsideProjects with it also use docs-ci, docs-interfaces and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jh941213Skilldocs-ci
문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.
Also in 3 projects that use this
jh941213Skilldocs-interfaces
API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.
Also in 3 projects that use this
open-coder-aiSkillpolicy-init
Create conformant Chock policy from request. args(request, target_path,
Also in 3 projects that use this
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 6 projects that use this
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
- +4 more from jh941213
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11ySkill
- articleSkill
- basic-reviewSkill
- cache-strategySkill
- clean-codeSkill
- cli-for-agentSkill
- content-writerSkill
- daily-qaSkill
- dbmap-auto-offSkill
- dbmapSkill
- db-optimizeSkill
- debugSkill
- defenseSkill
- diff-walkthroughSkill
- executing-plansSkill
- finish-branchSkill
- fuzzSkill
- handoffSkill
- humanizeSkill
- iac-scanSkill
- kb-advisorSkill
- minimalist-reviewSkill
- pentestSkill
- perf-profileSkill
- playwrightSkill
- pricingSkill
- qa-fullSkill
- quota-resilienceSkill
- subagent-driven-developmentSkill
- superskills-doctorSkill
- superskills-upgradeSkill
- tapestrySkill
- tddSkill
- test-coverageSkill
- validate-ideaSkill
- verifySkill
- web-perfSkill
- worktreesSkill
- write-planSkill
- youtubeSkill
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.

