npm-package

npm-package is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 112 tokens per session (3,296 once invoked), scanned A, original, Apache-2.0.

A guide for creating and publishing JavaScript libraries as npm packages. npm is the package registry and tool commonly used to share JavaScript code with other projects.

In plain words
What is it for?
It helps create packages, configure ESM and CommonJS exports, bundle libraries, manage pnpm workspaces, publish versions, add automated release changesets, and fix module-loading errors.
Why use it?
It helps avoid consumer setup problems such as incompatible module formats, missing package entry points, or broken TypeScript declarations.

Skill for Claude CodeCodex

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

Good fit It helps create packages, configure ESM and CommonJS exports, bundle libraries, manage pnpm workspaces, publish versions, add automated release changesets, and fix module-loading errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/medy-gribkov/arcana/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 medy-gribkov/arcana --skill npm-package
Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin npm-package/plugin install 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 npm-package

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/npm-package/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/npm-package)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/npm-package"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/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 npm-package

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/npm-package"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/npm-package.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,296 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00112 $0.03296
Opus 5 $0.00056 $0.01648
Sonnet 5 $0.00022 $0.00659
Haiku 4.5 $0.00011 $0.00330

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

Security

Grade A, and why

npm-package scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/npm-package/SKILL.md · 402 lines

How it starts

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

You are a senior JavaScript package author who ships library code that works everywhere with zero configuration headaches for consumers.

Use this skill when

  • Creating a new npm package from scratch
  • Configuring package.json exports for dual ESM/CJS
  • Setting up tsup or unbuild for library bundling
  • Managing a monorepo with pnpm workspaces
  • Publishing packages to npm (public or private)
  • Debugging "Cannot find module" or "ERR_REQUIRE_ESM" in consumers
  • Setting up changesets for automated versioning

Package.json: The Complete Field Reference

{
  "name": "@scope/my-lib",
  "version": "1.0.0",
  "description": "One line, searchable on npm",
  "license": "MIT",
  "author": "Name <email>",
  "repository": { "type": "git", "url": "https://github.com/user/repo" },
  "type": "module",                    // ESM by default. Omit for CJS-first.
  "main": "./dist/index.cjs",         // CJS entry (Node <12, bundlers fallback)
  "module": "./dist/index.js",        // ESM entry (bundlers: webpack, rollup)
  "types": "./dist/index.d.ts",       // TypeScript declarations
  "exports": {                         // Modern entry point resolution (Node 12+)
    ".": {
      "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
      "require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" }
    },
    "./utils": {
      "import": { "types": "./dist/utils.d.ts", "default": "./dist/utils.js" },
      "require": { "types": "./dist/utils.d.cts", "default": "./dist/utils.cjs" }
    }
  },
  "files": ["dist", "README.md"],     // Whitelist what gets published. Nothing else ships.
  "bin": { "my-cli": "./dist/cli.js" },
  "sideEffects": false,               // Enables tree-shaking in bundlers
  "engines": { "node": ">=18" },
  "keywords": ["relevant", "search", "terms"],
  "scripts": {
    "build": "tsup",
    "dev": "tsup --watch",
    "prepublishOnly": "pnpm build",
    "release": "changeset publish"
  }
}

Critical ordering in exports: types MUST come first in each condition block. Node resolves top-down and TypeScript needs to find declarations before the runtime file.

Read the full file on GitHub · 402 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 402 lines · 112 tokens per session scan A 6d8c7f7417a8

Subscribe to this mod's changes

npm-package is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 112 tokens to every session and 3,296 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.