From 8a4a787d1cc3772ae07183f5ee7b2c5bca09d2fc Mon Sep 17 00:00:00 2001 From: Ankit Ranjan Date: Wed, 8 Jul 2026 13:54:54 +0530 Subject: [PATCH] fix: quote sitemap author skill frontmatter --- skills/webcmd-sitemap-author/SKILL.md | 2 +- src/skills.test.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/skills/webcmd-sitemap-author/SKILL.md b/skills/webcmd-sitemap-author/SKILL.md index ea76dcd2f..1d6857b7c 100644 --- a/skills/webcmd-sitemap-author/SKILL.md +++ b/skills/webcmd-sitemap-author/SKILL.md @@ -1,6 +1,6 @@ --- name: webcmd-sitemap-author -description: Use when creating or maintaining Webcmd site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo. +description: 'Use when creating or maintaining Webcmd site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.' allowed-tools: Bash(webcmd:*), Read, Edit, Write, Grep --- diff --git a/src/skills.test.ts b/src/skills.test.ts index ad0192ba9..b4a2f4c90 100644 --- a/src/skills.test.ts +++ b/src/skills.test.ts @@ -1,6 +1,7 @@ import * as fs from 'node:fs'; import * as os from 'node:os'; import * as path from 'node:path'; +import yaml from 'js-yaml'; import { describe, expect, it } from 'vitest'; import { ArgumentError } from './errors.js'; import { listWebcmdSkills, readWebcmdSkill } from './skills.js'; @@ -42,6 +43,20 @@ function makePackageRoot(): string { } describe('webcmd skills content', () => { + it('keeps bundled skill frontmatter valid yaml', () => { + const skillsRoot = path.join(process.cwd(), 'skills'); + const skillNames = fs.readdirSync(skillsRoot, { withFileTypes: true }) + .filter((entry) => entry.isDirectory() && entry.name.startsWith('webcmd-')) + .map((entry) => entry.name); + + for (const name of skillNames) { + const content = fs.readFileSync(path.join(skillsRoot, name, 'SKILL.md'), 'utf8'); + const end = content.indexOf('\n---', 4); + expect(end, name).toBeGreaterThan(0); + expect(() => yaml.load(content.slice(4, end)), name).not.toThrow(); + } + }); + it('lists only webcmd-prefixed skills', () => { const root = makePackageRoot();