Skip to content

fix(skills): resolve skill_view by frontmatter name - #17918

Closed
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:fix/issue-17914-skill-view-frontmatter-name
Closed

fix(skills): resolve skill_view by frontmatter name#17918
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:fix/issue-17914-skill-view-frontmatter-name

Conversation

@liuhao1024

Copy link
Copy Markdown
Contributor

Summary

  • Resolve local skills by the frontmatter name shown in skills_list when it differs from the directory name.
  • Keep existing directory-name and direct-path lookup behavior unchanged.

Root cause

skills_list displays each skill's frontmatter name, but skill_view only searched direct paths and directory names before falling back to legacy flat Markdown files. Copying a listed name like darwin-skill for a skill stored in darwin/SKILL.md therefore returned "Skill not found" even though skill_view("darwin") worked.

Fix

After the existing directory-name search misses, scan skill index files for a platform-compatible frontmatter name that matches the requested identifier and use that SKILL.md.

Related: #5433 / #5784 cover builtin-vs-local classification for the same directory/frontmatter naming mismatch family, but they do not make skill_view accept the name displayed by skills_list.

Regression coverage

  • Added TestSkillView::test_view_accepts_frontmatter_name_when_directory_differs, which creates darwin/SKILL.md with name: darwin-skill, verifies skills_list displays darwin-skill, and then verifies skill_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 -q

Closes #17914

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) labels Apr 30, 2026
@liuhao1024

Copy link
Copy Markdown
Contributor Author

Closing this to avoid a competing duplicate PR since #18337 (automated fix) already resolves issue #17914.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skill_view resolves by directory name but skills_list displays frontmatter name — mismatch causes 'not found'

2 participants