Skip to main content
skill CX Codex

npm-package — Claude Code skill: build and publish npm packages

A skill that walks the agent through building an npm library on Bun: scaffolding, strict TypeScript, tests, bundling and publishing.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jwynia/agent-skills --skill npm-package -a claude-code
Open on GitHub

What npm-package does

The skill covers the whole life of an npm package, from an empty folder to npm publish. It ships a scaffold.ts script that lays out the project, a set of configuration rules, and reference docs on the exports map, strict TypeScript and the publishing workflow. The agent leans on those when it edits package.json, tsconfig.json or bunup.config.ts.

The toolchain is fixed: Bun for runtime and packages, Bunup for bundling and .d.ts generation, Biome for formatting, ESLint with typescript-eslint for type-aware rules, Vitest for tests, Changesets for versions. The skill bans any, bans main in place of exports, and bans paths in a published package — tsc does not rewrite aliases, so consumers cannot resolve them.

Scope is narrow. It targets a single-package repo, not a monorepo, and it is not meant for an npx CLI or an application. Bundling goes through Bunup, so without Bun in the project the steps will not run.

What it helps with

  • scaffold a fresh npm package layout
  • set up a strict tsconfig for a published library
  • fix the exports map and CJS/ESM interop
  • produce dual ESM and CJS output with type declarations
  • prepare a release with Changesets and publish with provenance

Example prompts for the agent

  • Create a new npm package my-lib using the npm-package skill
  • Check the exports map in package.json and fix the CJS/ESM interop
  • Set up Vitest with coverage thresholds and bundle the package with Bunup

How to install npm-package

1Skills CLI (Vercel)

npx skills add jwynia/agent-skills --skill npm-package -a claude-code

2Manually: put the files in place

~/.claude/skills/npm-package/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/npm-package/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about npm-package

How do I install npm-package in Claude?

Run npx skills add jwynia/agent-skills --skill npm-package -a claude-code. The skill file then lives at ~/.claude/skills/npm-package/SKILL.md.

What does npm-package do?

It guides the agent through creating and publishing an npm library: scaffolding, strict TypeScript, linting, tests, bundling and release. Bun is the primary toolchain, and the output stays npm-compatible.

Does it work in a monorepo?

No, it targets a single-package repo. It also is not built for an npx CLI or for an application.

Similar skills

All skills for Programming languages →

From the same set81

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor