npm-publish
Skill2 starsChanged 6 months agoMITView on GitHub
Use when publishing Node/npm packages from a repository or monorepo, especially scoped public packages, beta/latest dist-tags, workspace publishing, npm 2FA, publish verification, local tarball smoke tests, and debugging npm publish/install errors such as E403, E404, ENOVERSIONS, ELOOP, or pack destination failures.
- Reads credentials
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- kvdm-co-pilot/create-cmptheir own version, first seen Sep 30, 2026
- Fei2-Labs/skill-genietheir own version, first seen Sep 24, 2026
- jasoncrawford/claude-skillstheir own version, first seen Apr 25, 2026
- 0xjitsu/jitsu-skillstheir own version, first seen Apr 13, 2026
- metarhia/metaskillstheir own version, first seen Mar 11, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- metarhia/metaskills★ 57same name
- Fei2-Labs/skill-genie★ 12same name
- 0xjitsu/jitsu-skills★ 1same name
- jasoncrawford/claude-skills★ 1same name
- kvdm-co-pilot/create-cmp★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ethereum-developmentSkill
- financial-analysisSkill
- find-skillsSkill
- fix-bugbot-pr-commentsSkill
- frontend-designSkill
- github-workflowsSkill
- guarded-db-migrationSkill
- multi-agent-worktree-disciplineSkill
- phase-pr-review-loopSkill
- plan-writingSkill
- research-intelligence-workflowsSkill
- simplified-technical-englishSkill
- skills-organizationSkill
- software-development-workflowsSkill
- subagent-orchestrationSkill
- turn-closeoutSkill
- web3-protocol-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 10 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Use this workflow when preparing, publishing, or verifying an npm package.
- Very specific: line 31
Check existing versions: npm view <package> versions dist-tags --json.
- Distinctive: line 33
Use the repo's normal quality gates, usually format, tests, and build.
- Distinctive: line 34
If a repo-wide build fails for local env state, diagnose before assuming package failure.
- Distinctive: line 36
Create the pack destination first.
- Very specific: line 39
Use --tag beta for beta/devnet/prerelease packages.
- Very specific: line 40
Use latest only when the package should be the default install.
- Distinctive: line 43
Verify package document, dist-tags, access, tarball metadata, and install from a clean npm config or a deliberate security-guard override.
- Distinctive: line 78
After publish, inspect tags:
- Very specific: line 84
If users should install the package by default without a tag, intentionally move latest:
- Very specific: line 90
Do not move latest automatically.
- Distinctive: line 94
Use several independent checks:
- Very specific: line 112
If the user's npm config intentionally sets a before date as a supply-chain safety guard, keep it.
- Very specific: line 118
If npm install reports ENOVERSIONS while npm view shows versions, check:
- Distinctive: line 130
If a pre-publish build fails with a message like:
- Distinctive: line 136
Check whether the env file is a self-referential symlink:
- Distinctive: line 164
If npm prompts for an OTP, use a fresh 2FA code immediately:
- Very specific: line 174
If publish reaches Publishing to https://registry.npmjs.org/ and then fails with PUT ...
- Very specific: line 187
If the registry document shows the version but install says no versions are available, suspect a local before security guard:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Npm Publish
Operating Pattern
Use this workflow when preparing, publishing, or verifying an npm package. Treat publishing as a release operation: package versions are immutable, registry state can lag or be filtered by local config, and npm auth errors can look unrelated to the tarball.
- Confirm package scope and working directory.
- In a monorepo, publish from the repo root with
npm publish --workspace <workspace-name> .... - From the package directory, omit
--workspace. - Confirm
package.jsonhas the intendedname,version,license,bin,files,engines,publishConfig, and dependencies.
- In a monorepo, publish from the repo root with
- Confirm the version is new.
- npm versions are immutable. Any republish requires a version bump.
- Check existing versions:
npm view <package> versions dist-tags --json.
- Run release checks before publishing.
- Use the repo's normal quality gates, usually format, tests, and build.
- If a repo-wide build fails for local env state, diagnose before assuming package failure.
- Pack and smoke-test the exact artifact.
- Create the pack destination first; npm does not create it.
- Install the generated tarball globally or in a temp project and run the package's CLI/help/version smoke tests.
- Publish with intentional dist-tags.
- Use
--tag betafor beta/devnet/prerelease packages. - Use
latestonly when the package should be the default install.
- Use
- Verify registry state and installability.
- A successful publish prints
+ <package>@<version>. - Verify package document, dist-tags, access, tarball metadata, and install from a clean npm config or a deliberate security-guard override.
- A successful publish prints
Recommended Command Skeleton
For a workspace package from the repository root:
git switch main
git pull
npm run format:check
npm run test --workspace <workspace-name>
npm run build
mkdir -p /private/tmp/npm-release
npm pack --workspace <workspace-name> --pack-destination /private/tmp/npm-release
npm uninstall -g <package-name>
npm install -g /private/tmp/npm-release/<tarball-name>.tgz
<binary-name> --version
<binary-name> --help
npm whoami
npm publish --workspace <workspace-name> --tag beta --access publicFor @agentvouch/cli, the publish command is:
npm publish --workspace @agentvouch/cli --tag beta --access publicDist-Tag Policy
- Publish beta/devnet releases with
--tag beta. - After publish, inspect tags:
npm view <package> dist-tags versions --json- If users should install the package by default without a tag, intentionally move
latest:
npm dist-tag add <package>@<version> latestDo not move latest automatically. Report the current tag state and ask whether the package should become the default install when that is a product decision.
Verification Commands
Use several independent checks:
npm view <package> dist-tags versions engines bin --json
npm access get status <package>
npm owner ls <package>
npm access list collaborators <package>
mkdir -p /private/tmp/npm-verify
npm pack <package>@<tag-or-version> --pack-destination /private/tmp/npm-verifyThen install and smoke-test from the registry in an environment that can see fresh packages:
npm install -g <package>@<tag-or-version>
<binary-name> --helpIf the user's npm config intentionally sets a before date as a supply-chain safety guard, keep it. Do not tell them to delete it as the default fix. For fresh-release verification, use one of:
- a separate clean environment or user config;
- direct registry reads such as
npm view <package> ...; - an explicit
--before=<future ISO date after the publish time>override for the one verification command.
If npm install reports ENOVERSIONS while npm view shows versions, check:
npm config get beforeA before date earlier than the publish timestamp hides the new version from install resolution.
Error Triage
ELOOP loading env during repo build
If a pre-publish build fails with a message like:
ELOOP: too many symbolic links encountered, stat '<repo>/web/.env.local'Check whether the env file is a self-referential symlink:
ls -l web/.env.localMove the broken symlink out of the app directory and recreate .env.local as a real file if needed. Do not treat this as an npm packaging failure.
npm pack --pack-destination returns ENOENT
npm pack --pack-destination <dir> does not create <dir>. Create it first:
mkdir -p /private/tmp/npm-release
npm pack --workspace <workspace-name> --pack-destination /private/tmp/npm-releaseE403 requiring 2FA or bypass token
The tarball may be fine; npm is rejecting registry write auth. Refresh auth and retry:
npm logout
npm login --auth-type=web
npm whoami
npm publish --workspace <workspace-name> --tag beta --access publicIf npm prompts for an OTP, use a fresh 2FA code immediately:
npm publish --workspace <workspace-name> --tag beta --access public --otp <code>Recovery codes can satisfy npm's OTP prompt, but they are one-time backup factors. If a recovery code is used or exposed in logs/chat, treat it as spent and regenerate recovery codes after publishing.
PUT ... 404 Not found during publish
If publish reaches Publishing to https://registry.npmjs.org/ and then fails with PUT ... 404, the tarball built but npm did not accept the registry write. Check:
npm config get registry
npm whoami
npm owner ls <package>
npm access get status <package>For scoped public packages, keep --access public. Re-login with npm login --auth-type=web if the current session or token lacks publish rights.
ENOVERSIONS after publish
If the registry document shows the version but install says no versions are available, suspect a local before security guard:
npm config get before
npm view <package> time dist-tags versions --jsonCompare the package publish time to the configured before date. Preserve the guard unless the user explicitly wants it removed.
Completion Criteria
Report:
- the package name, version, and dist-tags;
- whether
latestchanged; - package access status;
- tarball file count/size when available;
- CLI smoke-test output or exact failure;
- any local npm guardrail such as
beforethat affected verification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

