fix(skills): resolve skill_view by frontmatter name - #17918
Closed
liuhao1024 wants to merge 1 commit into
Closed
Conversation
2 tasks
Contributor
Author
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.
Summary
nameshown inskills_listwhen it differs from the directory name.Root cause
skills_listdisplays each skill's frontmattername, butskill_viewonly searched direct paths and directory names before falling back to legacy flat Markdown files. Copying a listed name likedarwin-skillfor a skill stored indarwin/SKILL.mdtherefore returned "Skill not found" even thoughskill_view("darwin")worked.Fix
After the existing directory-name search misses, scan skill index files for a platform-compatible frontmatter
namethat matches the requested identifier and use thatSKILL.md.Related: #5433 / #5784 cover builtin-vs-local classification for the same directory/frontmatter naming mismatch family, but they do not make
skill_viewaccept the name displayed byskills_list.Regression coverage
TestSkillView::test_view_accepts_frontmatter_name_when_directory_differs, which createsdarwin/SKILL.mdwithname: darwin-skill, verifiesskills_listdisplaysdarwin-skill, and then verifiesskill_view("darwin-skill")loads the skill.Testing
scripts/run_tests.sh tests/tools/test_skills_tool.py::TestSkillView::test_view_accepts_frontmatter_name_when_directory_differs -q(fails before fix, passes after)scripts/run_tests.sh tests/tools/test_skills_tool.py -qCloses #17914