Repository navigation
Description
Background
As part of agent evaluation and training, users want to compare the impact on agent performance with iterations on agent skills. They want to enable modifying skills without modifying the rest of the environment or agent. They are interested to evaluate the impact of skills on accuracy, cost, task completion time, and the ability for skills to generalize across different sets of tasks.
Description
Evaluate skills as a first class variable with support for runtime skills loading. Skills often encode operational knowledge that influences agent success in workflows.
Design
Core Concept
Skills are treated as an environment-level concern in NeMo Gym. The framework manages which skills are available to the agent's runtime, without modifying the agent itself. The agent uses its own native skill-loading mechanism (filesystem scanning, MCP, tool calls, etc.) to discover and use skills as it normally would. NeMo Gym's role is to set up the skill environment, vary it between runs, and measure the outcome.
Skills follow the open Agent Skills standard used by Codex CLI and Claude Code. A skill is a directory containing a SKILL.md file (YAML frontmatter + markdown body) plus optional supporting files (scripts, references, assets). The directory is the unit of variation, not just the SKILL.md file.
Config
A single skills.path field specifies the directory of skills to make available for a given run:
skills:
path: skills/variant_a/ # directory of skill directories, Agent Skills standard layoutThe directory at path follows the standard layout:
skills/variant_a/
├── cot_enhanced/
│ └── SKILL.md
├── tool_focused/
│ ├── SKILL.md
│ └── references/
│ └── api_spec.md
└── baseline/
└── SKILL.md
To compare variants, run with different path values:
# Variant A
ng_collect_rollouts +agent_name=my_agent \
+input_jsonl_fpath=data/tasks.jsonl \
+output_jsonl_fpath=results/rollouts_variant_a.jsonl \
+skills.path=skills/variant_a/ \
+num_repeats=10
# Variant B (different skill content, or different set of skills)
ng_collect_rollouts +agent_name=my_agent \
+input_jsonl_fpath=data/tasks.jsonl \
+output_jsonl_fpath=results/rollouts_variant_b.jsonl \
+skills.path=skills/variant_b/ \
+num_repeats=10How Skills Are Made Available
The framework resolves skills.path and makes the skills accessible to the agent's runtime environment. How the agent discovers and loads them depends on the agent:
- Agents with filesystem-based skill loading (Codex CLI, Claude Code, or agents with
Read/Globtools): Skills are files on disk. The agent's skill-loading config points at the resolved path, and its native discovery mechanism picks them up. - Agents with a skill-serving backend (e.g., MCP skill server, custom
search_skillstool): The existing backend is configured to serve from the specified skill directories. - Agents without any skill mechanism: Future enhancement — inject skill content into
responses_create_params.inputas a system message at_preprocess_rows_from_configtime. Not in initial scope.
The skills directory is a filesystem path (absolute or relative, resolved like input_jsonl_fpath). It does not need to live inside Gym or inside a resources server. For distributed runs, it needs to be on shared storage accessible to the agent process.
What Gets Evaluated
The framework supports evaluating skills at multiple levels depending on the agent's capabilities:
| Level | What it tests | Requires |
|---|---|---|
| Content quality | Given that a skill activates, does its content help the model complete the task? | Agent with skill loading |
| Selection quality | Does the model activate the right skill for a given task? Is the skill description effective? |
Agent with skill discovery tools; optional verifier_metadata.expected_skill labels in task data |
| Library composition | Does adding/removing skills from the library help or hurt overall performance? | Multiple runs with different skills.path values |
| Generalization | Does a skill improve performance across diverse task types, or only narrow ones? | Per-task-group analysis of rollout results |
Output Tagging
Each rollout result is tagged with a skills_ref listing the skills that were available:
{
"reward": 1.0,
"task_index": 0,
"rollout_index": 0,
"agent_ref": {"name": "my_agent"},
"skills_ref": {
"path": "skills/variant_a/",
"skills": [
{"name": "cot_enhanced", "description": "..."},
{"name": "tool_focused", "description": "..."},
{"name": "baseline", "description": "..."}
]
}
}Skill metadata (name, description, version) is read from each skill's SKILL.md frontmatter.
For agents with tool-based skill loading, which skills were actually activated can be determined from the tool call logs in the response output (e.g., calls to activate_skill, read_skill, etc.).
Metrics
Uses existing NeMo Gym metrics infrastructure. No new metrics primitives are needed — users compare skill variants by diffing rollout outputs:
- Accuracy: Reward from
verify(), aggregated into pass@1/pass@k byng_reward_profile - Cost: Token usage from
response.usage.{input_tokens, output_tokens}, already present in rollout output
Implementation
Files to touch:
nemo_gym/skills.py(new) —load_skill_directory(path)utility function to walk a skills directory, parseSKILL.mdfrontmatter from each subdirectory, and return skill metadata (name, description, version).nemo_gym/rollout_collection.py— Add optionalskillsfield toRolloutCollectionConfig. In_preprocess_rows_from_config, load skills metadata viaload_skill_directoryand tag each row withskills_ref. Inrun_from_config, propagateskills_refto rollout results.- Config schema — Add
skillsas an optional top-level config section with apathfield.
Agent Skills Standard Compatibility
The design is compatible with the Agent Skills open standard used by Codex CLI and Claude Code. NeMo Gym provides skill files faithfully following the standard — the agent's native skill runtime handles all skill-specific features (context: fork, disable-model-invocation, allowed-tools, dynamic context injection, etc.). NeMo Gym is not a skill runtime; it manages the skill environment and lets the agent load and interpret skills as it normally would.
Out of Scope
- Modifying existing agent code to add skill-loading capabilities. The agent is held constant; skills are an environment concern.
- A dedicated "skill library resources server" that serves skills via tool endpoints. If needed, this would be a separate issue.
- Direct injection of skill content into
responses_create_paramsfor agents without native skill loading. This is a future enhancement. - Skill authoring, editing, or management tools. This issue covers evaluation/training, not skill creation.
- Multi-variant orchestration CLI (
ng_eval_skills). Users can compare variants by runningng_collect_rolloutsmultiple times with differentskills.pathvalues. A convenience wrapper can be added later.
Acceptance Criteria
- I can specify a
skills.pathin myng_collect_rolloutsconfig pointing at a directory of Agent Skills standard skill directories - My agent can discover and load the skills at that path using its native skill-loading mechanism
- Each rollout result in the output JSONL includes a
skills_refwith metadata (name, description) for the skills that were available - I can compare two skill variants by running
ng_collect_rolloutstwice with differentskills.pathvalues and diffing the output - Invalid or malformed skill directories produce clear error messages telling me what's wrong
- Documentation covers the skills config, expected directory layout, and the workflow for comparing skill variants
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
[-]feat: agent skill evaluation[/-][+]epic: agent skill evaluation[/+][-]epic: agent skill evaluation[/-][+]feat: agent skill evaluation infrastructure[/+]5 remaining items
ffrujeri commentedon Jun 24, 2026
As a general feedback here, we should be careful with "Skills are treated as an environment-level concern in NeMo Gym", because the skills are actually part of the Agent :). I understand what you mean by "skills environment" but maybe we need to find a better term later, like "skills bag/store", "skills runtime".
An associated example to illustrate the point: can the same skill be used in two different environments?
feat: make claude code agent runtime capabilities configurable (#1603)
feat: agent skill evaluation infrastructure (#1605)