list-npm-package-content

Lists the contents of an npm package tarball before publishing.

8|Updated Mar 7, 2025
One-click install
npx skills add https://github.com/khulnasoft/ai-toolkit --skill list-npm-package-content-khulnasoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: list-npm-package-content
Source: https://github.com/khulnasoft/ai-toolkit/tree/main/skills/list-npm-package-content
Command: npx skills add https://github.com/khulnasoft/ai-toolkit --skill list-npm-package-content-khulnasoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pnpm, and includes scripts (resource) components.

What problem does it solve?

List the contents of an npm package tarball before publishing to ensure visibility into publish contents and to catch unintended inclusions.

Core Features & Use Cases

  • Preview tarball contents before publish to verify include/exclude rules defined in package.json, .npmignore, and .gitignore.
  • Debug npm publish issues by inspecting the generated tarball contents.

Quick Start

Run the script from the project root to build, pack, and list the contents of the resulting tarball.

Frequently Asked Questions about list-npm-package-content

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

FAQPage Schema
How do I preview npm package contents before publishing?

You can preview npm package contents by building and packing the tarball to inspect its exact files. This verifies include and exclude rules defined in package.json, .npmignore, and .gitignore before release.

Why does my npm publish include unintended files?

Unintended files are included when ignore rules are misconfigured. Packing the tarball and listing its contents lets you debug the exact files captured by package.json, .npmignore, and .gitignore configurations.

How to list tarball contents across npm packages in a monorepo?

To list tarball contents across npm packages in a monorepo, run the script from the project root during your release workflow. It builds, packs, and lists the resulting tarball files to verify publish visibility.

Do I need pnpm to inspect npm package tarball contents?

Yes, you need pnpm installed to build and pack the package. You also need standard tar tooling to inspect the generated tarball and standard package.json configurations to define the include and exclude rules.

What is the best way to verify files included in an npm publish?

The best way to verify files included in an npm publish is to generate and inspect the tarball prior to release. This catches unintended inclusions by validating your packaging and release workflows against the actual output.