list-npm-package-content

List npm package tarball contents via pnpm pack and tar -tzf.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It helps you debug npm publish and packaging issues by revealing the exact files that will be included in a published npm tarball.

Core Features & Use Cases

  • Pre-publish file verification: Confirms what ends up in the generated package tarball so you can catch missing files early.
  • Deterministic packaging workflow: Builds the project, packs it, lists the tarball contents, and cleans up the tarball automatically.
  • Clear inclusion/exclusion rules: Explains how package.json files allowlists, .npmignore, .gitignore, and standard always-included/excluded files affect the final bundle.

Quick Start

Run the command bash scripts/list-package-files.sh from your package directory to output the tarball file list.

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 check what files are included in an npm package before publishing?

To see exactly what files will be published to npm, build the project and generate a tarball using pnpm pack. Enumerating the tarball contents with tar -tzf reveals the exact file list before publishing, helping you catch missing files early.

Why are files missing from my npm package tarball?

Files are missing from your npm package tarball due to inclusion and exclusion rules governed by package.json files allowlists, .npmignore, .gitignore, and standard always-excluded files. Inspecting the packed tarball helps identify which rule caused the omission.

How does pnpm pack determine which files to include in the published tarball?

pnpm pack determines which files to include in the published tarball by applying inclusion and exclusion rules from package.json files allowlists, .npmignore, .gitignore, alongside standard always-included and always-excluded files. Packing the project reveals these exact bundling outcomes.

Can I inspect npm package content without actually publishing to the registry?

You can inspect npm package content without publishing by running a build-then-pack workflow. This generates a local tarball with pnpm pack, lists the files via tar -tzf, and automatically removes the tarball afterward to verify packaging safely.

Does .npmignore override .gitignore when building an npm tarball?

When building an npm tarball, .npmignore takes precedence over .gitignore for determining inclusion and exclusion rules. If .npmignore exists, it overrides .gitignore, while package.json files allowlists take priority to define the final bundled content.