Skip to content

fix(create-objectstack): scope skill installs to the curated skills/ catalog#3101

Merged
os-zhuang merged 2 commits into
mainfrom
fix/scaffold-skill-catalog-boundary
Jul 17, 2026
Merged

fix(create-objectstack): scope skill installs to the curated skills/ catalog#3101
os-zhuang merged 2 commits into
mainfrom
fix/scaffold-skill-catalog-boundary

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

问题(15.1 第三方评估 P2 #1)

create-objectstack 生成的项目 .agents/skills/ 里出现了仓库内部 skill dogfood-verification(frontmatter 自述 "NOT a customer-published skill")。

根因

泄漏不在模板或 npm 发布产物,而在脚手架运行时:scaffolder(及文档)执行 npx skills add objectstack-ai/framework --all。skills CLI 的 --all 隐含 --skill '*'(add.ts:1049-1052),而任何非空 --skill 会把 includeInternal 置真 —— 即 --allmetadata.internal 标记的 skill 也一并安装。仓库全量发现会走 .claude/skills/,于是内部 skill 进入每个新项目。CI 的 scaffold-e2e 两处均 --skip-skills,该路径从未被守。

修复(双层)

  1. 硬边界 = /skills 子路径:scaffolder 与全部文档改为 npx skills add objectstack-ai/framework/skills --all,skills CLI 的发现范围被钉死在发布目录(对 --all 也有效;已实测远端 GitHub 源 Found 9 skills)。
  2. 交互兜底 = metadata.internal: true:.claude/skills/dogfood-verification 加标记,裸 skills add objectstack-ai/framework(无 --all)的交互发现也不再露出(实测 --list 只列 9 个)。

防线

  • template-consistency.test.ts 新增 4 个 ratchet:skills/ 外的 SKILL.md 必须标 internal;curated 条目不得标 internal;scaffolder 必须用子路径源;客户面(docs/skills/create-objectstack)禁止裸根路径安装命令。
  • scaffold-e2e.yml 新增步骤:从本 checkout 的 skills/ 子路径真实安装进全新 scaffold,断言安装集合与 curated 目录集合相等;根路径 --list 断言恰好 curated 数量且无内部 skill。

验证

  • pnpm --filter create-objectstack test 10/10 通过;build 通过
  • 本地 worktree 实测:子路径安装 → 恰好 9 个 curated;根路径 --list → Found 9(internal 隐藏)
  • 远端实测:npx skills add objectstack-ai/framework/skills --list → Found 9
  • check:doc-authoring / check:role-word 通过

🤖 Generated with Claude Code

…catalog

The scaffolder (and docs) ran `npx skills add objectstack-ai/framework
--all`, and the skills CLI's --all implies --skill '*', which includes
metadata.internal skills — so the repo-internal dogfood-verification
skill (.claude/skills/) landed in every scaffolded project's
.agents/skills/ (15.1 third-party eval, P2).

- scaffolder + docs now install from the /skills subpath, which scopes
  skills-CLI discovery to the published catalog
- mark .claude/skills/dogfood-verification metadata.internal: true so
  interactive repo-root discovery hides it too
- template-consistency ratchets: every SKILL.md outside skills/ must be
  metadata.internal, curated entries must not be, no customer-facing
  surface may advertise a repo-root install
- scaffold-e2e: install from this checkout's skills/ subpath and assert
  set-equality with the curated catalog; assert repo-root listing
  surfaces exactly the curated set

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 17, 2026 10:00am

Request Review

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation ci/cd tests tooling labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): create-objectstack.

7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via create-objectstack)
  • content/docs/ai/skills.mdx (via create-objectstack)
  • content/docs/getting-started/index.mdx (via create-objectstack)
  • content/docs/getting-started/your-first-project.mdx (via create-objectstack)
  • content/docs/plugins/packages.mdx (via create-objectstack)
  • content/docs/releases/v15.mdx (via create-objectstack)
  • content/docs/releases/v9.mdx (via create-objectstack)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

The skills CLI colors the count even when piped (Found \e[32m9\e[39m
skills), so the repo-root listing greps in the new skills-boundary step
never matched in CI. The subpath-install set-equality assertion had
already passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 809214f into main Jul 17, 2026
18 checks passed
@os-zhuang
os-zhuang deleted the fix/scaffold-skill-catalog-boundary branch July 17, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant