# NPM Package API Surface Extractor

> Extracts and documents public API surfaces from NPM packages using TypeScript Compiler API (ts.createProgram) and API Extractor from @microsoft/api-extractor. Generates .api.md report files and .d.ts rollups.

- Skill: `agentskillexchange/npm-package-api-surface-extractor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/npm-package-api-surface-extractor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/npm-package-api-surface-extractor/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/npm-package-api-surface-extractor

---


# NPM Package API Surface Extractor

Extracts and documents public API surfaces from NPM packages using TypeScript Compiler API (ts.createProgram) and API Extractor from @microsoft/api-extractor. Generates .api.md report files and .d.ts rollups.

## Prerequisites

Node.js, TypeScript

## Installation

Requirements and caveats from upstream:
- Missing exports: Suppose the awesome-widgets package exports an API function AwesomeButton.draw() that requires a parameter of type DrawStyle , but you forgot to export this enum. Things seem fine at first, but when a...

Basic usage or getting-started notes:
- API Extractor helps you build better TypeScript library packages. Suppose for example that your company has published an NPM package called “ awesome-widgets ” that exports many classes and interfaces. As developers s...

- Source: https://api-extractor.com/

## Documentation

- https://api-extractor.com/

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/npm-package-api-surface-extractor/)

