Expand description
Phase-1 plugin SKILL ingestion: discovery, namespacing, and body resolution (issue #3539).
Why: a plugin’s skills/<name>/SKILL.md files are the exact same
progressive-disclosure format crate::skills already parses for project
skills — cheap frontmatter (name/description) at discovery time, the
full body only on demand. This module adds namespacing
(<plugin>:<name>) on top; it deliberately does NOT interact with
crate::skills::discover_skill_metadata’s bundled/project
whole-catalog-replacement threshold (PR #3465) — plugin skills are an
independent additive tier that is listed and resolved regardless of
which side of that threshold a project’s own .claude/skills/ falls on
(#3539’s locked precedence-interaction requirement).
What: discover_plugin_skills lists every plugin skill’s cheap
metadata, namespaced (used by skills::protocol::skills_list’s plugin
tier and skills::FsSkillResolver’s cached catalog).
resolve_plugin_skill_body lazily loads one namespaced skill’s full
body on demand (used by skills::FsSkillResolver::resolve).
Test: tests::* — discovery finds and namespaces skills, a skill
directory without SKILL.md is skipped, body resolution finds/misses a
namespaced name, a symlinked <name>/SKILL.md is rejected at both the
discovery and resolution paths (issue #3547 CRITICAL 5).
Functions§
- discover_
plugin_ skills - List every plugin skill’s cheap metadata across every discovered plugin,
namespaced
<plugin>:<local-name>. - resolve_
plugin_ skill_ body - Lazily load one namespaced plugin skill’s full body (frontmatter
stripped), or
Nonewhen the plugin or the skill is unknown.