Skip to main content
Agent skills are an important way to add workflows and other logic to your agent. In this guide we walk through how to measure and improve your skills with coding harness tracing and evals. An agent can appear to work without using your skills, so tracing shows you if it actually loaded and used the right skill, and evals grade how effective your skill is. This guide covers:

Understand what your skill is doing using coding harness tracing

Coding harness tracing records every interaction with your coding agent, such as Codex or Claude Code, in Arize AX. Each turn is captured as a trace, with spans for every model and tool call, including loading skills.
A Claude Code trace in Arize AX with status OK and a latency of 11.64 seconds. Under Turn 1 are five LLM calls, each with its tokens and cost, a Skill span, and three Bash spans. The Skill span is selected, and its input shows the skill that loaded, and how the agent restated the request.A Claude Code trace in Arize AX with status OK and a latency of 11.64 seconds. Under Turn 1 are five LLM calls, each with its tokens and cost, a Skill span, and three Bash spans. The Skill span is selected, and its input shows the skill that loaded, and how the agent restated the request.
Agents load skills through progressive disclosure:
  1. The agent reads the description of each of your skills when it starts. These descriptions guide the agent in selecting a skill to use.
  2. Once the agent picks a skill, it loads the relevant SKILL.md file
  3. The SKILL.md file can reference other files, and the agent loads these if needed
Loading a skill leaves a Skill span, and each file it reads leaves a Read span, so the trace shows which skill was chosen, and how far into the skill the agent got.
This tracing shows:
  • Was my skill loaded and used
  • What references were loaded
  • The latency of using the skill
  • The total token cost
It also gives you the input and output to each span, so you can write evals against the final output, or against any other part of the trace, such as inputs to tool calls driven by the skill. For example, if your skill gives instructions on calling a CLI, you can check the CLI call in a Bash tool span. As a first step to testing your skills, set up coding harness tracing for your agent, install your skills, send some prompts, then review the traces that are created. This can give you a quick gut check on whether the skill is being used, any latency issues, and so on. You can use this to fix any obvious issues. Reading the traces also gives you useful data to use when building your evals.

Set up your eval environment

Next set up evals to build a reproducible way to test your skills, allowing you to test changes in your skills, or test new models in your agent. This involves not only creating the evals you want to use to measure your skills, but also setting them up in a way that you are measuring only your skills, using a clean room type setup.

Set up a clean room

Agents are smart. They use the resources available to them to work on the prompts you provide. This includes using your skills, but also using other skills, MCP servers, and reading other data on your machine. If you want to ensure your skill testing is repeatable, you need to run this on a clean room setup. This limits the agent to just your skills, stopping it reading other data that would bias the test. The easiest way to do this is in a Docker container, or other containerized environment. Inside this environment, set up:
  1. The coding agent
  2. Coding harness tracing
  3. Your skills
  4. Any other capabilities needed to run the skills under test, such as a code repo or other resources
This is a repeatable environment without allowing your setup to bias the test. You can repeat tests by recreating the container. Depending on how your skills work, you can recreate after an entire test run, or on a per-prompt basis. If your skill has local side effects, such as writing to files or other local changes that an agent might detect that can bias the result, always recreate the clean room container each run.
A clean room is a container with only what the test needs: the coding agent and model under test, coding harness tracing that sends every turn to Arize AX, only the skills under test, and the resources the skills need, such as a code repo or test app. Recreate it for each test run, or each prompt if your skill changes local files. Kept out, because they could bias the result: other skills, MCP servers, files and data on your machine, and your own agent config and memory.A clean room is a container with only what the test needs: the coding agent and model under test, coding harness tracing that sends every turn to Arize AX, only the skills under test, and the resources the skills need, such as a code repo or test app. Recreate it for each test run, or each prompt if your skill changes local files. Kept out, because they could bias the result: other skills, MCP servers, files and data on your machine, and your own agent config and memory.
Depending on your needs, you may have a matrix of different combinations. If you are building skills to be used by any coding agent, your clean room setup would have multiple variations for different agent and model combinations. For example: If your skill is a coding skill that needs to work with many different types of apps, use one container configuration per app.

Create a dataset of prompts

To test your skill, you need a set of real world prompts that map to what your users would actually ask, ideally captured from real-world sessions. Typically skills are not isolated to a single workflow, instead they cover multiple tasks that a user might do. For example, the Arize skills cover instrumentation, reading traces, creating evals, and more. Group your prompts into datasets for the different skill capabilities you want to test, allowing you to iterate and improve different parts of your skills. This dataset should also contain ground truth for you to evaluate against. This includes details like which skill should be used if you have multiple, what reference files should be loaded by the skill, what actions should happen such as tool calls, and what the output should look like. As well as the positive cases where the skill is called, your dataset needs negative cases where your skill should not be called. For example, two rows in a dataset for a skill that runs Arize AX experiments might look like this:

Build trajectory evals to grade how the agent calls the skill

The first eval to build is a trajectory sanity check for the skill. This is a code-based evaluator that checks that the skill is called, makes comparisons against the ground truth, checks the trajectory used by the agent such as routing to the right references, and measures cost and latency. The typical checks this evaluator should make are:

Build evals to grade the quality of the outcome

The second eval to build is a check on the output of the skill. This checks that the skill actually worked and performed the steps or provided the expected output. Reviewing your traces is a good place to start planning your evals. Depending on the type of skill, a code evaluator might be enough, or you may need to pass the output to a decision model, LLM, or agent as a judge. For other skills, you may need to build more advanced testing harnesses. For example: Each check should be scored separately, instead of a single pass/fail or score. This allows you to later tune each part of the skill depending on the individual grade.

Build your baseline

Now grade your skill by running an experiment. For each row in your dataset, run the prompt in the clean room setup, creating a new environment each time if needed. Run the evals over the generated trace and skill output. Agents are non-deterministic, so run each experiment multiple times to get a grade range to compare your changes against noise. Your initial pass should run two scenarios:
  1. How the current skills perform using your agent
  2. How the agent scores without your skills
This run not only gives you a grade for your skill and a starting point to iterate against, but it also gives you a grade on how well the agent does by itself. This shows how much help the skill is (or isn’t), compared to what the agent already knows from its training or from tool calls such as web searches. When you test later changes, they need to score above the current skill’s range to count as a real gain, as opposed to just noise.

Improve your skill

You now have both the data to improve your skill, and an environment to score your changes to ensure they are making a demonstrable improvement, within your limits for cost and latency.

Ensure descriptions are concise and accurate

The skill descriptions are what tell the agent when to use the skill. These are limited to 1024 characters, but must contain enough information to trigger the skill when needed. Some approaches to take:
  • If the description needs to be too long to guide the agent, consider splitting the skill into multiple skills with clearly defined tasks
  • Use imperative phrasing, for example “Use this skill when you need to”, rather than “This skill does”. Tell the agent when to act.
  • Focus on the user’s intent in the terms the user would use, not specific implementation details
For example:

Cut before you add

Every word in your skill adds a token cost. The more wordy the skill, the less effective it can be. Agents like short succinct skills, and the shorter the skill is, the more space in the context window for the important information the agent needs, and the cheaper and faster the skill runs.
Some approaches to take:
  • Prefer concise steps to long prose
  • If there is branching in your skill (for example in a coding skill having “do this for Python, do this for JavaScript”), then split the branches out into separate reference files

Keep what only you know, and add what the agent can’t know

Skills are most useful when they encode logic or workflows that the agent is unable to discover or know. Some approaches to take:
  • Define the workflows that the agent needs to follow that are specific to your skill
  • Review the baseline run to learn what the agent can do by itself. Remove anything from the skill that the agent has demonstrated it can do. This can be public APIs and SDKs that the agent was trained on, well known practices like running code, or public documentation.
  • Add gotchas, templates, checklists, validation steps, anything the agent cannot infer
  • Provide specific guidance for tasks the agent gets wrong, such as directing it to a particular API for a scenario where it wants to call the wrong API
  • Map your users’ terminology to the names your tools and APIs use
  • Say when a reference is required
  • Say how to call the tools, and what to do when a tool call fails

Grade the skill updates

Grade your new skill, and compare against the baseline scores for the original skill and no skill.
Three versions go into the same test: no skill, which is what the agent does on its own; the current skill, which is what you'd ship today; and your change. The same test uses the same requests, clean room, model, and runs per request. Your change is scored on every eval and on cost, and no skill on the output score and cost only. Ship your change only if it beats the current skill on every eval, beats no skill on the output score, and stays within the cost budget.Three versions go into the same test: no skill, which is what the agent does on its own; the current skill, which is what you'd ship today; and your change. The same test uses the same requests, clean room, model, and runs per request. Your change is scored on every eval and on cost, and no skill on the output score and cost only. Ship your change only if it beats the current skill on every eval, beats no skill on the output score, and stays within the cost budget.
Compare the scores for multiple runs to ensure the improvement is outside the noise range. Typically you would make one set of changes, measure, make more changes, measure again, and repeat until the grade stops rising and levels off. Fixes aimed at one problem can cause another, so compare the individual grades, and the scores for different prompts. For example:
  • New instructions can make every run slower, or more expensive, even when they solve the problem
  • An example in the skill can get copied word for word, rather than adapted to the request
  • A broader description can fix a missed skill trigger, but take requests from another of your skills
Once you have the grades, decide if the skill is ready to ship. Ship the skill if the change passes all of these: If not, iterate on these steps to make more changes to the skill and test again.

Continuously monitor and improve your skill

As with running evals against your production agents, this is not a one and done task. Make sure your setup is able to be rerun when needed. Run it:
  • When you need to add more capabilities to the skills. In this case, expand the dataset to include prompts for the new capabilities.
  • When you need to support a new coding agent, or model. For new models, also rerun the no-skill baseline to see how much the new model can do without using your skills.
If your skill is an internal skill, then you can set up tracing on all coding agents, and have your evals online to continuously monitor in production.

Next steps

Instrument your coding agent

Set up coding harness tracing for Claude Code, Codex, and other agents.

Explore your traces

Filter spans to find the same failure across runs.

Build a dataset

Turn traces or your own examples into a dataset of prompts.

Arize skills

Give your coding agent skills for tracing, datasets, experiments, and evals in Arize AX.
Last modified on December 3, 2026