MCPcopy
hub / github.com/garrytan/gstack / frontmatterBlock

Function frontmatterBlock

test/gen-skill-docs.test.ts:180–185  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

178 // mapping). Parse EVERY generated frontmatter block with a strict YAML parser,
179 // not just string-check that name:/description: exist.
180 function frontmatterBlock(content: string): string {
181 expect(content.startsWith('---\n')).toBe(true);
182 const end = content.indexOf('\n---', 4);
183 expect(end).toBeGreaterThan(0);
184 return content.slice(4, end);
185 }
186
187 test('every generated SKILL.md frontmatter parses as strict YAML', () => {
188 for (const skill of CLAUDE_GENERATED_SKILLS) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected