scbe-npm-prepublish-autopublish
Enforce deterministic npm prepublish cleanup and auto-publish workflow gates for SCBE-AETHERMOORE. Use when preparing npm releases, hardening package contents, adding tarball guard checks, or updating
Files1
View on GitHubSKILL.mdresearch/sphere-grid/skills/scbe-npm-prepublish-autopublish/SKILL.md
GitHubSCBE NPM Prepublish Autopublish
Use this skill to keep npm releases clean and repeatable.
Required Repo Wiring
Ensure these files exist and stay aligned:
scripts/npm_prepublish_cleanup.jsscripts/npm_pack_guard.jspackage.jsonscripts:clean:releasepublish:preparepublish:check:strictprepublishOnlyprepack
.github/workflows/auto-publish.yml
Workflow
- Read baseline config from
package.json,.npmignore, and.github/workflows/auto-publish.yml. - Wire local gates:
publish:prepareruns cleanup then build.publish:check:strictruns tarball guard.prepublishOnlycallspublish:prepare.prepackcallspublish:check:strict.
- Wire CI gates in
auto-publish.ymlbeforenpm publish:npm run publish:preparenpm testnpm run publish:check:strict
- Validate locally:
npm run clean:releasenpm run publish:preparenpm run publish:check:strict
- Report changed files and guard results.
Guard Rules
Fail release if the npm tarball contains dev or Python artifacts:
__pycache__/.pyc,.pyo,.py.pytest_cache/,.mypy_cache/,.ruff_cache/src/,tests/,scripts/.zip
Require these files in the tarball:
README.mdLICENSEdist/src/index.jsdist/src/index.d.ts
Resources
- Use
scripts/run_release_guard.ps1to execute local release gates quickly. - Read
references/release-guard-rules.mdfor checklist and troubleshooting.