Skip to content

feat: categorize skills by metadata.agent field from frontmatter#524

Merged
avoidwork merged 11 commits into
mainfrom
feat/skill-agent-metadata
Jul 4, 2026
Merged

feat: categorize skills by metadata.agent field from frontmatter#524
avoidwork merged 11 commits into
mainfrom
feat/skill-agent-metadata

Conversation

@avoidwork

@avoidwork avoidwork commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Description

Replace the hardcoded SKILL_CLASSIFICATIONS map with dynamic skill classification based on the metadata.agent field from each skill's SKILL.md frontmatter (per the agentskills.io spec). Skills without explicit agent metadata default to orchestrator.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional change)
  • Performance improvement
  • CI / build / tooling

Testing

N/A — existing tests cover the skill discovery and classification pipeline.

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Commits

  • 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 metadata
  • chore: add orchestrator agent metadata to reflection skill — Add orchestrator agent metadata to reflection skill frontmatter

avoidwork added 11 commits July 3, 2026 15:17
- 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.
@avoidwork avoidwork merged commit 2ab4c49 into main Jul 4, 2026
2 checks passed
@avoidwork avoidwork deleted the feat/skill-agent-metadata branch July 4, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant