Wink Pings

When evaluating an Agent Skill, don’t start by asking whether it’s well written

Lotte Verheyden breaks agent skill evaluation into two layers, routing and quality: first confirm the agent loads the right files, then force a comparison against a baseline, and finally look at outcomes, trajectories, and cost. Copying prompt eval directly misses the most critical step.

Agent skill evaluation is often turned into a copy of prompt evaluation. In a Langfuse article, Lotte Verheyden points out that this approach misses the most critical layer of a skill: it may not be loaded at all.

Original article link: How to evaluate an agent skill, tweet is here.

Skills and prompts are not evaluated the same way

Prompts stay in the agent’s context all the time. Skills use progressive disclosure: at first the agent only sees the frontmatter, and only loads SKILL.md and other files if it thinks they are useful.

So when evaluating a skill, you cannot assume the agent has already read its contents. Another difference is that putting content into a skill usually means it carries a multi-step, complex workflow. The object of evaluation changes from a piece of static text into more complex behavior.

Lotte breaks the problem into two layers:

  1. Does the agent choose the right skill on its own?
  2. Once the skill is used, does it actually improve the results?

Every time you change a skill, you need to test both.

Routing evaluation: look at which files were loaded in the trace

Routing evaluation makes all skills available and observes whether the agent loads the correct files.

The approach is to build a dataset where each item contains a prompt, an environment, and the skill file that should be loaded as expected_output. After associating skills with traces, the fact that a given skill file was loaded into context is recorded in the trace, and can be checked with a code evaluator.

There are also two things to test here. First, skill-level triggering and coexistence: is the frontmatter clear enough that the agent loads the skill when it should and leaves it alone when it shouldn’t? As the skill library grows, every new skill competes for attention, and adding a new skill can change the routing behavior of existing skills. Second, routing inside a skill: large skills use multiple files to control context size, and whether subfiles are loaded correctly needs to be tested separately.

If routing is not tested, the quality evaluation that follows can easily become self-congratulatory. If the skill was never loaded in the trace at all, you are testing nothing but air.

Quality evaluation: force usage and compare with a baseline

Quality evaluation needs to isolate routing first. Force the agent to use the skill, then compare it with a baseline with no skill or an older version of the skill. What you are looking at is lift.

Metrics usually fall into two categories: outcome and trajectory quality, and trajectory efficiency.

Outcome and trajectory quality depend on the specific scenario. For coding, you can look at whether it compiles, whether tests pass, whether expected code patterns appear, whether the workspace is clean, and whether temporary files are left behind. For CLI or API operations, you can look at whether there are collateral writes, tool adherence, and whether it takes detours. For team workflows, you can look at step order and output format.

Lotte gives a practical piece of advice: score each constraint separately instead of combining them into one big score. Sub-checks like builds_cleanly, uses_production_label, and no_collateral_writes directly tell you which requirement broke. Also, choose pass@k or pass^k based on risk. Use pass@k for iterable workflows, and look at pass^k for actions like production migrations and compliance reviews.

Trajectory efficiency is also worth measuring. Strong models can often recover from bad instructions, and quality scores can hide friction. You can look at tool error rate, workaround rate, and the token cost, number of turns, and actual elapsed time of successful runs. Failed runs often look cheap because the agent gives up early.

Lotte mentions Langfuse’s own CLI skill iteration: while tracking error rates, they caught a 25% hallucinated flag rate, plus a No server URL found retry loop that hit 90% of runs. Both problems were fixed by changing two lines in SKILL.md.

In production, you also need to look at the cost of misrouting. Loading the wrong skill or missing a needed skill brings extra tokens, latency, and worse results. This data helps you decide which routing failures to fix first.

Don’t get the order backwards

Evaluation suites can easily grow larger and larger until you end up optimizing a flawed metric.

First record skill usage in traces: which skills are available, when they are loaded, and exactly which files are loaded. Then read the traces and observe how the agent actually runs. Next, add routing evaluation first, then add outcome and trajectory evaluation. After a model upgrade, rerun the no-skill baseline to see whether the old skill has already been absorbed by the new model; if it should be deleted, delete it.

This line from Lotte’s article is worth remembering: if a skill is never loaded, all other evaluations are noise. First test whether it gets used, then test whether it improves the results.

发布时间: 2026-12-02 01:32