Skip to content

fix(skill): flatten SKILL.md metadata for OpenCode compatibility (#439)#483

Open
nankingjing wants to merge 1 commit into
Panniantong:mainfrom
nankingjing:fix/opencode-skill-frontmatter-compat
Open

fix(skill): flatten SKILL.md metadata for OpenCode compatibility (#439)#483
nankingjing wants to merge 1 commit into
Panniantong:mainfrom
nankingjing:fix/opencode-skill-frontmatter-compat

Conversation

@nankingjing

@nankingjing nankingjing commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Fixes #439 — "Unknown text label when installed on Opencode".

Root Cause

Both SKILL.md and SKILL_en.md had a nested metadata structure:

metadata:
  openclaw:
    homepage: https://github.com/Panniantong/Agent-Reach

OpenCode expects metadata to be Record<string, string> (flat key-value pairs). The nested structure causes OpenCode frontmatter parsing to fail, resulting in the skill name rendering as "Unknown" in the OpenCode TUI.

Changes

  1. agent_reach/skill/SKILL.md: Flatten metadata.openclaw.homepage to a dot-notation key
  2. agent_reach/skill/SKILL_en.md: Same fix
  3. tests/test_channel_contracts.py: Fix test_youtube_warns_when_node_only_and_no_config which used os.path.expanduser mock that is not called on Windows (where APPDATA is used instead). Changed to mock get_ytdlp_config_path directly for cross-platform correctness.

Test Results

====================== 185 passed, 11 skipped in 48.29s =======================

All tests pass cleanly.

Panniantong#439)

- Change metadata.openclaw.homepage to flat key:value (was nested object),
  which OpenCode rejects because it expects Record<string,string>. The
  nested structure caused the skill name to render as Unknown in the
  OpenCode TUI.

- Fix test_youtube_warns_when_node_only_and_no_config test to mock
  get_ytdlp_config_path directly instead of os.path.expanduser, which
  is not called on Windows (APPDATA-based path lookup).

@moxxxskaifa moxxxskaifa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 行小改,SKILL.md 扁平化元数据兼容 OpenCode。修复 #439。 LGTM!

@nankingjing

Copy link
Copy Markdown
Author

您好 @moxxxskaifa,这个 PR 已经 approved,是否可以合并了?谢谢!

@nankingjing

Copy link
Copy Markdown
Author

Hi @moxxxskaifa, this PR has been approved — could you merge it when you have a moment? Thanks!

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.

[BUG] Unknown text label when installed on Opencode | [06-27-2026]

2 participants