diff --git a/checksums.sha256 b/checksums.sha256 index 7dd8ba3..cf24b44 100644 --- a/checksums.sha256 +++ b/checksums.sha256 @@ -127,7 +127,7 @@ bc7d13659b5e4ae4a75fbc84ba60d3724cf1a50a06ff4bd18984f159d0701614 skills/ship-pi 91ae02956d368635e4aa05f4e6fb5d27c9682cac8890688922026747b932137c skills/wave-executor/SKILL.md 0df8977c53ff74008db994f47e66a4bae6ec983cea46f1566e656dc01b5f030b skills/wave-executor/WAVE-A.md 01e46805e7a0e7c2743d0d43c4106abeff6da9a51b3fa659cf96a7f4a6bb6431 skills/wave-executor/WAVE-B.md -46f5f7222d0933b75ea6c34022db20c45ee51ca0ef1f844a66854b2db517e415 skills/workflow-common-core/SKILL.md +03d93aa382e74eac5cdc4e68a630976d7d6923f6e85a437295df432bdf1ae62e skills/workflow-common-core/SKILL.md 27b587dbe5bb4be8faaf0fbc4b7b50399f8bac544a9a1ab3da1a27b365ac6003 skills/workflow-common-domains/SKILL.md ed808a0eab115829e76c9cfadf86004109fd221ce0af1994367d150b4a5ec641 skills/workflow-common-github/SKILL.md 3cfba03208bfae33f0c940d3ffb4cf66d1e1939c3759930f0251e12d36c7375f skills/workflow-common-memory/SKILL.md diff --git a/skills/workflow-common-core/SKILL.md b/skills/workflow-common-core/SKILL.md index 4c97dd1..57b6368 100644 --- a/skills/workflow-common-core/SKILL.md +++ b/skills/workflow-common-core/SKILL.md @@ -1,6 +1,6 @@ --- name: workflow-common-core -description: Lean core conventions and path contracts used by all /legion: commands +description: "Lean core conventions and path contracts used by all /legion: commands" triggers: [common, core, paths, state, conventions] token_cost: low summary: "Lean always-load core for command execution: CLI adapter detection, state file paths, settings resolution, agent path resolution, and base command mapping." diff --git a/tests/skill-frontmatter.test.js b/tests/skill-frontmatter.test.js new file mode 100644 index 0000000..4217c5a --- /dev/null +++ b/tests/skill-frontmatter.test.js @@ -0,0 +1,22 @@ +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('fs'); +const path = require('path'); +const YAML = require('yaml'); + +const SKILLS_DIR = path.resolve(__dirname, '..', 'skills'); + +test('every SKILL.md frontmatter is valid YAML with name and description', () => { + for (const dir of fs.readdirSync(SKILLS_DIR)) { + const file = path.join(SKILLS_DIR, dir, 'SKILL.md'); + if (!fs.existsSync(file)) continue; + const match = fs.readFileSync(file, 'utf8').match(/^---\r?\n([\s\S]*?)\r?\n---/); + assert.ok(match, `${dir}/SKILL.md has no frontmatter`); + let data; + assert.doesNotThrow(() => { data = YAML.parse(match[1]); }, `${dir}/SKILL.md frontmatter is not valid YAML`); + assert.equal(typeof data.name, 'string', `${dir}/SKILL.md name`); + assert.equal(typeof data.description, 'string', `${dir}/SKILL.md description`); + } +});