npm-package-develop

Guides dual-format ESM/CJS npm publishing with TypeScript and automated workflows.

11|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/Takazudo/claude-resources --skill npm-package-develop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-package-develop
Source: https://github.com/Takazudo/claude-resources/tree/main/skills/npm-package-develop
Command: npx skills add https://github.com/Takazudo/claude-resources --skill npm-package-develop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the creation, configuration, and publishing of npm packages by guiding dual-format (ESM/CJS) setups, TypeScript integration, and CI-ready workflows.

Core Features & Use Cases

  • Dual-format publishing with proper exports maps for ESM and CJS.
  • TypeScript configuration, testing, and publishing pipelines tailored for libraries and CLI tools.
  • Real-world workflows from local development to automated publishing and release validation.

Quick Start

Set up a new npm package with dual ESM/CJS exports, TypeScript configuration, and basic publish tooling.

Frequently Asked Questions about npm-package-develop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure an npm package for dual ESM and CJS publishing?

Dual ESM and CJS publishing requires configuring the package.json exports map to define distinct entry points for each format. This Skill guides setting up the exports structure, TypeScript configuration, and bundler outputs to ensure both module systems resolve correctly.

What is the exports map in npm package configuration?

The exports map is a package.json field defining how module entry points resolve across environments. It maps specific import paths to ESM or CJS files, ensuring consumers receive the correct format for their runtime while preventing deep import access.

How do I set up TypeScript and tsup for a dual-format npm package?

Setting up TypeScript and tsup involves configuring tsconfig module resolution options and using tsup to bundle ESM and CJS outputs. This Skill provides the necessary configuration steps, bundler setup, and prepublish scripts to generate dual-format builds.

Can I use this to publish a TypeScript CLI tool with both ESM and CJS support?

Yes, this Skill applies to both library authors and CLI tools needing dual-format support. It tailors TypeScript configuration, exports maps, and publishing pipelines specifically for CLI tools requiring ESM and CJS compatibility.

What is the best way to automate npm package publishing and quality checks?

Automating npm package publishing requires setting up prepublish scripts and CI-ready workflows to validate release quality. This Skill guides configuring automated publishing pipelines and publishing-quality checks to ensure releases are validated before deployment.