set-up-llm-evals
Skill7 starsChanged 17 days agoMITView on GitHub
Use when an LLM feature ships on vibes — golden datasets in the repo, deterministic checks first, an LLM judge with a rubric calibrated against human labels, a small CI regression gate, a cost budget and a results history that survives a model or prompt change.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- VelimirMueller/claude-skillsword for word, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 1
- VelimirMueller/claude-skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository156 other files it gives its agents.
- skills/swift/swiftui-design-principles/AGENTS.mdAGENTS.md
- skills/swift/ios-code-audit/CLAUDE.mdCLAUDE.md
- skills/swift/swift-focusengine-pro/llms.txtllms.txt
- build-llm-seamSkill
- build-mcp-serverSkill
- build-rag-pipelineSkill
- secure-llm-featuresSkill
- build-nextjs-backendSkill
- build-supabase-edge-functionSkill
- configure-backend-testsSkill
- design-http-apiSkill
- harden-backendSkill
- scaffold-fastapi-serviceSkill
- scaffold-go-serviceSkill
- scaffold-hono-serviceSkill
- secure-supabase-rlsSkill
- set-up-backend-authSkill
- set-up-background-jobsSkill
- set-up-databaseSkill
- set-up-nextjs-supabase-authSkill
- set-up-observabilitySkill
- set-up-supabaseSkill
- build-cliSkill
- release-cliSkill
- set-up-dev-toolchainSkill
- audit-securitySkill
- audit-toolchainSkill
- extend-skillsetSkill
- promote-releaseSkill
- set-up-stack-profileSkill
- write-commit-messagesSkill
- write-pull-requestsSkill
- analyze-complexitySkill
- apply-algorithmsSkill
- apply-design-patternsSkill
- apply-design-principlesSkill
- apply-solidSkill
- choose-data-structureSkill
- debug-systematicallySkill
- enforce-dependency-ruleSkill
- refactor-safelySkill
- slice-and-estimateSkill
- write-clean-testsSkill
- write-readable-codeSkill
- clean-frontend-scaffoldingSkill
- configure-accessibilitySkill
- configure-analyticsSkill
- configure-ciSkill
- configure-error-trackingSkill
- configure-lintingSkill
- configure-test-stackSkill
- configure-typescriptSkill
- create-moduleSkill
- optimize-performanceSkill
- scaffold-frontend-projectSkill
- set-up-authSkill
- set-up-design-systemSkill
- set-up-document-headSkill
- set-up-error-boundariesSkill
- set-up-feature-flagsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read .claude/stack-profile.md (languages, tests, ci, ai).
- Distinctive: line 26
No seam → run build-llm-seam first.
- Very specific: line 27
No golden set → create evals/datasets/<task>-gate.jsonl with 20 to 30 cases and the deterministic checks (steps 5–6).
- Very specific: line 31
All present and Verify passes → "already in place".
- Distinctive: line 51
No other dependency: metrics are a few functions, results are JSONL.
- Very specific: line 72
Add tasks to the runner: eval-gate (tsx evals/gate.ts <task>-gate) and eval-full (tsx evals/gate.ts <task>-full --judge).
- Very specific: line 75
Add a budget per dataset in thresholds.json.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Set Up LLM Evals
An eval is a test suite for behaviour you cannot assert with ===. Without one, every prompt edit, model upgrade or retrieval tweak is a guess, and a regression is found by a user. This skill sets up the smallest harness that catches real regressions: a golden set in the repo, checks that run through the same seam as production, a gate in CI and a record over time.
1. Audit current state
Read .claude/stack-profile.md (languages, tests, ci, ai). If absent, detect per stack-profile.md. Change nothing yet:
ls evals evals/datasets prompts config/llm.models.json 2>/dev/null
grep -rln "promptfoo\|inspect_ai\|braintrust\|deepeval\|ragas" . --include=*.json --include=*.yaml --include=*.toml --include=*.ts --include=*.py 2>/dev/null | grep -v node_modules | head
grep -rn "eval" .github/workflows 2>/dev/null | head
ls src/platform/llm 2>/dev/null # the seam: evals call the same code path as production
git log --oneline -- prompts config/llm.models.json | head # prompt and model changes that shipped without an evalReport: which features call a model, which have a golden set, whether any check runs in CI, prompt or model changes made without a result, and whether failures seen in production became cases.
2. Decide what to do
- No seam → run build-llm-seam first; an eval that bypasses the seam tests something that never runs in production.
- No golden set → create
evals/datasets/<task>-gate.jsonlwith 20 to 30 cases and the deterministic checks (steps 5–6). Judge later. - Golden set but no gate → add the runner, thresholds and CI job (step 6).
- A judge exists but was never compared with human labels → calibrate it (step 7) before trusting any number it produces.
- Retrieval features → add the retrieval eval from build-rag-pipeline first.
- All present and
Verifypasses → "already in place".
3. Detect the track
| Signal | Branch |
| TypeScript service (default) | In-repo harness: eval-code.md, runs with Vitest and tsx, calls the seam |
| Python service | Inspect AI (MIT): eval-code.md; the harness there is a port-free alternative |
Existing promptfooconfig.yaml | Keep it; add the golden set and the gate rules around it. Do not run two harnesses for one task |
| Team wants a hosted UI, online scoring, shared experiment history | Braintrust or similar; keep the dataset files in the repo as the source of truth |
Why the default is a small in-repo harness rather than a tool: eval-patterns.md.
4. Install only what's missing
pnpm add -D vitest tsx # TypeScript (zod is already a dependency of the seam)
uv add --dev inspect-ai # Python trackNo other dependency: metrics are a few functions, results are JSONL.
5. Generate the seams
evals/
datasets/<task>-gate.jsonl # 20-30 frozen cases: the PR gate (deterministic only)
datasets/<task>-full.jsonl # 100+ cases: nightly and on prompt, model or config changes (judged)
datasets/labels-<task>.jsonl # human pass/fail labels for judge calibration
lib/metrics.ts, lib/run.ts # recall@k, MRR, kappa; runner, checks, gate
gate.ts # CLI: run a dataset, apply thresholds, set the exit code
thresholds.json # floor, allowed drop vs baseline, budget per dataset
history.jsonl # one line per recorded run (committed)
results/ # per-run JSONL (gitignored, CI artifact)
prompts/eval-judge.md # the rubric, versioned like any promptCode: eval-code.md. Dataset rules: every case has an id, an input, and expectations that a program can check (must_contain, must_not_contain, must_match). Seed it with real inputs (redacted), every production failure (each bug becomes a case), at least one injection attempt and, for RAG, an unanswerable question. Never put secrets or personal data in a dataset file.
6. Wire it up
- Add tasks to the runner:
eval-gate(tsx evals/gate.ts <task>-gate) andeval-full(tsx evals/gate.ts <task>-full --judge). - CI: run
eval-gateon every PR that touchesprompts/,config/llm.models.json,src/platform/llm/or the feature; runeval-fullnightly and on release branches. The job needs the API key as a secret, so for fork PRs (no secrets available) it is skipped and non-blocking; the deterministic checks still run there through the unit tests (pnpm vitest run tests/evals.test.ts, fake adapter, no network). Job structure and SHA-pinned actions: workflow-templates.md. - Set
EVAL_RECORD=1on the nightly job so each run appends toevals/history.jsonl; the gate compares the next run with the last recorded pass rate. - Add a budget per dataset in
thresholds.json. The runner stops with an error when spend reaches it.
7. Verify
pnpm vitest run tests/evals.test.ts # runner, checks, budget stop and gate logic: no network
ANTHROPIC_API_KEY=… pnpm tsx evals/gate.ts tickets-gate; echo "exit=$?" # one paid runExpected: the unit tests pass. The gate run prints { total, passed, passRate, costUsd, baseline, problems } and exits 0 when passRate is at or above minPassRate and not more than maxDropVsBaseline below the baseline, otherwise 1. Break a prompt on purpose (delete a rule), rerun, and see the exit code turn 1: a gate that cannot fail is decoration.
Calibrate the judge before relying on --judge: label 30 to 50 real outputs pass or fail by hand, run the judge on the same outputs, compute Cohen's kappa (cohensKappa in lib/metrics.ts). Below 0.6 the judge is not ready: tighten the rubric until it is. Repeat when the judge model or the rubric changes.
References
- eval-patterns.md: rules and why. eval-code.md: all code.
- llm-seam-ts.md: the harness calls the seam.
- llm-security.md: injection cases belong in the set (LLM01).
- stack-versions.md: Inspect AI, promptfoo, Vitest lines.
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.

