fix(skills): route show/info/list-filter to local, not model invoke#2988
Merged
code-yeongyu merged 1 commit intomainfrom May 4, 2026
Merged
fix(skills): route show/info/list-filter to local, not model invoke#2988code-yeongyu merged 1 commit intomainfrom
code-yeongyu merged 1 commit intomainfrom
Conversation
`claw skills show <name>`, `claw skills info <name>`, and `claw skills list <filter>` were all falling through to SkillSlashDispatch::Invoke, which spawned a real model session, consumed tokens, and created session files. Root cause: classify_skills_slash_command had no guards for these discovery prefixes; every non-reserved arg became Invoke. Fix: - Add "show", "info" as Local-only bare tokens - Add starts_with guards for "show ", "info ", "list " args - handle_skills_slash_command: filter skill list by name/substring for show/info/list-filter paths (no model call, no session) - handle_skills_slash_command_json: same structured filtering Test: skills_show_and_list_filter_do_not_invoke_model asserts classify_skills_slash_command returns Local for all discovery patterns and still returns Invoke for bare skill names. Pinpoint: ROADMAP #502
e79b718 to
52f2ba6
Compare
Collaborator
Author
|
QA note: |
code-yeongyu
added a commit
that referenced
this pull request
May 4, 2026
resumed_status_command_emits_structured_json_when_requested was reading the real ~/.claw/settings.json, causing loaded_config_files to be 1 instead of the expected 0 on machines with user config present. Root cause: unlike other tests (e.g. resumed_config_command_loads_settings_files), this test did not pass an isolated CLAW_CONFIG_HOME env var to run_claw, so claw fell back to the real HOME and loaded the developer's settings file. Fix: create a temp config-home dir and pass it as CLAW_CONFIG_HOME via run_claw_with_env. This gives the assertion a clean 0-file baseline. Unblocks PRs #2973, #2988, #2990 which all failed this same test on main. Ref: ROADMAP #65
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
claw skills show plan,claw skills describe plan,claw skills list plan,claw skills info planwere falling through toSkillSlashDispatch::Invoke, spawning real model sessions and consuming tokens.Root cause:
classify_skills_slash_commandhad no guards for discovery prefixes — every non-reserved arg becameInvoke("$<arg>").Fix
"show" | "info" | "describe"as Local-only bare tokensstarts_withguards for"show ","info ","list ","describe "→ Localhandle_skills_slash_command+_json: filter skill list by name for show/info/describe, by substring for list — no model call, no session createdTest
skills_show_and_list_filter_do_not_invoke_modelasserts all discovery patterns returnLocal, and bare skill names still dispatch toInvoke.Pinpoints: ROADMAP #502, #503