Skip to content

fix(#343): add regex fallback for YAML-unfriendly SKILL.md frontmatter#347

Merged
Kewton merged 1 commit intodevelopfrom
feature/343-worktree
Feb 22, 2026
Merged

fix(#343): add regex fallback for YAML-unfriendly SKILL.md frontmatter#347
Kewton merged 1 commit intodevelopfrom
feature/343-worktree

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 22, 2026

Summary

  • SKILL.mdのargument-hintフィールドにYAML特殊文字(:, [])がクォートなしで含まれている場合、gray-matterのYAMLパーサーがYAMLExceptionを投げ、該当スキルがサイレントに除外されるバグを修正
  • extractFrontmatterFields()を正規表現ベースのフォールバックとして追加し、YAML解析失敗時にnamedescriptionを抽出
  • release/SKILL.mdrelease-post/SKILL.mdが正常に読み込まれるようになった

Changes

  • src/lib/slash-commands.ts: parseSkillFile()にtry-catchフォールバック追加、extractFrontmatterFields()関数追加
  • tests/unit/slash-commands.test.ts: フォールバックパーサーのテスト6件追加

Test plan

  • ユニットテスト 3749/3749 パス
  • TypeScriptエラー 0件
  • ESLintエラー 0件
  • 実際のSKILL.mdファイル(rebuild, release, release-post)が全て読み込まれることを確認

🤖 Generated with Claude Code

…frontmatter

SKILL.md files with unquoted YAML special characters (colons, brackets)
in fields like argument-hint cause gray-matter's js-yaml parser to throw
YAMLException, silently dropping those skills. Add extractFrontmatterFields()
as a regex-based fallback to extract name and description when full YAML
parsing fails. Fixes skills like release and release-post not appearing
in the slash command selector.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Kewton Kewton merged commit 1e3b8ab into develop Feb 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant