list-npm-package-content

List files inside an npm package tarball generated by pnpm pack.

27|16|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/mandor1428/TEAM-LLM --skill list-npm-package-content-mandor1428
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: list-npm-package-content
Source: https://github.com/mandor1428/TEAM-LLM/tree/main/skills/list-npm-package-content
Command: npx skills add https://github.com/mandor1428/TEAM-LLM --skill list-npm-package-content-mandor1428

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Confidently verify which files are included in an npm tarball before publishing so you can prevent missing assets or unexpected bundles from reaching users.

Core Features & Use Cases

  • Build-and-pack validation: Generates the same tarball that npm publishes and lists its exact contents.
  • Rule-driven file inclusion: Reflects npm packaging behavior based on package.json files allowlist, .npmignore/.gitignore exclusions, and npm’s always-included metadata files.
  • Use case: Diagnose a broken release where users report missing compiled files (or oversized bundles) by inspecting the packed tarball contents right before publishing.

Quick Start

Run the script from your package directory by executing the shell command: bash scripts/list-package-files.sh.

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 list exactly which files are included in an npm package before publishing?

To list npm package contents before publishing, run a script that executes pnpm build and pnpm pack to generate a tarball, then enumerates included files with tar -tzf before removing the temporary archive.

Why does my npm publish workflow include unexpected files or miss compiled assets?

npm publish workflows miss assets or include unexpected files when package.json files field, .npmignore, or .gitignore exclusions are misconfigured. Packing and listing the tarball contents diagnoses the exact inclusion behavior.

Does npm pack respect the files field and ignore rules when building a tarball?

Yes, npm pack respects the files field allowlist, .npmignore and .gitignore exclusions, and always includes required metadata files. Generating a tarball and enumerating its contents reflects these exact packaging rules.

What is the best way to verify tarball contents for release troubleshooting?

The best way to verify tarball contents for release troubleshooting is generating the actual publish tarball via pnpm pack, listing all packaged files with tar -tzf, and deleting the temporary tarball afterward.

Can I use pnpm to debug missing or extra assets in an npm package?

Yes, you can use pnpm to debug missing or extra assets by running pnpm build followed by pnpm pack to create the tarball, then inspecting the enumerated file list to identify packaging rule discrepancies.

What are the limitations of verifying npm package contents with a local pack?

This local pack verification requires executing pnpm build and pnpm pack within the package directory, generating a temporary tarball file that is removed after enumeration, and depends on the local environment matching publish conditions.