publish-preflight

Run local npm publish preflight checks for exports, engines, types, and dist artifacts.

1|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/kjfsm/notion-headless-cms --skill publish-preflight-kjfsm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: publish-preflight
Source: https://github.com/kjfsm/notion-headless-cms/tree/main/.claude/skills/publish-preflight
Command: npx skills add https://github.com/kjfsm/notion-headless-cms --skill publish-preflight-kjfsm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill performs the final publish-time checks locally before npm publish, catching blockers such as missing exports, mismatched engine constraints, missing type definitions, and dist artifacts.

Core Features & Use Cases

  • End-to-end preflight validation: runs publint, attw, and exports/engines checks, and verifies that type definitions and dist artifacts are packaged correctly.
  • Non-destructive and deterministic: safe to run locally or in CI as a prerequisite without publishing.
  • Use Case: before releasing a package, validate readiness to publish to npm to prevent blockers.

Quick Start

Run the preflight to validate that exports, engines, types, and dist are correctly configured before publishing.

Frequently Asked Questions about publish-preflight

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

FAQPage Schema
How do I run preflight checks before publishing an npm package?

To run preflight checks before an npm publish, execute a local validation script that verifies exports, engines, type definitions, and dist artifacts. This deterministic process identifies publishing blockers without producing side effects.

What is npm publish preflight validation and when do I need it?

Npm publish preflight validation is the process of checking a package for missing exports, mismatched engine constraints, or missing dist files before release. You need it to prevent blockers when publishing packages to a registry.

Can I validate package exports and type definitions across a monorepo before publish?

Yes, you can validate package exports and type definitions across a monorepo before publish. The preflight checks use publint and attw to ensure exports, engines, and dist artifacts are correctly configured for all packages.

Does the preflight check script modify my package or have side effects?

No, the preflight check script is non-destructive and deterministic. It safely validates readiness for npm publish locally or in CI without modifying your package or producing any side effects.

What's the best way to catch missing dist artifacts and engine mismatches before npm publish?

The best way to catch missing dist artifacts and engine mismatches is to run an end-to-end preflight validation using publint and attw. This verifies export paths, engines, type definitions, and dist presence before publishing.

Why does my npm package fail to publish due to type definition or export path errors?

Your npm package fails to publish due to type definition or export path errors because preflight validation identifies these blockers. Running checks with attw and publint verifies that exports and types are correctly configured.