fix(scripts): handle Windows path separators in skill catalog discovery (#2050)

The first-run reference checker now discovers shipped `SKILL.md` files on Windows. Its walker uses native `path.join`, so testing for a literal `/SKILL.md` suffix returned an empty catalog on Windows; `path.basename(p) === "SKILL.md"` handles the native separator and matches the sibling scripts' existing idiom.

One line changes. Reference parsing, skill names and validation rules stay the same. The independent source pair is clear and all eight required CI checks pass. The contributor reports a native Windows before/after run:53skills discovered,489references checked,0failures; that run was not independently repeated by the desk.
This commit is contained in:
Dery Ferdika authored and GitHub committed 2026-10-25 12:56:24 -07:00
1 parent 1a620fc505
commit 9166d06140
1 file changed
+1 -1
+1 -1
View File
@@ -180,7 +180,7 @@ export async function loadAuthorities(root) {
if (!entries.length) throw new Error(`empty builtin rig library: ${RIGS}`);
const skills = new Map();
for (const dir of SKILL_ROOTS) {
for (const file of walk(path.join(root, dir)).filter((p) => p.endsWith("/SKILL.md"))) {
for (const file of walk(path.join(root, dir)).filter((p) => path.basename(p) === "SKILL.md")) {
skills.set(path.basename(path.dirname(file)), path.relative(root, file));
}
}