mirror of
https://github.com/laguagu/claude-code-nextjs-skills.git
synced 2026-09-14 20:16:51 +08:00
7de6d24d8e
`skills/` is a junction to a local collection larger than the public set, so a private skill is on disk while writing and gone for anyone who clones. That makes the mistake invisible to review: the file reads correctly here. It had already happened twice. `agents/e2e-tester.md` sent design critique to `/go-ui` four times — in the frontmatter `description`, in the core principles, in the reporting section and in the out-of-scope list. `go-ui` is gitignored as personal tooling, so every one of those was a dead pointer for a cloner, and the first is the routing key the user reads before invoking the agent. The scope boundary was the actual content, so it stays and the pointer goes: design critique is now stated as a separate pass this agent reports to rather than a skill it names. `scripts/check-private-skill-refs.sh` reads the private set from .gitignore — un-ignoring a skill is all it takes to make references to it legal again — and flags three forms: `name`, /name, and a bare YAML list item, which is how agent frontmatter declares a skill and carries no punctuation to grep for. Prose naming a skill as the contents of *another* repo is deliberately not matched; README's "See Also" line does exactly that and is correct. Two things learned while building it, both encoded in the script: - A per-file grep loop is one fork per tracked file, and under Git Bash on Windows that hits the MSYS fork limit — the hook printed "Resource temporarily unavailable" instead of a verdict. It is one grep over the whole file list now. - Scanning only `skills/*.md` is too narrow. That is how e2e-tester went unnoticed: the agent files ship too. Verified by committing a deliberate `/go-ui` reference and confirming the hook refused it, then reverting. Enable per clone with `git config core.hooksPath .githooks`; README says so.