Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/danielrosehill-npm-publish
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/npm-publish
What's inside
- Skill name
npm-publish- Description
- 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".
- License
- MIT
- Instructions
- 59 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# npm publish
## Pick the route
| 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.
## 1. Trusted publishing
1. Add `.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.
2. One-time, by the package owner on npmjs.com: package → Settings → **Trusted publisher** →
GitHub Actions → owner, repository, workflow file name. (The package must already exist;
publish the first version by route 2 or 3.)
3. Release: bump `version`, commit, `git tag vX.Y.Z && git push --tags`. Verify with
`npm view <name> version` and the workflow run, not by assuming.
## 2. Token in `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
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'
```
## 3. Interactive
`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).
## Always
- Check the registry first (`npm view <name> version`). Publishing an existing version fails.
- Scoped packages without `publishConfig.access`: add `--access public`.
- Verify on the registry afterwards; push the commit and tag.
| 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 |From danielrosehill/Linux-Packaging-Plugin, MIT.
More from danielrosehill/Linux-Packaging-Plugin
- 0.391score
debug-local-tool
danielrosehill
Use when a local application, CLI tool, or service on the user's Linux workstation isn't working and needs interactive debugging.
SkillCFreshness: C★ 1Claude Code +9 - 0.391score
release-dev-project
danielrosehill
Full release workflow for public dev projects — commit, push, bump version, build debian, install locally, create GitHub release with .deb attached.
SkillCFreshness: C★ 1Claude Code +9 - 0.371score
agent-deploy-script
danielrosehill
Use when the user wants to create an agent-specific, low-verbosity variant of the current repo's deployment script for AI agent execution.
SkillCFreshness: C★ 1Claude Code +9 - 0.367score
build-and-push-debian
danielrosehill
Use when the user wants to push changes to GitHub, build a new debian version incrementing the version, and upgrade the local package.
SkillCFreshness: C★ 1Claude Code +9 - 0.367score
build-debian-package
danielrosehill
Use when the user wants to build a new version of the debian package in the current repo, increment the version, and install locally.
SkillCFreshness: C★ 1Claude Code +9 - 0.367score
create-package-release
danielrosehill
Use when the user wants to increment to the next version and create a GitHub release/tag that triggers a debian build workflow.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 21, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from danielrosehill
- 0.470score
plugin-data-storage
danielrosehill
Canonical reference for where Claude Code plugins should persist user data.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
save-plan
danielrosehill
Save a Claude Code plan (from ExitPlanMode, design discussion, or multi-step task) to persistent storage.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
onboard
danielrosehill
First-run onboarding for the adb-ops plugin.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
context-gate
danielrosehill
One-shot context-checkpoint workflow — when the current session is getting cluttered, write a structured handover plan capturing what's done and what's…
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
context-workflow-reference
danielrosehill
Reference and worked example for the CONTEXT.md / CLAUDE.md two-file workflow.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
scaffold-planning
danielrosehill
Create a lightweight `planning/` folder in the current repo with leftover-tasks.md, blockers.md, session-logs/, and handovers/.
SkillAFreshness: A★ 2Claude Code +9
Cite this page
npm-publish skill. Agent Mart. https://agentmart.dev/skills/danielrosehill-npm-publish (last updated 2026-10-24)