Skip to content

Conversation

@csuzngjh
Copy link

Problem

The application completely crashes and stops sending messages if a single SKILL.md file contains malformed YAML frontmatter. This happens because the exception in ConfigMarkdown.parse is unhandled during Skill.state initialization.

Solution

Wrapped ConfigMarkdown.parse in a try-catch block within the addSkill function. Now, malformed skill files are logged as warnings and skipped, allowing the rest of the application to function normally.

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #7684: fix(opencode): gracefully handle malformed skill YAML frontmatter

This PR appears to address the exact same issue - handling malformed YAML frontmatter in skill files gracefully to prevent app crashes. You should check if PR #7684 is already merged or if it's still open, as it may be the same fix or a related solution to the problem described in PR #8582.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant