Repository navigation
skill-creator: don't early-return run_eval detection on non-Skill/Read tools - #1208
Closed
Vaikri-costume wants to merge 1 commit into
Closed
Vaikri-costume wants to merge 1 commit into
Vaikri-costume wants to merge 1 commit into
Conversation
…d tools When Claude uses any exploration tool (Bash, LS, Glob, TodoWrite, etc.) before invoking the target skill, run_single_query() early-returns False on the first non-Skill/non-Read tool_use event, before the detector has a chance to observe the subsequent Skill invocation. This is common: for queries like "audit my latest skill" or "trace q2-next for issues", Claude typically needs Bash/LS/Glob to figure out what the target is before deciding what to invoke. The early-return makes those queries silently false-negative regardless of description quality or skill content. Under the current main code path (writing to .claude/commands/), the early-return is moot because claude -p doesn't surface .claude/commands/ files as skills anyway (#556 architectural root cause; PR #1027 fixes it). But under PR #1027's swap-into-real-SKILL.md mechanism, the skill IS surfaced and Claude can invoke it — yet only queries where the FIRST tool call happens to be Skill or Read would be detected. Queries requiring any exploration are silently false-negative again. Fix: replace the early-return with clearing the in-progress Skill/Read state. The loop's natural terminator (message_stop event or timeout) gives the right answer once it has seen all Claude's actions. Refs #556. Independent of PR #1027 but most visible under it.
Vaikri-costume
deleted the
fix/run-eval-early-return-on-exploration-tools
branch
June 17, 2026 13:05
Author
|
Closing note: PR #1298 (MartinCajiao) addresses the same detection issues this PR targeted, plus the architectural root cause (artifact install path), Windows stream reading, and parallel worker race. It field-scopes the trigger match and is more complete overall. Pointing here for anyone arriving via this thread. |
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.
Summary
run_single_query()inskill-creator/scripts/run_eval.pyearly-returnsFalsethe moment Claude's firsttool_useevent is anything other thanSkillorRead. When the query needs any exploration (Bash/LS/Glob/TodoWrite to figure out which file/skill the user means), the detector misses the eventualSkillinvocation that follows — silent false-negative.This is the third independently-traced bug in #556's code path:
.claude/commands/not surfaced inclaude -pmode — fixed by fix(skill-creator): swap real SKILL.md instead of temp .claude/commands #1027 (john-savepoint)Under the current main code path the early-return is moot (the skill is never surfaced anyway, per #1027's analysis). Under #1027 the skill IS surfaced, Claude can invoke it, but only queries whose first tool call happens to be
SkillorReadare detected. Queries that need any exploration first remain silently false-negative.Change
Replace
return Falsewith state-clear, let the loop's natural terminator (message_stopevent or timeout) decide:```diff
```
Why state-clear (not just remove)
The downstream
content_block_deltahandler at lines 143–148 keys offpending_tool_name. If a Skill tool_use started, accumulated some input deltas, then a non-Skill tool_use started, we'd want the delta processor to stop appending toaccumulated_json(it now belongs to a different tool). Settingpending_tool_name = Noneandaccumulated_json = ""cleanly separates the state per tool_use boundary.Test plan
python -m scripts.run_eval --skill-path <skill> --eval-set <eval.json>against a query Claude would naturally explore for first (e.g. "audit my latest skill") — should now correctly observe the subsequent Skill invocation rather than returning False on the exploration tool.Refs
🤖 Generated with Claude Code