fix(skills): match closing frontmatter delimiter on its own line - #3739
Merged
mnriem merged 1 commit intoAug 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens skills frontmatter parsing so embedded --- values do not truncate metadata or spill into the body.
Changes:
- Adds line-anchored closing-delimiter detection.
- Adds regression tests for dashed descriptions and body integrity.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/base.py |
Hardens skills frontmatter parsing and stripping. |
tests/integrations/test_skill_frontmatter_quoting.py |
Tests embedded-dash handling. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Medium
mnriem
requested changes
Jul 27, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
Please address Copilot feedback
Collaborator
|
Please pull in latest changes from upstream/main to resolve security audit |
Contributor
Author
|
Branch is already up to date with upstream/main. No conflicts found. Ready for review. |
Collaborator
|
Dependency audit failed so please rebase on main |
Hermes overrides SkillsIntegration.setup() with its own copy of the
frontmatter parse and body strip, and Kimi's _is_speckit_generated_skill()
parses frontmatter independently, so all three carried the same
split("---", 2) bug the base class just fixed. A description such as
"Separate sections with --- markers" truncates the parsed frontmatter at the
embedded marker, dropping later keys and spilling the remainder into the
body; for Kimi that means a Speckit-generated skill is no longer recognized
on teardown and gets left behind.
Scan for a closing "---" on its own line instead. The body slice keeps
whatever trails the marker so output stays byte-for-byte identical for
well-formed templates.
Quratulain-bilal
force-pushed
the
fix/skill-setup-frontmatter-dashes
branch
from
August 5, 2026 14:43
b530d71 to
cbc76e6
Compare
Contributor
Author
|
done @mnriem . |
mnriem
self-requested a review
August 5, 2026 16:06
mnriem
approved these changes
Aug 5, 2026
Collaborator
|
Thank you! |
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
SkillsIntegration.setupparses each command template's frontmatter withraw.split("---", 2). A bare substring split stops at the first---anywhere — including one embedded inside a value. A template whose description contains---, e.g.is mis-parsed three ways:
Separate sections with(or dropped entirely, falling back to the genericSpec Kit: <name> workflow);Fix
Locate the closing
---on its own line (line-anchored scan) for both the description parse and the body strip, mirroring the hardenedCommandRegistrar.parse_frontmatterscan.|) block scalars still survive.split("---", 2)[2]for well-formed templates (verified with a differential check across normal / empty-body / trailing-space cases).Tests
Adds
TestSkillFrontmatterEmbeddedDashescovering the dashed-description truncation and the frontmatter-spilled-into-body cases. Both fail on the pre-fix code and pass after. Full skills integration suite: 342 passed, 3 skipped, 0 failures.