fix(skills): add frontmatter-name fallback in skill_view to resolve name mismatch - #18901
Closed
shellybotmoyer wants to merge 1 commit into
Closed
fix(skills): add frontmatter-name fallback in skill_view to resolve name mismatch#18901shellybotmoyer wants to merge 1 commit into
shellybotmoyer wants to merge 1 commit into
Conversation
…ame mismatch When skills_list reports a frontmatter name that differs from the directory name, skill_view now falls back to matching the frontmatter name when directory-name lookup fails. Fixes the tool-calling loop where models discover skill bar but can only load skill foo. Fixes NousResearch#18872.
Collaborator
12 tasks
This was referenced May 19, 2026
Contributor
|
This appears to be implemented on current Automated hermes-sweeper review evidence:
Thanks for the original fix and the discussion noting the duplicate shape here. |
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
Fixes the skill discovery→loading loop where
skills_listreports a frontmatternamebutskill_viewcan only resolve by directory name, making mismatched skills silently undiscoverable by the agent.Problem
When a skill's frontmatter
namediffers from its directory name (e.g., directoryfoobut frontmattername: bar):skills_list→ returns"bar"(from frontmatter)skill_view("bar")→"Skill 'bar' not found."(resolves by directory name)The agent's tool chain contradicts itself silently. The model can't self-correct because it has no way to know
skill_viewneeds a different identifier than whatskills_listreported.Fix
Added a frontmatter-name fallback in
skill_view(): when directory-name lookup fails (steps 1-3), the function now iterates allSKILL.mdfiles and checks if the frontmatternamefield matches. If found, uses that skill's directory path.This is backwards-compatible:
skill_view("foo")still works (directory name lookup, existing behavior)skill_view("bar")now works (frontmatter name fallback, new behavior)skills_listoutputVerification
skills_list→ showsbarskill_view("bar")→ loads the skill (was: "not found")skill_view("foo")→ still loads the skill (unchanged)Fixes #18872