Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

npm-trusted-publishing

Skill by github

Sets up or fixes npm trusted publishing (OIDC) in GitHub Actions so releases no longer need a stored NPM_TOKEN. It is for maintainers migrating a release workflow or diagnosing ENEEDAUTH, E404 or E422 publish errors.

  • Score 89
  • 42k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install npm-trusted-publishing

Built from the published package, never by AI.

git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-copilot/skills/npm-trusted-publishing ~/.claude/skills/npm-trusted-publishing

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install npm-trusted-publishing in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The npm trusted publishing skill moves a GitHub Actions release from a stored NPM_TOKEN to npm trusted publishing. GitHub signs a short-lived OIDC token for the run, and npm exchanges it for a publish token. The skill also diagnoses misleading errors left by a half-finished migration. It covers the change from January 2027, when granular tokens that bypass 2FA can no longer publish directly.

The skill works through a checklist: id-token write permission, npm 11.5.1 or newer, removal of token variables from the publish step, a matching repository.url in package.json, a trusted publisher on npm with the exact workflow file name, and a GitHub-hosted runner. It is aimed at maintainers of npm packages who release from GitHub Actions. A separate tool, go-tokenless, can apply the checklist to a repository.

Written from the project's SKILL.md and checked against it.

What it can do

  • Remove NPM_TOKEN from releasesRemoves NPM_TOKEN and NODE_AUTH_TOKEN from the publish step, job and workflow env.
  • Configure OIDC permissionsAdds id-token: write to the publishing job while keeping the scopes it needs.
  • Check trusted publisher setupCovers the npm trust command, workflow file name, environment and reusable workflow rules.
  • Diagnose publish errorsMaps ENEEDAUTH, E404 on PUT and E422 repository.url errors to their usual causes.
  • Flag unsafe triggersWarns against id-token write in workflows triggered by pull_request_target or similar events.

What you need

  • GitHub Actions
  • An npm account with 2FA login
  • Node.js 24 or npm 11.5.1 or newer
  • A GitHub-hosted runner

Try asking

  • Migrate my GitHub Actions release workflow off NPM_TOKEN to trusted publishing.
  • Why does my npm publish fail with ENEEDAUTH in GitHub Actions?
  • Check my package.json repository.url against my trusted publisher setup.

Good to know

  • The npm side, such as adding the trusted publisher, needs the user's npm login with 2FA.
  • Trusted publishing covers GitHub Actions, GitLab.com and CircleCI cloud only.
  • Self-hosted runners cannot use trusted publishing.
  • A package that does not exist yet must be published once by hand first.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/npm-trusted-publishing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB

Alternatives to npm-trusted-publishing

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

npm-trusted-publishing: common questions

Why does npm publish fail with ENEEDAUTH after switching to OIDC?

The usual causes are a missing id-token: write permission, an npm version older than 11.5.1, or a workflow file name that does not match the trusted publisher. The skill's error guide lists these causes.

When will granular tokens that bypass 2FA stop working?

The source says that from January 2027, granular tokens that bypass 2FA can no longer publish directly. The skill is meant to help migrate before then.

Should I delete the old NPM_TOKEN right away?

No. The source says to delete the secret and revoke the token only after the first tokenless release succeeds.

How do I install npm-trusted-publishing?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is npm-trusted-publishing free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is npm-trusted-publishing safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to npm-trusted-publishing?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

npm-trusted-publishing Install

Add to stack

Loading.