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.
npx skills add jwynia/agent-skills --skill npm-package -a claude-codeWhat 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
exportsmap 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
exportsmap 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-code2Manually: put the files in place
~/.claude/skills/npm-package/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/npm-package/
1Skills CLI (Vercel)
npx skills add jwynia/agent-skills --skill npm-package -a codex2Manually: put the files in place
.agents/skills/npm-package/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jwynia/agent-skills --skill npm-package -a cursor2Manually: put the files in place
.cursor/skills/npm-package/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jwynia/agent-skills npm-package2Manually: put the files in place
.github/skills/npm-package/SKILL.md1Skills CLI (Vercel)
npx skills add jwynia/agent-skills --skill npm-package -a gemini-cli2Platform CLI
gemini skills install https://github.com/jwynia/agent-skills --path skills/tech/development/tooling/npm-packageManually: put the files in place
.devin/skills/npm-package/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jwynia/agent-skills --skill npm-package -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.