agentleFS
sunitghubsunitghub/canon-skills/skills/skill-eval/SKILL.md

skill-eval

Skill9 starsChanged 22 days agoMITView on GitHub

Runs execution evals for a named skill against test cases in evals/evals.json. Use when you want to verify a skill produces correct output for known prompts, check skill quality after edits, or confirm a new skill works before registering it.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use postmortem, brainstorm and 4 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.
  • Hongyu-yuSkill

    postmortem

    Use when analyzing failures, outages, incidents, or negative outcomes, conducting blameless postmortems, documenting root causes with 5 Whys or fishbone diagrams, identifying corrective actions with owners and timelines, learning from near-misses, establishing prevention strategies, or when user mentions postmortem, incident review, failure analysis, RCA, lessons learned, or after-action review.

    Also in 3 projects that use this

  • nicolasestremSkill

    brainstorm

    Structured idea generation and solution exploration with systematic analysis.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 5 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 8 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run ./tools/skills.sh list 2>/dev/null and check whether $ARGUMENTS appears in the SKILL column.

    line 25
  2. Distinctive:

    Not found → skill is standalone, a sub-skill, or external → body threshold is 500 lines

    line 27
  3. Very specific:

    If > threshold: identify every ## section and its line span.

    line 31
  4. Very specific:

    Check whether skills/$ARGUMENTS/evals/evals.json exists.

    line 34
  5. Very specific:

    If missing → output missing evals — skills/$ARGUMENTS/evals/evals.json not found.

    line 35
  6. Very specific:

    If present → read it and count the entries in the evals array.

    line 36
  7. Very specific:

    Read the skill: Read skills/$ARGUMENTS/SKILL.md.

    line 42
  8. Distinctive:

    If missing: run the fallback evaluator (Step 1b) instead of normal eval cases.

    line 47
  9. Very specific:

    Ask it to recommend which scenarios should be formalised as evals.json cases

    line 52
  10. Distinctive:

    Write offer: After outputting the fallback results, present the recommended scenarios to the user and ask:

    line 56
  11. Very specific:

    Yes: write skills/$ARGUMENTS/evals/evals.json.

    line 60
  12. Distinctive:

    No:: stop. Do not write anything.

    line 68
  13. Distinctive:

    Ask it to report: what steps it took, what it would write or output, what tool calls it would make

    line 76
  14. Distinctive:

    Aggregate and report: After all cases complete:

    line 84
  15. Distinctive:

    Before trimming a prompt, add eval cases for what the trim must keep: a trim is measured only if an eval can see it (t-4fbe.

    line 130
  16. Very specific:

    If evals.json exists but has zero test cases, report it as a finding and stop — the fallback evaluator only fires when the file is entirely …

    line 133
  17. Distinctive:

    Write expectations to assert *outcomes and intent*, not specific phrasing.

    line 134

“Common” is measured: kept by at least 6 in 10 of the 19 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill Eval

Runs execution evals for the skill at skills/$ARGUMENTS/.

See example.md for a step-by-step walkthrough using the capture skill.

What this is not

Trigger eval (whether the skill fires for the right queries) and benchmark/improve/compare modes are out of scope. For those, see skill-creator.

For a plugin-vs-no-plugin baseline (Δ score), generate a throwaway plugin with tools/plugin-eval-gen <skill> --write, then run the claude plugin eval command it prints. Skills that only run inside a sprint (e.g. wrapup) stay on this skill: claude plugin eval can't invoke them directly.

Steps

  1. Structural check. Analyse the SKILL.md body (all lines after the closing --- of the frontmatter) and the eval case count:

    Registration check (determines body threshold): Run ./tools/skills.sh list 2>/dev/null and check whether $ARGUMENTS appears in the SKILL column.

    • Found → skill is registered and always-on → body threshold is 300 lines
    • Not found → skill is standalone, a sub-skill, or external → body threshold is 500 lines

    Body size:

    • Count total body lines. If ≤ threshold → output pass — body within threshold (N lines; threshold: T — always-on) or pass — body within threshold (N lines; threshold: T — standalone) and continue.
    • If > threshold: identify every ## section and its line span. If 2+ sections each exceed 30 lines → output candidate for ref/split — body N lines (threshold: T — always-on|standalone); sections <name> (X lines), <name> (Y lines) exceed 30-line threshold.

    Eval coverage:

    • Check whether skills/$ARGUMENTS/evals/evals.json exists. This applies to every named target skill, including skill-eval itself when running skill-eval skill-eval.
    • If missing → output missing evals — skills/$ARGUMENTS/evals/evals.json not found; fallback creation prompt required.
    • If present → read it and count the entries in the evals array. If count ≥ 3 → output pass — N eval cases. If count < 3 → output too few evals — N case(s); minimum is 3.

    Output both sub-checks under ### Structural check in the eval report, before any case results. Both checks are advisory — they do not block execution evals.

    Thresholds: 300-line body for always-on skills (injected every session); 500-line body for standalone/sub-skill/external (Anthropic hard limit, on-demand only); 30-line section; 3 minimum eval cases.

  2. Read the skill. Read skills/$ARGUMENTS/SKILL.md. If missing, report the gap and stop.

    Check for skills/$ARGUMENTS/evals/evals.json.

    • If present: proceed to Step 2 (executor+grader path).
    • If missing: run the fallback evaluator (Step 1b) instead of normal eval cases.

1b. Fallback evaluator (no evals.json). Not when dispatched by the sprint gate (complete.md step 1): a skill with no evals/evals.json is skipped there, so report skipped — no evals.json and stop; never ask the user to write one mid-close. Otherwise spawn a fresh Agent subagent with a clean context. The prompt must:

  • Include the skill's SKILL.md content verbatim under "Active skill:"
  • Instruct it to: (a) read the skill and identify 2–3 realistic user scenarios the skill is designed to handle, (b) execute each scenario as if in a fresh session with the skill active — reporting steps taken and output produced, (c) grade whether the skill's instructions were clear and complete enough to guide correct behaviour: pass, partial, or fail with a one-line reason per scenario
  • Ask it to recommend which scenarios should be formalised as evals.json cases

Output fallback results under ### Fallback eval (no evals.json) in the report, before ### Summary.

Write offer. After outputting the fallback results, present the recommended scenarios to the user and ask:

"Write these as skills/$ARGUMENTS/evals/evals.json? (yes/no)"

  • Yes: write skills/$ARGUMENTS/evals/evals.json. Each recommended scenario becomes one eval case with the fields:
    • id: kebab-case slug of the scenario name
    • case_type: test technique — control (happy path), compliance (must-follow rule), boundary (edge of valid input), edge (unusual but valid), over-caution (should not refuse), self-check (skill evaluates itself)
    • prompt: the scenario as a concrete user-facing prompt string
    • expected_output: one sentence describing correct behaviour
    • expectations: array of 2–3 specific, assertable strings the grader can verify
    • type (optional): capability (can it do this new thing?) or regression (can it still do the old things?) Confirm the file was written, then read the new file and proceed to Step 2.
  • No: stop. Do not write anything. Do not proceed to Step 3.
  1. For each eval case, run two subagents in sequence (from the session that runs this skill, never from inside another subagent, which cannot spawn them):

    Executor — spawn an Agent with a clean context. The prompt must:

    • Include the skill's SKILL.md content verbatim under a heading "Active skill:"
    • Include the eval prompt under "Your task:"
    • Instruct it to execute the task as if it were a fresh session with that skill active
    • Ask it to report: what steps it took, what it would write or output, what tool calls it would make

    Grader — spawn a second Agent with a clean context. The prompt must:

    • Include the executor's full response
    • Include the eval expected_output and the expectations list
    • For each expectation: grade pass, fail, or partial with a one-line evidence citation
    • Return: pass count, total, and per-expectation breakdown
  2. Aggregate and report. After all cases complete:
    • Output the eval report inline (see Output format below).
    • Record the pass rate. In canon (where tools/skill-eval-history.sh exists), run tools/skill-eval-history.sh $ARGUMENTS <model> <pass> <total> with the model that ran the executors and graders and the expectation counts from the Summary, and add the one line it prints (N/M pass (was K/M)) under ### Summary. It appends to skills/$ARGUMENTS/evals/history.jsonl; skip it when execution evals did not run (missing evals.json, fallback path), because a count of zero is not a result.
    • Write the same report to skills/$ARGUMENTS/skill-eval-result.md, replacing any prior contents. The file is always written — even if execution evals were skipped due to a missing evals.json. When dispatched by the sprint gate (complete.md step 1), write it to .tickets/<id>/skill-eval-$ARGUMENTS.md instead, so the tracked tree gains only the history line.

Output format

## Skill Eval: <skill-name>
Run: <ISO date>

### Structural check
Body: pass — body within threshold (N lines; threshold: T — always-on | standalone)
      -or-
      candidate for ref/split — body N lines (threshold: T — always-on | standalone); sections <name> (X lines), <name> (Y lines) exceed 30-line threshold
Evals: pass — N eval cases
       -or-
       too few evals — N case(s); minimum is 3
       -or-
       missing evals — skills/<skill-name>/evals/evals.json not found; fallback creation prompt required

### Case <id>: <prompt, truncated to 60 chars>
- "<expectation>" → pass | fail | partial
  Evidence: <one line>

### Fallback eval (no evals.json)
Scenario <n>: <description>
Verdict: pass | partial | fail — <one-line reason>
...
Recommended evals: <scenario descriptions to formalise as evals.json cases>

### Summary
<n>/<total> expectations passed
Verdict: pass | fail | incomplete (fallback path — no authored evals)

### Issues
| Issue | Details | Reason |
|---|---|---|
| <issue title> | <specific finding> | <why it matters> |

Populate the Issues table with any candidate for ref/split, too few evals, failed expectations, or missing files. Leave the table empty (header only) if no issues were found.

Gotchas

  • A new case is run once against the pre-change skill. If it passes there (the prompt handed the executor the facts to discover), rewrite it until it separates the two (t-e17d).
  • Before trimming a prompt, add eval cases for what the trim must keep: a trim is measured only if an eval can see it (t-4fbe; class: unmeasured-prompt-trim).
  • The executor runs in a clean context with only the skill content injected — it has no access to the repo. Expectations like "appended to HANDOFF.md" can only be graded pass if the executor explicitly describes taking that action. Grade conservatively; partial beats an unsupported pass.
  • Skills with heavy CLI dependencies (e.g., sprint, which calls ./tools/sprint) cannot be fully executed in a subagent — the executor will simulate the steps. This is still useful for catching missing steps, wrong output format, or logic errors. Note the limitation in findings when it applies.
  • If evals.json exists but has zero test cases, report it as a finding and stop — the fallback evaluator only fires when the file is entirely absent, not when it exists but is empty.
  • Write expectations to assert outcomes and intent, not specific phrasing. A grader matching literal wording will false-fail a creative-but-correct executor response. Prefer "executor describes writing the file to the correct path" over "executor outputs the string 'Writing to HANDOFF.md'".

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.