← ClaudeAtlas

npm-package-authoringlisted

Author, audit, package, smoke-test, and publish npm packages and npm workspaces safely. Use when a request includes trigger phrases such as 'publish this npm package', 'prepare an npm release', 'audit package.json', 'fix exports or bin', 'fix npm pack contents', 'test the tarball', 'npm trusted publishing', 'npm OIDC', 'ENEEDAUTH', 'EOTP', 'npm 12 allowScripts', 'Windows npm shim EINVAL', 'EXDEV during packaging', or 'workspace package is missing built artifacts'.
RelayMessenger/Relay-SDK · ★ 0 · API & Backend · score 72
Install: claude install-skill RelayMessenger/Relay-SDK
# npm Package Authoring Produce a consumer-valid tarball before touching the registry. Treat `package.json`, the packed tarball, the isolated installed package, the authentication mechanism, and registry state as separate contracts. ## Operating contract - Inspect repository instructions, dirty state, lockfiles, supported Node/npm versions, workspace topology, and the existing release workflow first. - Preserve unrelated changes. Never make a release from an unexplained dirty tree. - Build once, pack once, retain the exact `.tgz`, and publish that retained tarball. - Test the installed tarball outside the repository; source-tree tests cannot prove package correctness. - Run cross-platform package tests on every supported OS. Do not weaken Windows assertions to imitate POSIX. - Query registry state before every publish attempt and after every ambiguous outcome. Never blind-retry `npm publish`. - Prefer npm OIDC trusted publishing over long-lived write tokens. - Report local, CI, tarball, authentication, registry, and published-consumer evidence separately. All shell blocks are Bash unless marked PowerShell. Use Node scripts for portable parsing instead of platform-specific `sed`, `grep`, or path assumptions. ## 1. Establish ground truth Run from the repository root: ```bash set -euo pipefail git status --short node --version npm --version npm config get registry npm pkg get name version private packageManager engines repository publishConfig files exports bin workspaces