Skip to content

fix(skills): skill_view fallback to frontmatter name lookup (fixes #18872) - #18879

Closed
shellybotmoyer wants to merge 1 commit into
NousResearch:mainfrom
shellybotmoyer:fix/skill-view-frontmatter-name-fallback
Closed

fix(skills): skill_view fallback to frontmatter name lookup (fixes #18872)#18879
shellybotmoyer wants to merge 1 commit into
NousResearch:mainfrom
shellybotmoyer:fix/skill-view-frontmatter-name-fallback

Conversation

@shellybotmoyer

Copy link
Copy Markdown
Contributor

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., directory foo/ with name: bar in SKILL.md), skills_list() returns the frontmatter name ("bar") but skill_view() only looks up by directory name ("foo"). This causes skill_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) uses frontmatter.get("name", skill_dir.name) — frontmatter name takes priority. But skill_view() searches by directory name via found_skill_md.parent.name == name and 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 frontmatter name: field when directory-name lookup fails. This makes skill_view() accept both directory names and frontmatter names, ensuring consistent resolution regardless of which name skills_list() returns.

Testing

  • skills_list() → returns frontmatter name ✓ (unchanged)
  • skill_view("directory_name") → works ✓ (existing path)
  • skill_view("frontmatter_name") → works ✓ (new fallback)
  • Slash commands: /frontmatter_name still works via command map ✓ (unchanged)

…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.
@alt-glitch alt-glitch added type/bug Something isn't working tool/skills Skills system (list, view, manage) P2 Medium — degraded but workaround exists labels May 2, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of closed PR #17918 — same frontmatter name fallback fix for skill_view. Fixes #18872 which is itself a duplicate of #17914.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of closed PR #17918.

@shellybotmoyer

Copy link
Copy Markdown
Contributor Author

Superseded by #18901 which adds the frontmatter-name fallback with proper exclusion filtering

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.

[Bug]: skill_view/skills_list name mismatch breaks agent tool-calling loop — model can't load skills it discovers

2 participants