From ee19e86f53ac85dadd628e4562c34d023ab3c341 Mon Sep 17 00:00:00 2001 From: Alex Lavaee Date: Thu, 23 Apr 2026 04:21:58 +0000 Subject: [PATCH] chore(publish): stage filtered skills at publish time Replace the committed `.agents/skills` (which carries development-only skills useful in-repo) with the filtered, end-user skill set produced by `bunx skills add` during the publish job. The publish workflow whitelists `.agents/skills` for `npm pack` ad-hoc, so the entry no longer needs to live in the committed `package.json` files array. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ package.json | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa4b292a2..46c9490bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -73,6 +73,31 @@ jobs: node-version: "lts/*" registry-url: "https://registry.npmjs.org" + - name: Stage filtered skills for npm package + env: + SKILLS_REPO: https://github.com/flora131/atomic.git + run: | + set -euo pipefail + + # Replace the dev-laden checkout skills with the filtered set + # produced by `bunx skills add` (which excludes development-only + # skills). Install globally on the runner, then copy into the + # package root so npm pack picks them up. + rm -rf .agents/skills + bunx skills add "$SKILLS_REPO" \ + --skill "*" \ + -a opencode -a github-copilot \ + -g -y + + mkdir -p .agents/skills + cp -R "$HOME/.agents/skills/." .agents/skills/ + + # Whitelist the staged directory for `npm publish` without + # baking the entry into the committed package.json. + tmp=$(mktemp) + jq '.files += [".agents/skills"]' package.json > "$tmp" + mv "$tmp" package.json + - name: Publish to npm run: npm publish --provenance --access public --tag ${{ steps.npm-tag.outputs.tag }} diff --git a/package.json b/package.json index f056c80cb..29c13d061 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "src", "dist", "assets/settings.schema.json", - ".agents/skills", ".claude/agents", ".claude/settings.json", ".opencode/agents",