Crash on SKILL.md files with non-OpenCode frontmatter schema #4583

Closed
opened 2026-02-16 17:44:40 -05:00 by yindo · 3 comments
Owner

Originally created by @reubenloo on GitHub (Jan 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

OpenCode crashes when it discovers .claude/skills/*/SKILL.md files that have frontmatter fields that don't match OpenCode's expected schema.

Steps to Reproduce

  1. Have a project with Claude Code skills in .claude/skills/*/SKILL.md
  2. These SKILL.md files have frontmatter like:
---
name: task-dispatch
skill_type: framework
description: Some description here
---
  1. Run opencode in the project directory
  2. Type anything and press enter

Expected Behavior

OpenCode should either:

  • Skip SKILL.md files that don't match its expected frontmatter schema
  • Provide a config option to disable skill discovery entirely
  • Log a warning and continue instead of crashing

Actual Behavior

ConfigFrontmatterError: ConfigFrontmatterError
  path: "/path/to/.claude/skills/task-dispatch/SKILL.md",

[ERROR] Error: Unexpected end of JSON input
    SyntaxError: Unexpected end of JSON input

The crash occurs on every input, making OpenCode unusable in projects with Claude Code skills.

Environment

  • OpenCode version: 1.1.10
  • OS: macOS (Darwin 24.6.0)
  • Installed via: Homebrew

Attempted Workarounds (none worked)

  • Adding .claude/ to watcher.ignore in opencode.json
  • Setting "tools": {"skill*": false} in opencode.json
  • Setting "instructions": [] in opencode.json
  • Creating a .ignore file with .claude/ pattern

The skill scanning appears to happen at startup before any config is read.

Suggested Fix

  1. Wrap the frontmatter parsing in a try-catch and skip files that fail to parse
  2. Add a config option like "skills": { "discovery": false } to disable skill scanning entirely
  3. Respect the watcher.ignore patterns during skill discovery
Originally created by @reubenloo on GitHub (Jan 10, 2026). Originally assigned to: @rekram1-node on GitHub. ## Description OpenCode crashes when it discovers `.claude/skills/*/SKILL.md` files that have frontmatter fields that don't match OpenCode's expected schema. ## Steps to Reproduce 1. Have a project with Claude Code skills in `.claude/skills/*/SKILL.md` 2. These SKILL.md files have frontmatter like: ```yaml --- name: task-dispatch skill_type: framework description: Some description here --- ``` 3. Run `opencode` in the project directory 4. Type anything and press enter ## Expected Behavior OpenCode should either: - Skip SKILL.md files that don't match its expected frontmatter schema - Provide a config option to disable skill discovery entirely - Log a warning and continue instead of crashing ## Actual Behavior ``` ConfigFrontmatterError: ConfigFrontmatterError path: "/path/to/.claude/skills/task-dispatch/SKILL.md", [ERROR] Error: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input ``` The crash occurs on every input, making OpenCode unusable in projects with Claude Code skills. ## Environment - OpenCode version: 1.1.10 - OS: macOS (Darwin 24.6.0) - Installed via: Homebrew ## Attempted Workarounds (none worked) - Adding `.claude/` to `watcher.ignore` in `opencode.json` - Setting `"tools": {"skill*": false}` in `opencode.json` - Setting `"instructions": []` in `opencode.json` - Creating a `.ignore` file with `.claude/` pattern The skill scanning appears to happen at startup before any config is read. ## Suggested Fix 1. Wrap the frontmatter parsing in a try-catch and skip files that fail to parse 2. Add a config option like `"skills": { "discovery": false }` to disable skill scanning entirely 3. Respect the `watcher.ignore` patterns during skill discovery
yindo closed this issue 2026-02-16 17:44:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7022: opencode scans claude code's SKILL files and sometimes failed to parse YAML
  • #5991: Bug: SkillInvalidError during frontmatter parsing in SKILL.md (closed)
  • #6858: YAML parser crashes on ": " pattern in skill description (closed)

These issues all involve OpenCode crashing when encountering SKILL.md files with unexpected or problematic frontmatter. Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #7022: opencode scans claude code's SKILL files and sometimes failed to parse YAML - #5991: Bug: `SkillInvalidError` during frontmatter parsing in `SKILL.md` (closed) - #6858: YAML parser crashes on ": " pattern in skill description (closed) These issues all involve OpenCode crashing when encountering SKILL.md files with unexpected or problematic frontmatter. Feel free to ignore if your specific case differs from these.
Author
Owner

@corrius commented on GitHub (Jan 14, 2026):

@rekram1-node can someone look into this? It makes migrating from Claude hard

@corrius commented on GitHub (Jan 14, 2026): @rekram1-node can someone look into this? It makes migrating from Claude hard
Author
Owner

@rekram1-node commented on GitHub (Jan 15, 2026):

This should be fixed in next release if it isn't already

@rekram1-node commented on GitHub (Jan 15, 2026): This should be fixed in next release if it isn't already
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4583