Skip to content

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

Closed

Description

@reubenloo

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

Activity

  1. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

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

    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.

  2. corrius commented on Jan 14, 2026

    @corrius

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

  3. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions