Skip to content

fix: resolve SKILL.md loading failure in Claude Code global scope (issue #5)#21

Open
cjxzdzh wants to merge 1 commit into
op7418:mainfrom
cjxzdzh:fix/skillmd-frontmatter-issues
Open

fix: resolve SKILL.md loading failure in Claude Code global scope (issue #5)#21
cjxzdzh wants to merge 1 commit into
op7418:mainfrom
cjxzdzh:fix/skillmd-frontmatter-issues

Conversation

@cjxzdzh

@cjxzdzh cjxzdzh commented May 18, 2026

Copy link
Copy Markdown

Root Cause Analysis

The SKILL.md failed to load when placed in Claude Code's global skills directory on Windows 10 + OpenCode (issue #5). Investigation revealed two classes of issues:

1. Non-standard frontmatter fields

  • Removed: allowed-tools — not part of the Hermes skill schema
  • Missing: version, author, license, platforms, metadata.hermes.tags — all required by the hermes-agent skill schema

2. YAML document-separator ambiguity

The Markdown body used --- as horizontal rules (section separators). These --- lines were interpreted as YAML document separators (--- starts a new YAML document in a YAML stream), causing "expected a single document in the stream" errors when the file was parsed as a full YAML stream.

Fix: Replaced all body --- horizontal rules with *** (also renders as a horizontal rule in Markdown) to avoid YAML document-separator confusion.

Changes

  1. Removed non-standard allowed-tools field
  2. Added standard fields: version: 1.0.0, author, license: MIT, platforms: [linux, macos, windows]
  3. Restructured metadata to use hermes-standard metadata.hermes.tags and metadata.hermes.related_skills
  4. Replaced all Markdown HR --- with *** in the body

Verification

  • Frontmatter parses correctly with PyYAML safe_load()
  • All required fields present: name, description (147 chars, within 1024 limit)
  • UTF-8 without BOM, LF line endings
  • No null bytes or encoding issues

Closes #5

Root causes fixed:
1. Removed non-standard 'allowed-tools' field not in Hermes skill schema
2. Added missing standard frontmatter fields: version, author, license, platforms
3. Restructured metadata to use hermes-standard metadata.hermes.tags structure
4. Replaced Markdown HR '---' with '***' to avoid YAML document-separator
   confusion when parsed by non-frontmatter-aware loaders

These changes make the SKILL.md compliant with hermes-agent skill schema
and resolve the loading failure reported in issue op7418#5 on Windows 10 + OpenCode.
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