Skip to content

fix(skills): preserve frontmatter fence variants - #690

Merged
agegr merged 2 commits into
agegr:mainfrom
imshunsuke:fix/skill-frontmatter-fence-variants
Sep 5, 2026
Merged

fix(skills): preserve frontmatter fence variants#690
agegr merged 2 commits into
agegr:mainfrom
imshunsuke:fix/skill-frontmatter-fence-variants

Conversation

@imshunsuke

Copy link
Copy Markdown
Contributor

Summary

  • recognize frontmatter fences accepted by the Pi SDK when they include a UTF-8 BOM, trailing horizontal whitespace, or CR-only line endings
  • keep edits surgical so toggling only changes disable-model-invocation and preserves the original YAML formatting
  • verify through the real skill loader that a BOM-prefixed skill remains loadable across an enable/disable round trip

The previous implementation treated these valid files as if they had no frontmatter and could prepend a second block, causing the loader to lose the skill metadata. This is a focused follow-up to #519 and preserves its original formatting-retention design.

Validation

  • npm test — 846/846 passed
  • node_modules/.bin/tsc --noEmit
  • npm run lint
  • git diff --check

@agegr
agegr merged commit ff63346 into agegr:main Sep 5, 2026
sleepinginsummer pushed a commit to sleepinginsummer/pi-web that referenced this pull request Sep 9, 2026
* fix(skills): preserve frontmatter fence variants

* fix(skills): match SDK closing fence boundaries

---------

Co-authored-by: Alex Yang <agegcn@gmail.com>
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.

2 participants