State the frontmatter line-break rule exactly
Check instruction packages / check (push) Successful in 5s
Check instruction packages / check (pull_request) Successful in 5s

Name the separators the checker rejects and the end-of-file closing
delimiter it accepts, and show that the rule stops at the frontmatter: a
CRLF body and a frontmatter-only file still pass. Split frontmatter lines
once and assert the exact rejection reason.

Refs #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-11-25 19:04:47 -05:00
1 parent 45eff20ecb
commit da34e1c1bf
3 files changed
+25 -10

No files matched your search

+13 -1
View File
@@ -252,7 +252,19 @@ class RoleStepRejectionTests(unittest.TestCase):
for label, mutate in cases:
with self.subTest(name=name, case=label), FixtureCopy(name) as copy:
mutate(copy)
self.assertRejected(copy, "frontmatter|skill metadata")
self.assertRejected(copy, "invalid SKILL.md frontmatter")
def test_line_break_rule_stops_at_the_frontmatter(self):
for name in NEW_PAIR_FIXTURES:
with self.subTest(name=name, case="CRLF body"), FixtureCopy(name) as copy:
text = (copy.path / "SKILL.md").read_text()
head, body = text.split("\n---\n", 1)
copy.write_file("SKILL.md", head + "\n---\n" + body.replace("\n", "\r\n") + "\u2028\n")
check_package(copy.path)
with self.subTest(name=name, case="frontmatter only, no final newline"), FixtureCopy(name) as copy:
text = (copy.path / "SKILL.md").read_text()
copy.write_file("SKILL.md", text.split("\n---\n", 1)[0] + "\n---")
check_package(copy.path)
def test_rejects_unsafe_or_undeclared_content(self):
cases = (