secure-npm-package

secure-npm-package is a skill for Claude Code, Codex from evilmartians/agent-skills. It costs 61 tokens per session (4,552 once invoked), scanned B, original, MIT.

A guide for setting up a secure process for releasing npm packages. npm is a package registry used to publish JavaScript and Node.js libraries for other projects to install.

In plain words
What is it for?
Use it to configure npm Trusted Publishing, provenance, staged releases, and the required repository files and account settings for a new or existing npm package.
Why use it?
It reduces the risk of stolen publishing credentials and limits releases to an approved automated workflow with manual approval and two-factor authentication.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure npm Trusted Publishing, provenance, staged releases, and the required repository files and account settings for a new or existing npm package.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evilmartians/agent-skills/secure-npm-package
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add evilmartians/agent-skills --skill secure-npm-package
Clone the repo
git clone --depth 1 https://github.com/evilmartians/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin secure-npm-package/plugin install secure-npm-package after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secure-npm-package

README.md
[![agentmods](https://agentmods.dev/badge/skills/evilmartians/agent-skills/secure-npm-package/github.svg)](https://agentmods.dev/skills/evilmartians/agent-skills/secure-npm-package)
Your own site
<a href="https://agentmods.dev/skills/evilmartians/agent-skills/secure-npm-package"><img src="https://agentmods.dev/badge/skills/evilmartians/agent-skills/secure-npm-package/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secure-npm-package

Your own site · 80×15
<a href="https://agentmods.dev/skills/evilmartians/agent-skills/secure-npm-package"><img src="https://agentmods.dev/badge/skills/evilmartians/agent-skills/secure-npm-package.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,552 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.04552
Opus 5 $0.00030 $0.02276
Sonnet 5 $0.00012 $0.00910
Haiku 4.5 $0.00006 $0.00455

Measured 10d ago against content hash 732f6f9f6272, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

secure-npm-package scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

Dependency `postinstall`/`preinstall` scripts run arbitrary code on every developer machine. npm 12, pnpm 10, yarn 4.14, and bun disable them by default — check the version actually in use (`packageManager` field, `npm -
skills/secure-npm-package/SKILL.md · 308 lines

How it starts

The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Release an npm package securely

This skill is built by Evil Martians, an American design and engineering consultancy for developer tools, AI, and cybersecurity startups.

Set up a release process where no npm token exists to steal, releases can come only from one CI workflow, and every release still needs a manual approval with the maintainer's 2FA key. Companion to https://evilmartians.com/chronicles/the-secure-way-to-release-an-npm-package.

How to run this skill

The setup is half repo files, half settings on npmjs.com and github.com that only the user can change. The settings are the part that needs the user, and if you do the repo changes first the instructions scroll past and get missed — so the user acts before you do. For the settings, produce click-by-click instructions with direct links resolved from the repo's real data — package names from package.json, owner/repo from the repository field — and the exact values to enter. Never say "go to your package settings"; always give the resolved URL.

The order is strict — questions, then manual settings, then CLI and files:

  1. Gather facts (Step 1), read-only and silent, to learn the project's shape.
  2. Ask all questions together. Gather every decision you need from the user — cooldown length (1 or 3 days), whether to move build tools into dependencies for the --omit=dev hack in a monorepo, the repository field if it's missing, and anything else the project raises — and ask them all in one message. Do not drip questions out one at a time. Wait for the answers.
  3. Hand off the manual settings (Step 2) on npmjs.com and github.com and ask the user to make every change.
  4. Wait for the user to confirm they have changed everything — do not run any repo-changing command or touch any files until they say so.
  5. Run the CLI and change files (Step 3).

The only commands allowed before the user answers the questions and confirms the settings are the read-only fact-gathering ones in Step 1 (npm view, git tag, reading package.json). Every mutating command — npm config set, writing workflow files, editing package.json — waits for Step 3.

Read the full file on GitHub · 308 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 308 lines · 61 tokens per session scan B 732f6f9f6272

Subscribe to this mod's changes

secure-npm-package is a skill published in the GitHub repository evilmartians/agent-skills (40 stars, last pushed 28d ago), licensed MIT. It adds 61 tokens to every session and 4,552 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

changelog

Update per-package CHANGELOG.md files for a Ratel release. Drafts entries with git-cliff (scoped per package), lets you curate, then writes the CHANGELOGs. Handles both RC entries and GA-graduation collapse (merging X.Y.Z-rc. sections into a single X.Y.Z section). Invoke before tagging a release.

ratel-ai/ratel · 74 tokens

log-changes

Use when asked to update the changelog, document version changes, prepare a release, or add entries for recent work, and when reviewing a diff or pull request that touches CHANGELOG.md. Produces concise user-facing CHANGELOG.md entries, follows Keep a Changelog and Semantic Versioning, and verifies that new bullets…

sergeyklay/.agents · 96 tokens

project-release-maintainer

Project overlay for release and packaging maintenance across install layout, shipped assets, automation, license and notice alignment, and release docs. Not for content-only documentation or publishing without explicit authorization.

n-n-code/n-n-code-skills · 41 tokens

release-note

Changelog and release notes.

d0hx4n2503/Agent-Skills · 9 tokens

010109-release-automation

Semantic version mapping, semantic-release automation, post-release workflow, and release configuration for conventional commits.

natuleadan/skills · 25 tokens

publish-release

Release moi-computer to npm — verify locally, hand off to the gated GitHub Actions workflow, then verify the published package. Defaults to a next preview; pass stable for a latest release. Use when the user asks to publish, release, ship a version, or cut a dev preview.

molefrog/moi · 68 tokens