Skip to content

fix(skill_eval): add conflict guard and normalize descriptionOverride#28

Open
mxl wants to merge 1 commit into
antongulin:mainfrom
mxl:fix/skill-eval-conflict-guard
Open

fix(skill_eval): add conflict guard and normalize descriptionOverride#28
mxl wants to merge 1 commit into
antongulin:mainfrom
mxl:fix/skill-eval-conflict-guard

Conversation

@mxl

@mxl mxl commented Jun 22, 2026

Copy link
Copy Markdown

Problem

skill_eval creates a synthetic skill named <skill-name>-skill-<id> and only counts invocations of that exact temporary name as triggered. If a real skill with the base name is already visible to OpenCode (via skills.paths, installed in ~/.config/opencode/skills/, or project-level .opencode/skills/), the model may load the real skill instead of the synthetic one, producing false negatives — the eval reports trigger_rate: 0 even though the skill description is good.

Additionally, passing an empty string as descriptionOverride would override the SKILL.md description with "", which is almost never intentional.

Changes

  1. plugin/lib/run-eval.ts: Add assertNoInstalledSkillConflict() that runs opencode debug skill and throws a clear error if the skill name appears in the installed skills list.

  2. plugin/skill-creator.ts:

    • Add normalizeDescriptionOverride() — treats empty/whitespace-only strings as undefined so the SKILL.md description is used.
    • Call assertNoInstalledSkillConflict() before both skill_eval and skill_optimize_loop execution.
  3. plugin/skill/SKILL.md: Add a "Trigger Eval Preflight" section documenting the issue and the automatic guard.

Testing

  • Build passes (npm run build)
  • Verified locally that removing the installed skill from skills.paths resolves the false-negative issue

- Add assertNoInstalledSkillConflict() to detect when a skill with the
  same base name is already available to opencode, which causes false
  negatives in trigger eval (synthetic skill never gets triggered).
- Normalize descriptionOverride: treat empty string as omitted so
  callers can't accidentally override with .
- Add Trigger Eval Preflight section to SKILL.md documenting the issue.
- Apply guards in both skill_eval and skill_optimize_loop tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant