Skip to content

fix(skills): agentskills.io spec compliance for tags/platforms frontmatter (rebased)#31241

Closed
alaamohanad169-ship-it wants to merge 5 commits into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/skills-spec-compliance-clean
Closed

fix(skills): agentskills.io spec compliance for tags/platforms frontmatter (rebased)#31241
alaamohanad169-ship-it wants to merge 5 commits into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/skills-spec-compliance-clean

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Summary

Makes Hermes skill loading backward-compatible with the agentskills.io spec (adopted by Anthropic, NVIDIA, 40+ clients). Skills with tags and platforms under metadata: now load correctly alongside the existing top-level format.

Problem

Issue #30080: Skills using the agentskills.io spec (fields under metadata: block) were not recognized by Hermes.

Changes

  • agent/prompt_builder.py:929 — fallback to metadata.platforms
  • agent/skill_utils.py:140 — same fallback for platform matching
  • tools/skills_tool.py:1277 — fallback to metadata.tags and metadata.related_skills
  • tests/agent/test_skill_utils.py — 6 new tests + resolved merge conflict with Termux platform tests

Fully backward-compatible. Fixes #30080.

Note: Clean rebase of previously closed #30978, cherry-picked onto latest main.

…ontmatter

The agentskills.io spec (adopted by Anthropic, NVIDIA, 40+ clients) places
agent-specific fields under metadata: instead of top-level. This makes Hermes
skill loading backward-compatible with both formats:

- Also read platforms from metadata.platforms (fallback from top-level)
- Also read tags from metadata.tags (fallback from metadata.hermes.tags)
- Also read related_skills from metadata (fallback from top-level)

All 3 loader sites updated:
- agent/prompt_builder.py:929 — platforms list building
- agent/skill_utils.py:140 — platform matching
- tools/skills_tool.py:1277 — tags/related_skills parsing

Fully backward-compatible: existing skills with top-level fields work unchanged.

Fixes NousResearch#30080
6 new tests:
- test_platforms_top_level_still_works: legacy top-level platforms field
- test_platforms_under_metadata_fallback: metadata.platforms fallback
- test_metadata_platforms_fallback_when_top_level_absent: verified fallback with mock
- test_metadata_tags_fallback_in_parse_frontmatter: metadata.tags in frontmatter
- test_tags_top_level_still_read_by_skill_manage: top-level tags parsing
- test_tags_metadata_fallback: _parse_tags with agentskills.io format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder 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.

Strict agentskills.io spec compliance: move tags/platforms under metadata in skill frontmatter

2 participants