From 9c1e253dccd63b4a1afcceb8d6c7132ed807da7a Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Wed, 15 Apr 2026 09:31:51 -0400 Subject: [PATCH] fix(build): strip skills/ and .claude-plugin/ from .skill bundle (#263) v3.0.3's fix (#262) restored skills/ and .claude-plugin/ to the git archive, which Claude Code needs for /plugin install. But scripts/build-skill.sh uses the same archive to produce the claude.ai .skill bundle, which must contain exactly one root SKILL.md and stay under the 200-file cap. Fix: after git archive, 'zip -d' strips both directories from the .skill bundle. git archive output is unchanged (Claude Code still gets the full tarball on /plugin install). Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> --- scripts/build-skill.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build-skill.sh b/scripts/build-skill.sh index fadf72a..51d9139 100755 --- a/scripts/build-skill.sh +++ b/scripts/build-skill.sh @@ -19,12 +19,19 @@ mkdir -p dist OUT="dist/last30days.skill" git archive --format=zip --prefix=last30days/ --output="$OUT" HEAD +# claude.ai's .skill bundle only needs the root SKILL.md + scripts/ runtime. +# Claude Code needs skills/ and .claude-plugin/ in the git archive +# (that's why they're NOT in .gitattributes export-ignore), but the .skill +# bundle must strip them to keep a single canonical SKILL.md and stay under +# the 200-file cap. +zip -d "$OUT" "last30days/skills/*" "last30days/.claude-plugin/*" > /dev/null 2>&1 || true + COUNT=$(unzip -l "$OUT" | tail -1 | awk '{print $2}') SIZE=$(du -h "$OUT" | cut -f1) if [ "$COUNT" -gt 200 ]; then echo "error: $COUNT files in zip, claude.ai's cap is 200" >&2 - echo " check .gitattributes export-ignore entries" >&2 + echo " check .gitattributes export-ignore entries and this script's zip -d excludes" >&2 exit 1 fi