From c66a43096768dee19f716b3e06ca04337d9b6f36 Mon Sep 17 00:00:00 2001 From: wonjang <48057918+wonjangcloud9@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:47:50 +0000 Subject: [PATCH] fix(cli): stop the CLI build looking for the removed gsap skill (#7689) skills/gsap was folded into the animation skill in #1349, but build-copy still listed it, so every CLI build printed "[build-copy] skill not found, skipping: skills/gsap". Drop the entry, and add a test that every bundled skill name has a SKILL.md so the next rename fails CI instead of warning. Co-authored-by: Claude Opus 5.5 --- packages/cli/scripts/build-copy.mjs | 2 +- packages/cli/src/buildCopy.test.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 packages/cli/src/buildCopy.test.ts diff --git a/packages/cli/scripts/build-copy.mjs b/packages/cli/scripts/build-copy.mjs index 2840596d10..0709e05713 100644 --- a/packages/cli/scripts/build-copy.mjs +++ b/packages/cli/scripts/build-copy.mjs @@ -133,7 +133,7 @@ async function main() { // Skills bundled into the published CLI. Branches don't all carry the same // skills/ tree (it gets restructured), so each entry is existsSync-guarded: // a missing skill dir warns + skips instead of crashing the build. - for (const skill of ["hyperframes", "hyperframes-cli", "gsap", "media-use"]) { + for (const skill of ["hyperframes", "hyperframes-cli", "media-use"]) { const src = join(REPO_ROOT, "skills", skill); if (!existsSync(src)) { console.warn(`[build-copy] skill not found, skipping: skills/${skill}`); diff --git a/packages/cli/src/buildCopy.test.ts b/packages/cli/src/buildCopy.test.ts new file mode 100644 index 0000000000..bb82cc595e --- /dev/null +++ b/packages/cli/src/buildCopy.test.ts @@ -0,0 +1,16 @@ +import { existsSync, readFileSync } from "node:fs"; +import { describe, expect, it } from "vitest"; + +const copySource = readFileSync(new URL("../scripts/build-copy.mjs", import.meta.url), "utf-8"); + +describe("build-copy bundled skills", () => { + it("names only skills that exist in the repo's skills/ tree", () => { + const list = copySource.match(/for \(const skill of \[([^\]]+)\]\)/)?.[1] ?? ""; + const skills = [...list.matchAll(/"([^"]+)"/g)].map((m) => m[1]); + expect(skills.length).toBeGreaterThan(0); + const missing = skills.filter( + (name) => !existsSync(new URL(`../../../skills/${name}/SKILL.md`, import.meta.url)), + ); + expect(missing).toEqual([]); + }); +});