add-export

Add a public subpath export to the MCP-ts-core package.

148|28|Updated Mar 20, 2025
One-click install
npx skills add https://github.com/cyanheads/mcp-ts-core --skill add-export
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-export
Source: https://github.com/cyanheads/mcp-ts-core/tree/main/skills/add-export
Command: npx skills add https://github.com/cyanheads/mcp-ts-core --skill add-export

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add a new public subpath export to the MCP-ts-core package to expose a dedicated API surface for external consumers, enabling a cleaner public surface and forward-compatibility.

Core Features & Use Cases

  • Define a new entry point under the package exports and map it to the corresponding dist file when built.
  • Keep the CLAUDE.md exports catalog in sync with package.json and verify the new path resolves to the source tree.
  • Use this approach when introducing a new public API surface that should be importable via a distinct module path (for example, ./newutil).

Quick Start

Update the exports by adding a new subpath to package.json, update CLAUDE.md accordingly, and run bun run build to verify the new subpath export.

Frequently Asked Questions about add-export

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

FAQPage Schema
How do I add a new subpath export to a TypeScript package?▼

To add a subpath export, update the package.json exports field to map the new entry point to its dist file, sync the CLAUDE.md catalog, and verify with bun run build.

Why do I need to update CLAUDE.md when adding package exports?▼

Updating CLAUDE.md keeps the exports catalog in sync with package.json, ensuring the new public API surface is documented and the source-to-dist path mappings are verifiable.

When should I use subpath exports instead of a single main entry point?▼

Use subpath exports when introducing a dedicated public API surface that consumers import from a distinct module path, enabling cleaner imports and forward-compatibility.

What is the best way to verify a new subpath export resolves correctly in a build pipeline?▼

Run bun run build after updating package.json exports to verify the new subpath resolves correctly and preserves the source-to-dist path mappings for the TypeScript library.

Does adding a package.json export require coordinating changes across other project files?▼

Yes, adding a package.json export requires coordinated updates to the CLAUDE.md exports catalog and verifying the build pipeline successfully preserves the source-to-dist mapping.

What limitations exist when exposing new public API surfaces through subpath exports?▼

Subpath exports require maintaining strict synchronization between package.json and CLAUDE.md, and any build pipeline failure in source-to-dist mapping will prevent the new import path from resolving.