fix(skills): skill_view fallback to frontmatter name lookup (fixes #18872) - #18879
Closed
shellybotmoyer wants to merge 1 commit into
Closed
fix(skills): skill_view fallback to frontmatter name lookup (fixes #18872)#18879shellybotmoyer wants to merge 1 commit into
shellybotmoyer wants to merge 1 commit into
Conversation
…usResearch#18872) When skills_list returns a frontmatter name that differs from the directory name, skill_view now falls back to matching by frontmatter name after directory-name lookup fails. This prevents the agent tool-calling loop from breaking when the model tries to load a skill by the name skills_list reported.
Collaborator
Collaborator
|
Duplicate of closed PR #17918. |
Contributor
Author
|
Superseded by #18901 which adds the frontmatter-name fallback with proper exclusion filtering |
This was referenced May 19, 2026
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.
Fix: skill_view/skills_list name mismatch breaks agent tool-calling loop
Fixes #18872
Problem
When a skill's directory name differs from its frontmatter
name:field (e.g., directoryfoo/withname: barinSKILL.md),skills_list()returns the frontmatter name ("bar") butskill_view()only looks up by directory name ("foo"). This causesskill_view("bar")→"Skill 'bar' not found", breaking the agent's tool-calling loop when it tries to load a discovered skill.Root Cause
_find_all_skills()(line 588) usesfrontmatter.get("name", skill_dir.name)— frontmatter name takes priority. Butskill_view()searches by directory name viafound_skill_md.parent.name == nameand direct path matching, with no frontmatter name fallback.Fix
Add a fallback search in
skill_view()that scans all skill SKILL.md files and matches by frontmattername:field when directory-name lookup fails. This makesskill_view()accept both directory names and frontmatter names, ensuring consistent resolution regardless of which nameskills_list()returns.Testing
skills_list()→ returns frontmatter name ✓ (unchanged)skill_view("directory_name")→ works ✓ (existing path)skill_view("frontmatter_name")→ works ✓ (new fallback)/frontmatter_namestill works via command map ✓ (unchanged)