eval-writing
Skill0 starsChanged 11 days agoMITView on GitHub
Design and revise evaluation cases and suite specifications for agent skills. Use when asked to write eval prompts, define expected outcomes, or add assertions and routing checks; interpreting captured reports belongs to skill-evaluation.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- epanet-validationSkill
- pywr-engineeringSkill
- scientific-writingSkill
- skill-browserSkill
- skill-evaluationSkill
- skill-prSkill
- skill-writingSkill
- wntr-engineeringSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 19
RED: Before writing or changing a skill, write a case that fails against current behaviour.
- Distinctive: line 23
REGRESSION: Every real failure observed in a session becomes a case.
- Very specific: line 33
Write one when a skill has behaviour worth protecting: a procedure the agent must follow, a trigger it must honour, a file it must produce.
- Distinctive: line 96
Write assertions as specific, observable statements.
- Very specific: line 102
Add a routing block to specify which skill IDs should be mentioned in the captured text artifacts: the transcript:
- Very specific: line 110
Use expect for should-fire cases and forbid for negative, near-miss cases.
- Distinctive: line 119
Create a fresh working directory per trial.
- Distinctive: line 120
Run the prompt under the chosen condition (no skill, the skill, or a comparator).
- Very specific: line 124
Place them under evals/runs/<skill>/<case-id>/<condition>/trial-1/.
- Very specific: line 155
Every case has a stable id, a concrete prompt, and an expected_output.
≈ “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
Writing skill evals
An eval is a failing test for one observable behaviour: a realistic prompt, a captured run, a small set of checks, and a score you can compare over time.
A case that cannot fail proves nothing. Write the eval before the skill change it is meant to protect.
The test-driven loop
- RED. Before writing or changing a skill, write a case that fails against current behaviour. Run it and record the baseline score.
- GREEN. Make the smallest skill change that makes the case pass. Keep the skill and its eval in sync.
- REGRESSION. Every real failure observed in a session becomes a case. A bug found once and not encoded will be found again.
- REVIEW. Re-run on a second, holdout prompt set to check you did not overfit the skill to one case's wording.
A case that is green in both conditions is not discriminating. Sharpen it or drop it.
When to write an eval
Write one when a skill has behaviour worth protecting: a procedure the agent must
follow, a trigger it must honour, a file it must produce. Skip it for a trivial
skill whose correctness is already covered by agentskills validate.
Layout
skills/<name>/
├── SKILL.md
└── evals/
├── evals.json # required: cases, prompts, assertions
├── files/ # optional: input fixtures
└── scripts/ # optional: deterministic assertion scriptsShared infrastructure lives in evals/ at the repository root: the runner, this
guide, and the gitignored runs/ and reports/ directories. Read
evals/README.md before running anything.
Case anatomy
{
"skill_name": "my-skill",
"evals": [
{
"id": "my-skill-001",
"label": "Human-readable name",
"prompt": "The user request the agent receives.",
"expected_output": "What a successful run produced, in outcome terms.",
"expected_skill": "my-skill",
"files": ["fixture.csv"],
"routing": { "expect": ["my-skill"], "forbid": ["other-skill"] },
"assertions": ["file:out.json", "script:check.py", "Output names the top 3."]
}
]
}skill_namemust match the directory name.idmust be unique and stable across runs; it is the join key for conditions.promptis concrete: include paths, columns, and context. Vague prompts make vague evals.expected_outputdescribes the outcome, not the exact text.expected_skillis the skill that should be loaded;nullfor negative cases.
See the eval schema for the full field list and a worked example.
Assertions
Prefixed forms are graded deterministically in-repo; bare strings need the optional judge.
| Assertion | Checks |
file:<path> | Path exists under the artifacts dir, outputs/, or by filename |
regex:<pattern> | Pattern matches the transcript or outputs |
json:<path>:<field> | JSON field exists (dot-separated object keys and zero-based array indexes), for example json:outputs/summary.json:nodes.0.id |
script:<name> | scripts/<name> exits 0, receiving the artifacts dir |
agentskills | agentskills validate passes on the produced skill |
| (bare sentence) | A qualitative property (LLM-judged) |
Write assertions as specific, observable statements. "The bar chart has labeled axes" is testable; "the output is good" is not. Split a two-part requirement into two assertions so a half-answer fails.
Routing checks
Add a routing block to specify which skill IDs should be mentioned in the
captured text artifacts:
the transcript:
"routing": { "expect": ["my-skill"], "forbid": ["other-skill"] }Use expect for should-fire cases and forbid for negative, near-miss cases.
The current runner checks text mentions in transcripts and output files; this is
not proof that a host loaded or invoked a skill. Use host-provided load metadata
when invocation evidence is required.
Capturing a run
The runner grades artifacts; it does not drive an agent.
- Create a fresh working directory per trial.
- Run the prompt under the chosen condition (no skill, the skill, or a comparator).
- Save produced files under
outputs/, the transcript astranscript.md, and ametadata.jsonwithmodel,harness, andskill_revision. - Place them under
evals/runs/<skill>/<case-id>/<condition>/trial-1/.
Repeat for trial-2, trial-3, ... when reliability matters. One trial is
enough while developing; widen to 3–5 before trusting a score.
Running
python evals/runner.py --validate
python evals/runner.py --skill my-skill --all-conditions
python evals/runner.py --skill my-skill --compare other-skill--validate checks suite structure and referenced files; it does not run an
agent, grade behavior, or produce evaluation results. --compare grades another
skill's with_skill artifacts on the same case ids. Use the
skill-evaluation skill to read the report and
decide whether to ship.
Pitfalls
- Saturated assertions pass in both conditions; they do not discriminate.
- Leakage — asserting the skill's exact wording tests memory, not behaviour.
- Single-trial noise — one pass/fail is not a score.
- Overfitting — a case tuned to one prompt may not generalise.
- Hardcoded paths — anything machine-specific belongs in an env var.
- Grading the sentence — grade the artifact, not the agent's claim it is done.
Checklist
skill_namematches the directory name.- Every case has a stable
id, a concreteprompt, and anexpected_output. - The case can fail; it is not saturated.
- Assertions are specific and observable.
script:andfiles:references exist.- Routing is checked for trigger-sensitive skills.
python evals/runner.py --validatepasses.
Evaluation status
The suite specification is checked for structure. No captured agent runs have been graded, so the behavior of this skill has not been evaluated.
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.

