skill-trigger-evals
Cross-cutting (WORKFLOW.md §2), the method for measuring a description. A description is the only thing an
agent reads before deciding to load a skill, so "it worked on my prompt" is not evidence either way. The
pitfalls that spoil such a measurement (easy negatives, single runs, overfitting, keyword stuffing) are in the
two references below; whether a loaded skill produces good output is in llm-eval-regression-pitfalls; writing
the description in the first place is writing-skills points 25 to 30. A description is tuned against a sample
of phrasings, and one tuned on all of the sample only remembers it.
When
- A skill never loads when it should, or loads on tasks it has nothing to do with.
- A description is about to be rewritten, or a skill is added next to neighbours with overlapping vocabulary.
- A block is about to be shared (
distributing-blocks) and its routing has never been run.
- A description is being rewritten and the only evidence is "it worked on my prompt".
- A description is long, full of quoted phrases, or close to the character limit.
Steps
References: read only the section the task meets. They are independent of each other and of the procedure
below.
| § |
Covers |
Read it when |
File |
| 1 |
Trigger queries and runs: what triggers, should-trigger and near-miss queries, realism, repeated runs, trigger rate, observability |
a trigger eval set is written or its results look noisy |
01-trigger-queries-and-runs.md |
| 2 |
Description optimisation: writing principles, character limit and keyword stuffing, train and validation split, the loop, picking the iteration, final check |
a description is being changed after an eval |
02-description-optimisation.md |
The procedure:
- Check the frozen limits first. The description is within the specification's 1024 characters and the
skill is registered where the agent client discovers skills. Run
python3 bin/test_frontmatter.py for
the first; the second is client-specific, so check it before blaming the wording.
- Write about twenty labelled prompts: 8 to 10 that should trigger and 8 to 10 that should not. Store them
as a list of
{query, should_trigger}. Starting size from the Agent Skills guide, not a law.
- Should-trigger: vary phrasing (formal, casual, typos), explicitness (names the domain or only describes the
need), detail (terse or context-heavy) and complexity (one step, or buried in a longer chain). The useful
ones are those where the link to the skill is not obvious from the prompt.
- Should-not-trigger: near-misses that share keywords or concepts with the skill but need something
else, including the territory of an installed neighbour. An unrelated prompt tests nothing.
- Write them as users type: file paths, personal context, column or company names, abbreviations.
Query-set detail and its failure modes: §1.
- Split once, and keep the split. About 60% train, 40% validation, each holding a proportional mix of
positives and negatives, shuffled at random and fixed across iterations.
- Run every query several times and record a rate. Three runs is the guide's starting point. Trigger rate =
runs in which the skill was loaded over runs. The skill counts as triggered when the agent loaded its
SKILL.md, as seen in whatever log, tool-call history or verbose output the client offers. A should-trigger
query passes at a rate above a threshold (0.5 is the default); a should-not-trigger query passes below it.
Twenty queries at three runs is sixty runs: script it. If the client allows it, stop a run as soon as the
outcome is clear (the skill was consulted, or work started without it).
- Read the result before touching the description. Evaluate on train and validation, but let only train
failures drive the edits: which should-trigger queries missed, which should-not-trigger queries fired.
- Misses suggest the scope is too narrow: broaden it or say more about when the skill helps.
- False triggers suggest it is too broad: state what the skill does not do, or the boundary with the
adjacent capability.
- Address the category a failed query stands for, never its keywords; that is overfitting.
- Stuck after several rounds: change the structure of the description, not the wording.
- Re-check the length cap each round; descriptions grow while being optimised.
- Repeat to about five iterations, then choose by validation pass rate, which may be an earlier
iteration than the last. If nothing improves, suspect the queries (too easy, too hard, mislabelled) before the
description.
- Apply and confirm on fresh prompts. Write the chosen description into the frontmatter, re-run
python3 bin/test_frontmatter.py, then run 5 to 10 new queries that never took part, a mix of both labels.
Only that result says whether it generalises.
- Output quality is a second, separate eval, run once the skill triggers:
- Cases hold a realistic prompt, a plain-language expected output and optional input files; start with two or
three, with varied phrasing and at least one boundary case.
- Run each case twice from a clean context, with the skill and without it (or with a snapshot of the previous
version of the skill as baseline), saving outputs and the tokens and duration of each run.
- Write assertions after the first outputs exist: objectively checkable, specific, not brittle on wording;
use a script for mechanical checks and a judge for the rest. A pass needs quoted or referenced evidence.
- Aggregate pass rate, time and tokens per configuration and read the delta, then look at patterns:
assertions that pass in both configurations or fail in both carry no information; those that pass only
with the skill show what it adds; inconsistent results across runs point to ambiguous instructions.
- A human reviews the outputs next to the grades and records specific feedback per case.
- Feed failed assertions, the feedback and the run transcripts to a reviser together with the current skill,
with the advice to generalise, keep the skill lean and explain the why; rerun in a new iteration; stop when
feedback is empty or gains flatten.
Assertion design, judges and flaky cases in depth:
llm-eval-regression-pitfalls.
Output / checkpoint
The query file with its split, the per-query trigger rates for train and validation, the description chosen and
the iteration it came from with its validation pass rate, and the fresh-query result. A business-layer or
cross-cutting block has no pipeline checkpoint; this block writes none. Done when the set has near-miss negatives and
positives that do not name the domain, a rate per query rather than a single verdict (§1), a description changed
from train failures only, and a few fresh queries that never took part (§2). A description tuned until every
query passed and never checked on unseen queries is not verified.
Guardrails
- Never call a description tuned until every query passes "verified": without validation and fresh prompts it
only remembers the sample.
- Never feed validation results into the edits.
- Never judge from one run; triggering varies between runs (§1).
- Never use obviously irrelevant negatives; they test nothing (§1).
- Never add keywords copied from failed queries; address the category they stand for (§2).
- Never treat a clean lint result as a trigger result; a lint checks the shape of a description, not whether an
agent acts on it (§2).
- A hosted or automated eval service is not a dependency of this block (rule B); the method is the run
count, the split and the rates, and a script of our own does the counting.
- Not run by us: no client was observed while writing this block, the numbers are the guide's starting points.
The character limit stated is the portable specification's; the limit of a specific client was not found in a
file read and is not stated.
What was not read or verified is in
references/origin.md.
Origin
Rewritten from the Agent Skills guides on optimising descriptions and on evaluating skill output quality, and
the specification's description limit (CC BY 4.0, credited), agentskills/agentskills commit 69ef37e, read
2026-10-19, and, for the two references, from the frontmatter checks and documentation of an independent skill
validator (MIT), read 2026-10-16. Fused on 2026-10-19 with the former skill-trigger-eval-pitfalls block, by
the owner's decision. 🟡 never dogfooded: details in references/origin.md.
Adaptation note (Claude Code). The guide's example script detects a trigger from the JSON output of a
non-interactive Claude Code run by looking for a Skill tool call naming the skill. Other clients need their own
detection; the method above does not depend on it.
1---2name: skill-trigger-evals3description: "Use when a skill's description has to be tested for whether it makes an agent load the skill at the right moments and not at the wrong ones: about twenty labelled prompts (should-trigger queries that hide the domain, near-miss negatives, realistic wording), a train and validation split, repeated runs and trigger rates, why a one-step request may never trigger, optimising the description without overfitting (iteration picked by validation, fresh queries, character limit, keyword stuffing), and reading the result. Also covers the separate with-versus-without eval of the skill's output once it has loaded."4metadata:5 source: https://skillmd.com/skills/techmefr/skill-trigger-evals6---78# skill-trigger-evals910Cross-cutting (`WORKFLOW.md` §2), the method for measuring a description. A description is the only thing an11agent reads before deciding to load a skill, so "it worked on my prompt" is not evidence either way. The12pitfalls that spoil such a measurement (easy negatives, single runs, overfitting, keyword stuffing) are in the13two references below; whether a loaded skill produces good output is in `llm-eval-regression-pitfalls`; writing14the description in the first place is `writing-skills` points 25 to 30. A description is tuned against a sample15of phrasings, and one tuned on all of the sample only remembers it.1617## When18- A skill never loads when it should, or loads on tasks it has nothing to do with.19- A description is about to be rewritten, or a skill is added next to neighbours with overlapping vocabulary.20- A block is about to be shared (`distributing-blocks`) and its routing has never been run.21- A description is being rewritten and the only evidence is "it worked on my prompt".22- A description is long, full of quoted phrases, or close to the character limit.2324## Steps2526**References: read only the section the task meets.** They are independent of each other and of the procedure27below.2829| § | Covers | Read it when | File |30|---|---|---|---|31| 1 | Trigger queries and runs: what triggers, should-trigger and near-miss queries, realism, repeated runs, trigger rate, observability | a trigger eval set is written or its results look noisy | [`01-trigger-queries-and-runs.md`](./references/01-trigger-queries-and-runs.md) |32| 2 | Description optimisation: writing principles, character limit and keyword stuffing, train and validation split, the loop, picking the iteration, final check | a description is being changed after an eval | [`02-description-optimisation.md`](./references/02-description-optimisation.md) |3334The procedure:35361. **Check the frozen limits first.** The description is within the specification's 1024 characters and the37 skill is registered where the agent client discovers skills. Run `python3 bin/test_frontmatter.py` for38 the first; the second is client-specific, so check it before blaming the wording.392. **Write about twenty labelled prompts**: 8 to 10 that should trigger and 8 to 10 that should not. Store them40 as a list of `{query, should_trigger}`. Starting size from the Agent Skills guide, not a law.41 - Should-trigger: vary phrasing (formal, casual, typos), explicitness (names the domain or only describes the42 need), detail (terse or context-heavy) and complexity (one step, or buried in a longer chain). The useful43 ones are those where the link to the skill is not obvious from the prompt.44 - Should-not-trigger: **near-misses** that share keywords or concepts with the skill but need something45 else, including the territory of an installed neighbour. An unrelated prompt tests nothing.46 - Write them as users type: file paths, personal context, column or company names, abbreviations.47 Query-set detail and its failure modes: §1.483. **Split once, and keep the split.** About 60% train, 40% validation, each holding a proportional mix of49 positives and negatives, shuffled at random and fixed across iterations.504. **Run every query several times and record a rate.** Three runs is the guide's starting point. Trigger rate =51 runs in which the skill was loaded over runs. The skill counts as triggered when the agent loaded its52 `SKILL.md`, as seen in whatever log, tool-call history or verbose output the client offers. A should-trigger53 query passes at a rate above a threshold (0.5 is the default); a should-not-trigger query passes below it.54 Twenty queries at three runs is sixty runs: script it. If the client allows it, stop a run as soon as the55 outcome is clear (the skill was consulted, or work started without it).565. **Read the result before touching the description.** Evaluate on train and validation, but let only train57 failures drive the edits: which should-trigger queries missed, which should-not-trigger queries fired.58 - Misses suggest the scope is too narrow: broaden it or say more about when the skill helps.59 - False triggers suggest it is too broad: state what the skill does not do, or the boundary with the60 adjacent capability.61 - Address the category a failed query stands for, never its keywords; that is overfitting.62 - Stuck after several rounds: change the structure of the description, not the wording.63 - Re-check the length cap each round; descriptions grow while being optimised.646. **Repeat to about five iterations**, then **choose by validation pass rate**, which may be an earlier65 iteration than the last. If nothing improves, suspect the queries (too easy, too hard, mislabelled) before the66 description.677. **Apply and confirm on fresh prompts.** Write the chosen description into the frontmatter, re-run68 `python3 bin/test_frontmatter.py`, then run 5 to 10 new queries that never took part, a mix of both labels.69 Only that result says whether it generalises.708. **Output quality is a second, separate eval**, run once the skill triggers:71 - Cases hold a realistic prompt, a plain-language expected output and optional input files; start with two or72 three, with varied phrasing and at least one boundary case.73 - Run each case twice from a clean context, with the skill and without it (or with a snapshot of the previous74 version of the skill as baseline), saving outputs and the tokens and duration of each run.75 - Write assertions after the first outputs exist: objectively checkable, specific, not brittle on wording;76 use a script for mechanical checks and a judge for the rest. A pass needs quoted or referenced evidence.77 - Aggregate pass rate, time and tokens per configuration and read the delta, then look at patterns:78 assertions that pass in both configurations or fail in both carry no information; those that pass only79 with the skill show what it adds; inconsistent results across runs point to ambiguous instructions.80 - A human reviews the outputs next to the grades and records specific feedback per case.81 - Feed failed assertions, the feedback and the run transcripts to a reviser together with the current skill,82 with the advice to generalise, keep the skill lean and explain the why; rerun in a new iteration; stop when83 feedback is empty or gains flatten.84 Assertion design, judges and flaky cases in depth: `llm-eval-regression-pitfalls`.8586## Output / checkpoint87The query file with its split, the per-query trigger rates for train and validation, the description chosen and88the iteration it came from with its validation pass rate, and the fresh-query result. A business-layer or89cross-cutting block has no pipeline checkpoint; this block writes none. Done when the set has near-miss negatives and90positives that do not name the domain, a rate per query rather than a single verdict (§1), a description changed91from train failures only, and a few fresh queries that never took part (§2). A description tuned until every92query passed and never checked on unseen queries is not verified.9394## Guardrails95- Never call a description tuned until every query passes "verified": without validation and fresh prompts it96 only remembers the sample.97- Never feed validation results into the edits.98- Never judge from one run; triggering varies between runs (§1).99- Never use obviously irrelevant negatives; they test nothing (§1).100- Never add keywords copied from failed queries; address the category they stand for (§2).101- Never treat a clean lint result as a trigger result; a lint checks the shape of a description, not whether an102 agent acts on it (§2).103- A hosted or automated eval service is not a dependency of this block (rule B); the method is the run104 count, the split and the rates, and a script of our own does the counting.105- Not run by us: no client was observed while writing this block, the numbers are the guide's starting points.106 The character limit stated is the portable specification's; the limit of a specific client was not found in a107 file read and is not stated.108 What was not read or verified is in [`references/origin.md`](./references/origin.md).109110## Origin111Rewritten from the Agent Skills guides on optimising descriptions and on evaluating skill output quality, and112the specification's description limit (CC BY 4.0, credited), agentskills/agentskills commit 69ef37e, read1132026-10-19, and, for the two references, from the frontmatter checks and documentation of an independent skill114validator (MIT), read 2026-10-16. Fused on 2026-10-19 with the former `skill-trigger-eval-pitfalls` block, by115the owner's decision. 🟡 never dogfooded: details in [`references/origin.md`](./references/origin.md).116117**Adaptation note (Claude Code).** The guide's example script detects a trigger from the JSON output of a118non-interactive Claude Code run by looking for a Skill tool call naming the skill. Other clients need their own119detection; the method above does not depend on it.