list-npm-package-content

List npm package tarball contents before publishing.

146|12|Updated Jan 30, 2025
One-click install
npx skills add https://github.com/zoonk/zoonk --skill list-npm-package-content-zoonk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: list-npm-package-content
Source: https://github.com/zoonk/zoonk/tree/main/.agents/skills/list-npm-package-content
Command: npx skills add https://github.com/zoonk/zoonk --skill list-npm-package-content-zoonk

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill helps developers verify exactly which files will be included in an npm package tarball before publishing, reducing the risk of missing files or leaking unintended data.

Core Features & Use Cases

  • Tarball contents listing: generate a precise file list from the package tarball produced by the pack step.
  • Packaging awareness: validate that the package respects the files field, .npmignore, and .gitignore rules.
  • Publish debugging: quickly audit and debug what will be published to npm to streamline release checks.
  • Use Case: imagine preparing a package for release and needing to confirm the tarball includes only intended assets.

Quick Start

Run the script from your package directory to build, pack, and list the tarball contents.

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 npm package contents before publishing?

To verify npm package contents before publishing, run a script that builds, packs, and lists the tarball files. This validates that the package respects the files field, .npmignore, and .gitignore rules, reducing the risk of missing files or leaking unintended data.

Why does my npm publish include unwanted files?

Your npm publish includes unwanted files if packaging rules are misconfigured. Debug this by listing the tarball contents before publishing to audit which files are included and ensure the files field, .npmignore, and .gitignore rules are properly honored.

How does npm pack handle .npmignore and .gitignore rules?

The npm pack process honors the files field, .npmignore, and .gitignore rules to determine what gets packed. Listing the tarball contents before publishing allows you to validate that these packaging rules are correctly applied and only intended assets are included.

Do I need pnpm to list npm tarball contents?

Yes, pnpm is required as a dependency to run the script that builds, packs, and lists your npm tarball contents. The script operates via pnpm to manage the temporary artifacts and cleanup required for auditing the package before release.

What is the best way to audit an npm package before release?

The best way to audit an npm package before release is to pack the tarball and list its contents. This allows you to verify file inclusion, debug publish issues, and ensure compliance with packaging rules by checking the exact files that will be published.