Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Agent Skills guide

How to test and evaluate Agent Skills

Check a skill triggers when it should, stays quiet when it shouldn't and beats the baseline, using a small eval set you can rerun.

By Advanced · Updated 20 November 20265 min read
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

To test an Agent Skill, run the task without it first to get a baseline, then check two things separately: that it triggers on the right prompts and stays quiet on near misses, and that its output beats the baseline on a small eval set of 10 to 20 fixed cases. Re-run both after every change.

A skill can fail in two different ways. It can fail to load when it should, or load when it should not. And once loaded, it can fail to make the output any better than the model would have managed alone. These need separate tests, because fixing one does not fix the other: triggering depends almost entirely on the description, and output quality on the body and scripts. The examples use the pr-description skill from how to create a Claude skill.

Start with a baseline

Before you write much, run the task without the skill. Pick three to five realistic requests, run each one, and write down what goes wrong. This tells you what the skill needs to say. Anthropic’s guidance and obra’s writing-skills both start here, and for a good reason: if the model already does the task well, the skill is wasted context. If it fails in a specific way, the skill should target that failure and little else.

Keep the baseline outputs. You will compare against them later.

Build a small eval set for the skill

You do not need hundreds of cases. Ten to twenty well-chosen prompts catch most problems. Keep them in a file next to the skill, in whatever format suits you. A plain JSON file is enough:

{
  "skill": "pr-description",
  "trigger": [
    { "prompt": "write the PR description for this branch", "expect": true },
    { "prompt": "I'm about to open a pull request, can you summarise the changes?", "expect": true },
    { "prompt": "write a commit message for the staged changes", "expect": false },
    { "prompt": "review this pull request for bugs", "expect": false }
  ],
  "quality": [
    {
      "prompt": "write the PR description for this branch",
      "fixture": "fixtures/branch-with-ticket",
      "checks": [
        "has Summary, Changes, Testing and Tickets sections",
        "summary is at most two sentences",
        "links ticket PLAT-123",
        "does not invent test steps"
      ]
    }
  ]
}

That format is ours, not a standard; Anthropic’s skill-creator and Corey Haines’ marketing skills each use their own evals.json layouts. What matters is having both kinds of case.

Test that the skill triggers

For the trigger set, include three kinds of prompt:

  • Plain requests that clearly need the skill, phrased the way real people ask.
  • Indirect requests that need it without naming it (“I’m about to open a PR”).
  • Near misses that share words with the skill but need something else (commit messages, code review).

Run each prompt in a fresh session with the skill installed and record whether it loaded. Most agents show in the transcript when a skill is used. Run each prompt more than once, because activation is a model decision and varies between runs.

If plain requests miss, the description lacks the words people use. If near misses fire, the description is too broad; add what the skill is not for. Change only the description between runs so you know what helped. Skill description best practices covers the usual fixes, including what to check when a skill never loads at all. Anthropic’s skill-creator automates this loop: it generates should-trigger and should-not-trigger prompts, measures how often the skill fires, and proposes description rewrites.

Test the skill’s output quality

For each quality case, run the task with the skill and compare against the baseline. Write checks that a person, or a second model acting as judge, can answer yes or no. “Is the summary at most two sentences?” is checkable. “Is it good?” is not.

A few practical points:

  • Use fixtures. A quality test on “this branch” is useless if the branch changes. Keep small example repositories, documents or datasets in a fixtures/ folder and point the prompt at them.
  • Grade blind where you can. If a model is grading, give it the two outputs without saying which used the skill. Our LLM-as-a-judge tutorial shows how to write a judge prompt you can trust.
  • Look at variance. Three runs that score 9, 4 and 8 tell you more than one run that scores 9.
  • Test on every model you expect people to use. Smaller models often need more explicit instructions than large ones, and a skill tuned for one can be too terse for another.

Watch how the agent uses the files

Beyond pass and fail, read a few transcripts end to end:

  • Does it open the reference files you expected, at the step you expected? If it never opens one, the pointer is unclear or the file is not needed.
  • Does it read files it should have run? Say explicitly which scripts to execute.
  • Does it re-derive things a script already does? Your instructions may not mention the script at the right moment.
  • How much of the context does the skill use once loaded? A long body that only matters in rare cases belongs in a reference file.

Keep the tests after you ship

Re-run the eval set whenever you change the skill, when a new model comes out, and when the tool or API the skill describes changes. A skill that encodes “use version 3 of the SDK” will start doing harm the day version 4 changes the defaults.

Include the evals in the published folder if you can. They show users what the skill was tested against and make outside contributions easier to check. They are also a quick signal of care when people compare skills.

A minimal checklist

  1. Baseline outputs recorded without the skill.
  2. At least five should-trigger and five should-not-trigger prompts, each run more than once.
  3. Quality cases with fixtures and yes or no checks.
  4. Results compared with the baseline, not just read on their own.
  5. Tested on the models your users run.
  6. Eval set committed next to the skill and re-run on every change.

When the skill passes, packaging and sharing Agent Skills covers getting it to other people. If evals are new to you in general, your first LLM eval builds one from scratch, and what Agent Skills are explains the loading stages that the file-usage checks above rely on.

  • Write your first LLM eval

    Turn real outputs into a small test set, add code-based checks in promptfoo and run them in CI to catch regressions on every change.

    TutorialBeginner40 min

  • LLM-as-a-judge: grading outputs you can trust

    Write narrow grading criteria, check the judge's verdicts against your own labels and decide when its agreement is good enough.

    TutorialIntermediate45 min

  • LLM evaluation

    Measuring AI system quality with datasets, code checks and model-graded tests.

    SkillIntermediate

  • Eval

    A repeatable test that measures how well an AI system performs on a defined set of cases, so you can compare versions instead of guessing.

    Glossary

Back to top