npm-package

Set up and validate TypeScript npm packages with consistent package.json structure.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/otto-assistant/bridge --skill npm-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-package
Source: https://github.com/otto-assistant/bridge/tree/main/cli/skills/npm-package
Command: npx skills add https://github.com/otto-assistant/bridge --skill npm-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Typing and npm package boilerplate setup for TypeScript projects is error-prone and repetitive; this guide provides a canonical template that enforces a consistent source-to-distribution build, strict TS defaults, explicit exports, and publish-safe metadata to avoid common misconfigurations.

Core Features & Use Cases

  • Enforces "src" → "dist" builds with tsc and emits declarations for robust packaging.
  • Ensures explicit exports and meaningful metadata in package.json for reliable publishing.
  • Useful when creating or updating any TypeScript npm package in this repository to maintain consistency and reduce setup time.

Quick Start

Run the npm-package skill to scaffold or fix a TypeScript npm package in one step.

Frequently Asked Questions about npm-package

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

FAQPage Schema
How do I scaffold a TypeScript npm package with explicit exports and typings?

To scaffold a TypeScript npm package, this skill automates setting up a canonical template that enforces strict TS defaults, explicit exports, and meaningful metadata in package.json for reliable publishing.

What is the best way to enforce a consistent source-to-distribution build for npm packages?

The best way to ensure a consistent source-to-distribution build is enforcing a standard "src" to "dist" build process with tsc, which emits declarations and applies strict TypeScript defaults across the project.

How do I configure package.json exports for an ESM TypeScript package?

Configuring package.json exports for an ESM TypeScript package requires defining explicit export paths and ensuring the typings field points to the generated declarations to avoid common misconfigurations.

Can I use this npm package setup for monorepos and individual packages?

Yes, this npm package setup applies to project bootstrapping and maintenance across both monorepos and individual packages, ensuring reproducible builds and consistent package.json structure.

Why does my TypeScript npm package publish with missing typings or incorrect exports?

A TypeScript npm package publishes with missing typings or incorrect exports due to boilerplate setup errors; applying a canonical template enforces explicit exports and validates publish-safe metadata to prevent this.