-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Description
PLEASE NOTE: This worked fine 12 hours ago, prior to one of your latest updates... I have even removed that skill and then the next skill has issues.... claude works fine.
An unhandled or validation-driven SkillInvalidError is triggered when loading a skill. The error occurs during the frontmatter parsing stage in src/skill/skill.ts. It appears that the SKILL.md file for the pair-programming skill contains frontmatter that does not conform to the Frontmatter schema (likely a Zod safeParse failure).
Error Details
- Error Type:
SkillInvalidError - Location:
src/skill/skill.ts:110:13 - Affected File:
~/.claude/skills/pair-programming/SKILL.md - Context:
Frontmatter.safeParse(md.data)returnedsuccess: false.
Stack Trace / Logs
108 | const parsed = Frontmatter.safeParse(md.data)
109 | if (!parsed.success) {
110 | throw new InvalidError({
^
SkillInvalidError: SkillInvalidError
data: {
path: "/Users/{project_name}/PycharmProjects/lexgenius/.claude/skills/pair-programming/SKILL.md",
issues: [
[Object ...] // Validation issues in the markdown frontmatter
],
},
at load (src/skill/skill.ts:110:13)Steps to Reproduce
- Run the
opencode. - The system attempts to load the
pair-programmingskill from.claude/skills/pair-programming/SKILL.md. - The loader fails because the markdown frontmatter (YAML) is either missing required fields or has incorrect data types.
- This worked PRIOR to opencode's last update.
Possible Causes
- Malformed YAML: The frontmatter in
SKILL.mdhas syntax errors. - Schema Mismatch: The
FrontmatterZod schema in the codebase was updated, but theSKILL.mdfile was not updated to match. - Empty Fields: Required fields like
name,description, orversionmight be missing.
Proposed Solution
- Inspect the
issuesarray in the console log to identify specifically which field in theSKILL.mdfrontmatter is failing validation. - Update
SKILL.mdto match the required schema. - Add better error logging in
src/skill/skill.tsto print the specific Zod validation errors (formatted) instead of just[Object ...].
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working