From 7a37c51fee4a4d0323fd9fb384d580fc4f90707f Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Fri, 30 Jan 2026 14:20:50 +0000 Subject: [PATCH] fix: revert build.ts to flat structure version Co-Authored-By: Claude Opus 4.5 --- packages/skills-build/src/build.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/skills-build/src/build.ts b/packages/skills-build/src/build.ts index b6a76bc..03b06c8 100644 --- a/packages/skills-build/src/build.ts +++ b/packages/skills-build/src/build.ts @@ -8,7 +8,7 @@ import { unlinkSync, writeFileSync, } from "node:fs"; -import { basename, join, relative } from "node:path"; +import { basename, join } from "node:path"; import { discoverSkills, getSkillPaths, @@ -327,10 +327,8 @@ function buildSkill(paths: SkillPaths): void { for (const file of referenceFiles) { const name = basename(file, ".md"); const prefix = name.split("-")[0]; - // Compute relative path from references directory - const relativePath = relative(paths.referencesDir, file); const group = grouped.get(prefix) || []; - group.push(relativePath); + group.push(name); grouped.set(prefix, group); } @@ -339,7 +337,7 @@ function buildSkill(paths: SkillPaths): void { const title = section ? section.title : prefix; output.push(`**${title}** (\`${prefix}-\`):`); for (const file of files.sort()) { - output.push(`- \`references/${file}\``); + output.push(`- \`references/${file}.md\``); } output.push(""); }