[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79X1Y7YFKYAEEBFZWAJVES8":3,"skill-same:01M79X1Y7YFKYAEEBFZWAJVES8":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79X1Y7YFKYAEEBFZWAJVES8","writing-skill-evals",null,"Use when writing, running, or auditing skill-lens eval suites for an Agent Skill — deciding which cases a skill needs, choosing between assertions, judge rubrics and trajectory checks, and reading a failing case correctly","EmadMokhtar\u002Fskill-evaluator","EmadMokhtar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311636?v=4","01M79X1GDEN7A2X9DVMBY9W1A6","Emad Mokhtar","01M79X1GEG3Y2Q6PVZBKMQHX4R",1,"MIT","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: writing-skill-evals\ndescription: Use when writing, running, or auditing skill-lens eval suites for an Agent Skill — deciding which cases a skill needs, choosing between assertions, judge rubrics and trajectory checks, and reading a failing case correctly\n---\n\n# Writing skill evals\n\nAn eval suite is worth exactly what its cases check. The two failure modes are a suite\nthat is green because it checks nothing, and a red case that gets the skill edited when\nthe eval was wrong. Everything here exists to prevent one of those.\n\n## Workflow\n\n1. **Orient.** Read the target `SKILL.md`. Look for existing evals in `evals\u002F` or\n   `*.eval.yaml` beside it, and run `skill-lens list \u003Cpath>` to see what the tool already\n   discovers.\n2. **Scaffold, or extend.** If step 1 found no suite, run `skill-lens init \u003Cskill-dir>` —\n   do not hand-roll the file structure, the generated file already carries the triggering\n   pair, a `workspace:` case for a skill that produces a file (delete it if this one does\n   not), and the placeholders that stop an unfinished suite from running. Pointed at a\n   directory of skills, `init` scaffolds every skill that has no suite and skips the rest.\n   If a suite already exists, do not run `init` on that skill: it never overwrites a file,\n   but it may add a second scaffold beside the one you have, which is not what you want.\n   Read `references\u002Fauditing.md` and extend the suite you found instead.\n   (`--force` overwrites the file outright, which is not what you want when a suite is\n   already there to build on.)\n3. **Mine the skill for claims.** Every \"always\", \"never\" and \"must\" in the instructions\n   is a candidate case. The frontmatter `description` is a claim too, and it is precisely\n   what the `mode: offered` cases test.\n4. **Propose the case list and confirm it.** Show the user the cases you intend to write,\n   one line each, before writing any YAML. Ask only for what `SKILL.md` cannot tell you:\n   which tools exist and what they return, which policy edges are real, what a good answer\n   sounds like. Do not ask for what the file already says.\n5. **Write the cases.** Replace every `TODO(skill-lens)`. Read\n   `references\u002Feval-file-syntax.md` for the fields, and `references\u002Fcase-design.md` for\n   patterns to draw from.\n6. **Validate, then run.** `skill-lens list \u003Cpath>` is the structural check — it parses\n   every case at zero cost and catches a malformed file before anything else runs; it is\n   what this repo's own CI self-check uses. `skill-lens run \u003Cpath>` is a different thing:\n   it needs a configured runner, and under the defaults (`FakeRunner`, `FakeJudge`) a\n   `mode: offered` case and any case with a `judge:` block come back `errored`, not\n   `failed` — the fake runner cannot report a triggering decision and the fake judge does\n   not grade. Neither is a statement about the skill. Configure a real runner (and a judge,\n   if any case needs one) before reading those results as anything.\n7. **Triage every red case** by the rule below before editing anything.\n\n## Choosing the check\n\n| Use | When |\n| --- | --- |\n| `assertions` | The check is mechanical and stable: an id appears, a traceback does not. |\n| `judge` | The claim is about quality, tone or reasoning. \"Explains it plainly\" is not a substring. |\n| `trajectory` | The failure is invisible in the output — deciding without looking the order up, calling the tool that was forbidden, calling it without the filter the skill demands (`call_args`). |\n| `budget` | Guarding against a regression into a tool-call loop or a runaway answer. |\n\n## A skill that already has `evals\u002Fevals.json`\n\nskill-lens reads that file directly (the shape the Agent Skills guide and `skill-creator` use):\n`skill-lens run .\u002Fthe-skill` needs no YAML. Its `assertions` \u002F `expectations` become a judge\nrubric, so a real judge must be configured — under the default `judge = \"fake\"` the cases come\nback `errored`. Keep the JSON when plain-English checks on the reply are enough. Add a YAML\nfile in the same `evals\u002F` directory when the skill needs mock `tools`, a `trajectory`, a\n`budget`, `mode: offered`, or a judge that reads a file the agent wrote; both load together.\n\n## Assert on the artifact, not the sentence about it\n\nWhen a skill's job is to produce a file, assert on the file. `contains` against\nthe chat output only proves the agent *said* it wrote a total; `contains` with\n`file: report.md` proves the total is in the report.\n\nReach for a judge `artifacts:` rubric when quality lives inside the document —\nstructure, completeness, tone. Reach for `file-produced` and `json-schema` when\nthe requirement is exact. A rubric that asks \"is the JSON valid\" is a schema\nassertion wearing a judge's costume: it costs tokens and it is less reliable.\n\n## Triage: the eval, the skill, or the harness?\n\nA red case means one of three different things, and naming which comes before any edit.\nStart with whether the case is `failed` or `errored` — that alone rules one branch out or\nin before you look at anything else.\n\n**The eval is wrong** when the case `failed` and the output was actually fine: a regex\ntight enough to feel rigorous but that rejects phrasing a model may legitimately vary, an\nassertion on wording the skill never promised, a budget below what the task honestly\ncosts. `examples\u002Fgreeting\u002Fgreeting.eval.yaml` in the skill-lens repo documents a real\ninstance — a single-sentence regex relaxed after real model output failed it for no good\nreason.\n\n**The skill is wrong** when the case `failed` and the output genuinely was not what the\nskill claims: the instruction is missing, or is present but too weak to survive a\nplausible prompt.\n\n**The harness is wrong** when the case `errored`. An errored case never ran to a real\nverdict — the runner or the judge broke, or was never configured for what the case asks\nof it. A `mode: offered` case under the default fake runner, or a `judge:` case under the\ndefault fake judge, errors this way by design: the fake runner cannot report a triggering\ndecision, and the fake judge does not grade. An errored case says nothing about the\nskill — fix the configuration (a real runner, a real judge), and change neither the eval\nnor the SKILL.md.\n\nFixing the eval is yours to do. **Changing the target `SKILL.md` is proposed and\nconfirmed, never silent** — the user is the author of their skill, and an eval that gets\nits own subject rewritten to match it has stopped measuring anything.\n\n## Rules that are not negotiable\n\n- **Ship the negative control.** A suite of triggering positives scores a skill that fires\n  on everything at 100%. `mode: offered` cases come in pairs.\n- **Never leave a case with no check.** At least one of `assertions`, `trajectory` or\n  `judge` — a case with none of the three passes without checking anything. `mode:\n  offered` cases legitimately carry `trajectory.skill_triggered` and no `assertions`;\n  that still counts as a check.\n- **Every rubric entry must be independently checkable and evidenced.** skill-lens records\n  a check that passes without citing evidence as a failure, so a vague entry costs a case\n  rather than buying coverage.\n- **Never leave a `TODO(skill-lens)` behind.** The run will refuse it, which is the point,\n  but a suite that cannot run is not a suite.\n\n## Auditing an existing suite\n\nRead `references\u002Fauditing.md` and work its checklist. Report findings; do not rewrite the\nuser's suite unasked.\n","# Writing skill evals\n\nAn eval suite is worth exactly what its cases check. The two failure modes are a suite\nthat is green because it checks nothing, and a red case that gets the skill edited when\nthe eval was wrong. Everything here exists to prevent one of those.\n\n## Workflow\n\n1. **Orient.** Read the target `SKILL.md`. Look for existing evals in `evals\u002F` or\n   `*.eval.yaml` beside it, and run `skill-lens list \u003Cpath>` to see what the tool already\n   discovers.\n2. **Scaffold, or extend.** If step 1 found no suite, run `skill-lens init \u003Cskill-dir>` —\n   do not hand-roll the file structure, the generated file already carries the triggering\n   pair, a `workspace:` case for a skill that produces a file (delete it if this one does\n   not), and the placeholders that stop an unfinished suite from running. Pointed at a\n   directory of skills, `init` scaffolds every skill that has no suite and skips the rest.\n   If a suite already exists, do not run `init` on that skill: it never overwrites a file,\n   but it may add a second scaffold beside the one you have, which is not what you want.\n   Read `references\u002Fauditing.md` and extend the suite you found instead.\n   (`--force` overwrites the file outright, which is not what you want when a suite is\n   already there to build on.)\n3. **Mine the skill for claims.** Every \"always\", \"never\" and \"must\" in the instructions\n   is a candidate case. The frontmatter `description` is a claim too, and it is precisely\n   what the `mode: offered` cases test.\n4. **Propose the case list and confirm it.** Show the user the cases you intend to write,\n   one line each, before writing any YAML. Ask only for what `SKILL.md` cannot tell you:\n   which tools exist and what they return, which policy edges are real, what a good answer\n   sounds like. Do not ask for what the file already says.\n5. **Write the cases.** Replace every `TODO(skill-lens)`. Read\n   `references\u002Feval-file-syntax.md` for the fields, and `references\u002Fcase-design.md` for\n   patterns to draw from.\n6. **Validate, then run.** `skill-lens list \u003Cpath>` is the structural check — it parses\n   every case at zero cost and catches a malformed file before anything else runs; it is\n   what this repo's own CI self-check uses. `skill-lens run \u003Cpath>` is a different thing:\n   it needs a configured runner, and under the defaults (`FakeRunner`, `FakeJudge`) a\n   `mode: offered` case and any case with a `judge:` block come back `errored`, not\n   `failed` — the fake runner cannot report a triggering decision and the fake judge does\n   not grade. Neither is a statement about the skill. Configure a real runner (and a judge,\n   if any case needs one) before reading those results as anything.\n7. **Triage every red case** by the rule below before editing anything.\n\n## Choosing the check\n\n| Use | When |\n| --- | --- |\n| `assertions` | The check is mechanical and stable: an id appears, a traceback does not. |\n| `judge` | The claim is about quality, tone or reasoning. \"Explains it plainly\" is not a substring. |\n| `trajectory` | The failure is invisible in the output — deciding without looking the order up, calling the tool that was forbidden, calling it without the filter the skill demands (`call_args`). |\n| `budget` | Guarding against a regression into a tool-call loop or a runaway answer. |\n\n## A skill that already has `evals\u002Fevals.json`\n\nskill-lens reads that file directly (the shape the Agent Skills guide and `skill-creator` use):\n`skill-lens run .\u002Fthe-skill` needs no YAML. Its `assertions` \u002F `expectations` become a judge\nrubric, so a real judge must be configured — under the default `judge = \"fake\"` the cases come\nback `errored`. Keep the JSON when plain-English checks on the reply are enough. Add a YAML\nfile in the same `evals\u002F` directory when the skill needs mock `tools`, a `trajectory`, a\n`budget`, `mode: offered`, or a judge that reads a file the agent wrote; both load together.\n\n## Assert on the artifact, not the sentence about it\n\nWhen a skill's job is to produce a file, assert on the file. `contains` against\nthe chat output only proves the agent *said* it wrote a total; `contains` with\n`file: report.md` proves the total is in the report.\n\nReach for a judge `artifacts:` rubric when quality lives inside the document —\nstructure, completeness, tone. Reach for `file-produced` and `json-schema` when\nthe requirement is exact. A rubric that asks \"is the JSON valid\" is a schema\nassertion wearing a judge's costume: it costs tokens and it is less reliable.\n\n## Triage: the eval, the skill, or the harness?\n\nA red case means one of three different things, and naming which comes before any edit.\nStart with whether the case is `failed` or `errored` — that alone rules one branch out or\nin before you look at anything else.\n\n**The eval is wrong** when the case `failed` and the output was actually fine: a regex\ntight enough to feel rigorous but that rejects phrasing a model may legitimately vary, an\nassertion on wording the skill never promised, a budget below what the task honestly\ncosts. `examples\u002Fgreeting\u002Fgreeting.eval.yaml` in the skill-lens repo documents a real\ninstance — a single-sentence regex relaxed after real model output failed it for no good\nreason.\n\n**The skill is wrong** when the case `failed` and the output genuinely was not what the\nskill claims: the instruction is missing, or is present but too weak to survive a\nplausible prompt.\n\n**The harness is wrong** when the case `errored`. An errored case never ran to a real\nverdict — the runner or the judge broke, or was never configured for what the case asks\nof it. A `mode: offered` case under the default fake runner, or a `judge:` case under the\ndefault fake judge, errors this way by design: the fake runner cannot report a triggering\ndecision, and the fake judge does not grade. An errored case says nothing about the\nskill — fix the configuration (a real runner, a real judge), and change neither the eval\nnor the SKILL.md.\n\nFixing the eval is yours to do. **Changing the target `SKILL.md` is proposed and\nconfirmed, never silent** — the user is the author of their skill, and an eval that gets\nits own subject rewritten to match it has stopped measuring anything.\n\n## Rules that are not negotiable\n\n- **Ship the negative control.** A suite of triggering positives scores a skill that fires\n  on everything at 100%. `mode: offered` cases come in pairs.\n- **Never leave a case with no check.** At least one of `assertions`, `trajectory` or\n  `judge` — a case with none of the three passes without checking anything. `mode:\n  offered` cases legitimately carry `trajectory.skill_triggered` and no `assertions`;\n  that still counts as a check.\n- **Every rubric entry must be independently checkable and evidenced.** skill-lens records\n  a check that passes without citing evidence as a failure, so a vague entry costs a case\n  rather than buying coverage.\n- **Never leave a `TODO(skill-lens)` behind.** The run will refuse it, which is the point,\n  but a suite that cannot run is not a suite.\n\n## Auditing an existing suite\n\nRead `references\u002Fauditing.md` and work its checklist. Report findings; do not rewrite the\nuser's suite unasked.\n",{"name":5,"description":7},"main","0761eb66911f5f9f67b951143812ece8b4d97b51","plugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals",0,"https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator","https:\u002F\u002Femadmokhtar.github.io\u002Fskill-evaluator\u002F","https:\u002F\u002Fgithub.com\u002FEmadMokhtar","https:\u002F\u002Fblog.emadmokhtar.com","Staff Software Engineer building multi-agent AI systems · Go & Python · Dutch, Egyptian at heart · I ship, teach & grow","2026-11-09 22:38:10",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add EmadMokhtar\u002Fskill-evaluator --skill writing-skill-evals",{"tool":40,"command":41},"bunx","bunx skills add EmadMokhtar\u002Fskill-evaluator --skill writing-skill-evals",{"tool":43,"command":44},"pnpm","pnpm dlx skills add EmadMokhtar\u002Fskill-evaluator --skill writing-skill-evals","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002FSKILL.md",true,[48,54,58,62],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"evals\u002Fwriting-skill-evals.eval.yaml","REFERENCE","参考文档",3773,"https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002Fevals\u002Fwriting-skill-evals.eval.yaml",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fauditing.md",2869,"https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002Freferences\u002Fauditing.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fcase-design.md",3917,"https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002Freferences\u002Fcase-design.md",{"path":63,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Feval-file-syntax.md",12354,"https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fplugins\u002Fskill-lens\u002Fskills\u002Fwriting-skill-evals\u002Freferences\u002Feval-file-syntax.md",[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M79X285DNGXYQ99ZHQSJSRQ3","ci-smoke","A fixture skill used only to smoke-test the composite action.","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fci-smoke\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M79X24397Z4T3VF0EP3ESJ4F","ci-smoke-fail","A fixture skill whose eval case always fails, used to smoke-test the action's failure path.","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fci-smoke-fail\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79X1THDXJ1BA5599A527AZM","order-support","Handle customer refund requests against the 30-day return policy","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fexamples\u002Forder-support\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79X1R7W8H6ZPK9GDP0BSRP3","log-triage","Count log lines per level with the bundled script and write a triage report","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fexamples\u002Flog-triage\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79X1MX7PZR5A70KX9NKY2VK","greeting","Greet a user warmly and by name","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fexamples\u002Fgreeting\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M79X1J73ZFM7MJAZJEY3XGGV","csv-report","Summarise a CSV of regional sales into a Markdown report and a JSON totals file","https:\u002F\u002Fgithub.com\u002FEmadMokhtar\u002Fskill-evaluator\u002Fblob\u002Fmain\u002Fexamples\u002Fcsv-report\u002FSKILL.md",[],[]]