/linux-packaging:npm-publishfrom linux-packaging
Publish the current package to npm. Prefers trusted publishing (a GitHub Actions workflow publishing via OIDC on a version tag, no stored token); otherwise publishes from the shell with a granular token in NPM_TOKEN (deprecated for publishing around January 2027) or interactively with 2FA. Use when the user asks to "npm publish", "publish to npm", "release this package", "set up npm publishing", or "bump and publish".
Ships in linux-packaging. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
| Route | When | Credential |
|---|---|---|
| 1. Trusted publishing (preferred) | package source on GitHub/GitLab | none stored: CI exchanges an OIDC token with npm |
| 2. Granular token, "bypass 2FA" | quick one-off from a shell, until ~January 2027 | NPM_TOKEN in the environment |
| 3. Interactive | anything else, and after the deprecation | npm login + 2FA code |
Why: GitHub changelog 2026-07-08 ("npm install-time security and GAT bypass2FA deprecation"). Bypass-2FA granular tokens lost their 2FA bypass for account/package management in August 2026 and lose direct publishing around January 2027. After that, their publishes are only staged until a human approves with 2FA.
.github/workflows/publish.yml: trigger push: tags: ["v*"], permissions: id-token: write, actions/setup-node with registry-url: https://registry.npmjs.org,
npm ≥ 11.5.1 (npm install -g npm@latest), then npm ci, build, npm publish.
Check that the tag matches package.json version. Provenance is attached automatically.version, commit, git tag vX.Y.Z && git push --tags. Verify with
npm view <name> version and the workflow run, not by assuming.NPM_TOKEN (until ~Jan 2027)Granular token: read+write, limited packages, "bypass 2FA", expiry. Run under whatever
injects NPM_TOKEN for one command; never write it to ~/.npmrc or the repo:
bash -c '
[ -n "$NPM_TOKEN" ] || { echo "NPM_TOKEN missing"; exit 1; }
cfg=$(mktemp); trap "rm -f $cfg" EXIT; chmod 600 "$cfg"
printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN" > "$cfg"
NPM_CONFIG_USERCONFIG="$cfg" npm whoami && NPM_CONFIG_USERCONFIG="$cfg" npm publish'
npm login (user runs it, e.g. ! npm login), then npm publish --otp=<code> with the code
fetched immediately before (codes expire in ~30 s).
npm view <name> version). Publishing an existing version fails.publishConfig.access: add --access public.| Symptom | Meaning |
|---|---|
E401 on whoami | token expired or revoked |
EOTP | token lacks bypass-2FA (or the bypass no longer applies). Use route 1 or 3 |
E403 … cannot publish over | version exists. Bump |
CI: ENEEDAUTH / 404 on publish | trusted publisher not configured, wrong workflow filename, or npm < 11.5.1 |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/agent-deploy-scriptUse when the user wants to create an agent-specific, low-verbosity variant of the current repo's deployment script for AI agent execution. Triggers on phrases like "create agent deploy script", "agent-deploy.sh", "make a quiet deploy script for agents"./build-and-push-debianUse when the user wants to push changes to GitHub, build a new debian version incrementing the version, and upgrade the local package. Triggers on phrases like "build and push", "push then build debian", "release and install locally"./build-debian-packageUse when the user wants to build a new version of the debian package in the current repo, increment the version, and install locally. Triggers on phrases like "build the debian", "build new debian version", "rebuild and install package".linux-packaging@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin linux-packaging