feat: categorize skills by metadata.agent field from frontmatter#524
Merged
Conversation
- Remove hardcoded SKILL_CLASSIFICATIONS map - Read agent classification from skill frontmatter metadata - Default to orchestrator for skills without agent metadata - Sub-agent-only skills must explicitly declare agent: subagent
The extractFrontmatter function only parsed the first YAML block (parts[1]), ignoring the metadata block in parts[2]. SKILL.md files use a three-part format where agent classification lives in the second block. Now both blocks are parsed and merged.
The second YAML block in SKILL.md files uses a 'metadata:' wrapper (e.g., 'metadata:\n agent: subagent'). The previous merge logic spread the entire parsed block into frontmatter, nesting 'agent' under metadata.metadata.agent instead of at the top level. This caused filterSkillPaths() in deepAgents.js to read undefined for skill.metadata.agent, falling through to the 'orchestrator' default and leaking subagent skills into the orchestrator's skill list. Fix: when merging the metadata block, check for and flatten the metadata: wrapper so agent lands at the top level of the merged frontmatter.
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.
Description
Replace the hardcoded SKILL_CLASSIFICATIONS map with dynamic skill classification based on the
metadata.agentfield from each skill's SKILL.md frontmatter (per the agentskills.io spec). Skills without explicit agent metadata default toorchestrator.Type of Change
Testing
N/A — existing tests cover the skill discovery and classification pipeline.
Coverage
Checklist
npm run lintpassesCommits
feat: categorize skills by metadata.agent field from frontmatter— Remove hardcoded SKILL_CLASSIFICATIONS map, read agent classification from skill frontmatter metadata, default to orchestrator for skills without agent metadatachore: add orchestrator agent metadata to reflection skill— Add orchestrator agent metadata to reflection skill frontmatter