/ratchet-code:npm-publishingfrom ratchet-code
Use when publishing a new package, moving a package to trusted publishing, writing or reviewing a release workflow that bumps a version and publishes it, or fixing a CI publish that fails with E404 or ENEEDAUTH. Prepare a first npm publish and trusted publishing (OIDC) for a human to run, and set up the GitHub Actions workflow that bumps, tags, and publishes.
Ships in ratchet-code. 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.
Read when SKILL.md points to them.
Prepare the local package. Leave public registry writes and trusted-publisher mutations to the
human. Read every applicable AGENTS.md from the repository root through the
package. Repository-local policy owns the package path and name, npm scope, GitHub repository,
release workflow, build commands, and whether a laptop may publish, and overrides these defaults.
owner/repository, and the release workflow filename. The workflow value is the
case-sensitive filename under .github/workflows, not a path. Leave no placeholders in the final
commands.npm trust with --allow-publish (npm 11.15 or newer),
account-level two-factor authentication, and write access to the package or scope.id-token: write, use a supported runner, set
registry-url on actions/setup-node, run an npm that publishes with OIDC and no token (npm 11.5.1 or newer; check npm --version,
since Node 22 bundles npm 10, which cannot), and publish this package with no npm token.
references/release-workflow.md has the publishing job and
explains the E404 and ENEEDAUTH failures; read it when a publish from CI fails.npm publish <package-directory> --access public --dry-run. Stop if it includes secrets,
environment files, source maps, unrelated workspace files, or a missing runtime or type
entrypoint. The dry run must include prepublishOnly. A pack-only check misses that script.prepublishOnly, prepare, prepack, publish, and postpublish scripts
before the dry run, which executes the pre-publish ones. Hand off any script that changes
something outside the working tree instead of running it.npm trust list <package-name> before any
mutation. Omit the initial publish command. If trust already exists, report it and omit trust
creation. Do not revoke or replace it.A release is one run of one workflow. A person starts it; the workflow does the rest.
id-token, and the job that publishes gets no write
access to the repository.RELEASE_TOKEN secret, read by the pushing
job only. A person creates it: a fine-grained token limited to this repository with Contents
read and write, owned by someone on the branch ruleset's bypass list. Hand over those steps;
never ask for the token's value.references/release-bump-and-push.md has the workflow and the reasons; read it when writing or reviewing a release workflow.
npm publish or a mutating npm trust subcommand.OTP shell variable. Tell the human to set it
first with read -s OTP, which keeps the code out of shell history, and to set it again before
the second command if the code has expired. Tell them not to share or record the code. Warn that
--otp still exposes the code in process arguments while the command runs, and to follow local
secret-handling policy. Never ask for the code or put a value in the commands.--otp=$OTP and complete the browser prompt npm opens.cd /absolute/repository/root
read -s OTP
npm publish ./relative/package-directory --access public --otp=$OTP
npm trust github @scope/package \
--repo owner/repository \
--file release.yml \
--allow-publish \
--yes \
--otp=$OTP
cd target is the directory from which the relative publish path resolves.npm trust list again.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-code12 skills in this plugin
/interface-feedbackUse when writing or reviewing interface code that shows an action button, a toast or error message, or a form's submit, including a review of such a diff. Show only the actions the server allows this viewer and why one is blocked, render errors by code with their details, and check a submit's preconditions so it never succeeds partly in silence./lint-rule-authoringUse when writing or reviewing the code of a lint rule, analyzer, or codemod that walks a syntax tree, such as an ESLint or oxlint rule, a Clippy lint, or a custom AST check, including a request to "write a rule that bans X". Covers finding the rule's subject by what a name is bound to, reporting a name it cannot trace, and the fixtures that prove both./