Skill creator run_evals does not honor when_to_use

Author: nitinmutejaCreated Sep 29, 2026Updated Sep 29, 2026

When running evals with skill creator on description optimization, it does not honor attribute 'when_to_use' when trigger conditions are in this attribute.

LOGS

test harness (run_eval.py) creates a temporary command file in .claude/commands/ — not a skill file in .claude/skills/. Here's the problem:

  1. No when_to_use support. The command file format only supports description in frontmatter (lines 56-67 of run_eval.py):

description: |


gap-judge

This skill handles:

Real skills in .claude/skills/ have both description AND when_to_use. The when_to_use field is appended to the description in the skill listing and is the primary trigger
driver — it contains the exact phrases users type ("run gap judge", "compare jarvis with copilot", etc.). The test harness never sees it.

  1. 80+ competing real skills. The claude -p subprocess loads the full project — including all 80+ real .claude/skills/ with their when_to_use fields. The test command file
    (description-only) is competing against the real skill and every other skill for attention. The real gap-judge skill in .claude/skills/gap-judge/ has when_to_use: "run gap
    judge, compare jarvis with copilot..." — so Claude routes to the real one (or neither), not the temporary test command.

  2. Commands ≠ Skills in routing priority. .claude/commands/ and .claude/skills/ may have different routing weights in the Claude Code runtime. Skills with when_to_use get
    their trigger phrases injected into the listing; commands just get description.

Fix would be: modify run_eval.py to create temporary skill files (in .claude/skills/) with proper when_to_use frontmatter, and temporarily rename/hide the real skill during
testing so they don't compete. Or test in an isolated project directory wi Jump to bottom (click) ↓ resent.

Source: anthropics/claude-plugins-official