fix: preserve YAML frontmatter in skill fill#42
Open
LorranHippolyte wants to merge 1 commit intovinilana:mainfrom
Open
fix: preserve YAML frontmatter in skill
fill#42LorranHippolyte wants to merge 1 commit intovinilana:mainfrom
LorranHippolyte wants to merge 1 commit intovinilana:mainfrom
Conversation
skillFillService was writing the raw LLM output directly to SKILL.md, discarding the original YAML frontmatter (type, skillSlug, phases, etc.). This caused MCP skill list to return 0 skills since discovery relies on the frontmatter to identify skill files. Fix: extract frontmatter before calling the LLM, strip any frontmatter from the generated output, then reconstruct the file with the original metadata and status updated to 'filled'. Fixes vinilana#28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
skill filloverwritesSKILL.mdfiles with the raw LLM output, completely discarding the original YAML frontmatter (type,skillSlug,phases, etc.).After filling, the MCP
skill listreturns 0 skills because skill discovery relies on the frontmatter to identify files.Fixes #28
Root cause
skillFillService.tswas writingresult.textdirectly to disk with no frontmatter handling:Fix
src/services/fill/skillFillService.tsSKILL.mdbefore calling the LLMremoveFrontMatter)status: filledAll utilities (
parseFrontMatter,removeFrontMatter,addFrontMatter) were already present insrc/utils/frontMatter.ts— no new dependencies added.Testing
21 unit tests passing. Pre-existing build failures related to
tree-sittertype declarations are unrelated to this change.