fix(skills): emit OpenCode-recognized SKILL.md frontmatter fields - #1800
Merged
dyoshikawa merged 2 commits intoJun 9, 2026
Merged
Conversation
OpenCode's SKILL.md parser recognizes exactly five frontmatter fields: name, description, license, compatibility, and metadata. The OpenCode skill adapter previously emitted only allowed-tools (ignored by OpenCode) and dropped the three recognized optional fields. Map license/compatibility/metadata into the generated SKILL.md, sourcing each from the opencode section first and falling back to the top-level rulesync frontmatter. allowed-tools is kept as a lossless round-trip passthrough even though OpenCode ignores it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an opencode: section to the skill frontmatter reference (license, compatibility, metadata, and the allowed-tools passthrough), keeping the Each File Format docs in sync with the new mapping (review finding). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dyoshikawa
deleted the
resolve-scrap-issue-1787-opencode-skill-frontmatter
branch
June 9, 2026 16:50
Owner
Author
|
@dyoshikawa Thank you! |
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.
Summary
OpenCode's
SKILL.mdparser recognizes exactly five frontmatter fields:name,description,license,compatibility, andmetadata(verified against https://opencode.ai/docs/skills.md). Unknown fields such asallowed-toolsare ignored.rulesync previously emitted only
allowed-tools(ignored by OpenCode) and dropped the three recognized optional fields. This PR mapslicense/compatibility/metadatainto the generatedSKILL.md.Changes
rulesync-skill.ts: extend theopencodesection schema and input type withlicense/compatibility/metadata.opencode-skill.ts:license/compatibility/metadatatoOpenCodeSkillFrontmatterSchema; keepallowed-toolsas a lossless round-trip passthrough with a comment noting OpenCode ignores it.fromRulesyncSkill: emit the three fields, preferring theopencodesection value and falling back to top-level rulesync frontmatter (read safely from the loose object). Only defined keys are emitted.toRulesyncSkill: carry the fields (andallowed-tools) back into theopencodesection, only attaching it when non-empty.license:reaches the generated frontmatter) and section-over-top-level precedence.Notes
opencodesection value wins; otherwise top-level value is used.allowed-toolsis retained only for lossless round-trip (OpenCode does not recognize it).Closes #1787
#1787
🤖 Generated with Claude Code