fix(skill-creator): run_eval trigger detection misses real skill name and bails on first non-Skill tool#1323
Open
Polluelo978 wants to merge 1 commit into
Open
Conversation
…n-Skill tool in run_eval run_eval.py::run_single_query failed to detect skill triggering, making run_loop.py report recall=0% for every should-trigger query. With all candidates tied at 0, the loop returns the original description and never actually optimizes. Two root causes in the stream detection: 1. Only the registered temp command name (clean_name) was matched, but an installed skill fires under its real name (skill_name) -> never matched. 2. The first non-Skill/Read tool_use caused an immediate `return False`, missing a later Skill/Read call (real runs often call Bash/WebFetch first). Fix: - Match skill_name in addition to clean_name (streaming path and fallback). - Don't return False on the first non-Skill/Read tool; reset pending state and keep scanning until type == "result". Verified on a skill + eval set (3 runs/query, --model claude-sonnet-4-6 --timeout 120): recall 0% -> 100%, precision 100%, held-out test 8/8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/run_eval.py::run_single_queryfails to detect that a skill triggered, causing the description-optimization loop (run_loop.py) to report recall=0% for every should-trigger query. With all candidates tied at 0, the loop just returns the original description and never actually optimizes.Two root causes in the stream detection:
{skill}-skill-{uuid}and only checks whether that random name (clean_name) appears in the tool input. But an installed skill fires under its real name (e.g.cve-intel), so the random name never matches -> always False.Bash/WebFetch/etc. before consulting the skill. Thecontent_block_starthandler doesreturn Falseon the first such tool, missing a later Skill/Read call.Fix
skill_namein addition to the registeredclean_name, in both the streaming path and the full-assistant-message fallback.type == "result".Early-return on a positive match keeps positives fast; negatives run to
result(short Q&A), bounded by--timeout.Evidence (same skill + eval set, 3 runs/query,
--model claude-sonnet-4-6 --timeout 120)After the fix the loop can measure description quality as intended (held-out test 8/8).
Notes
clean_namematching is preserved;skill_namematching is additive.skills/skill-creator/scripts/run_eval.py.