New to Claude Skills? Learn how to install them →

vercel on GitHub

List NPM Package Content

OfficialFree

Verify and list files in your npm package tarball.

by vercel26.1k stars on vercel/ai
2 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What List NPM Package Content does

The List NPM Package Content skill is designed for developers who need to inspect the contents of an npm package tarball before publishing. This skill is particularly useful for ensuring that the correct files are included in the package, which can help prevent issues during the npm publish process. By running a simple script, users can see exactly what will be uploaded to npm, allowing for better control over package contents and debugging of potential problems.

To use this skill, simply execute the provided bash script from the package directory. The script automates the process of building the package, creating a tarball, and listing its contents, while also cleaning up afterward. This means you can quickly verify the files included without manual intervention. The output will reflect the files determined by the files field in package.json, any exclusions specified in .npmignore or .gitignore, and the default inclusions and exclusions dictated by npm.

This skill is ideal for developers who are packaging their JavaScript projects for distribution via npm. It helps in maintaining clarity about what files are part of the package, thus avoiding surprises for users who download the package. Additionally, it can serve as a debugging tool to identify issues related to missing or extraneous files that may arise during the publishing process.

Overall, the List NPM Package Content skill streamlines the verification process for npm packages, making it a valuable addition to any developer's toolkit.

When to use it

Use this tool when preparing to publish an npm package and you need to verify its contents.

When not to use it

This skill is not suitable for managing or modifying package dependencies or for tasks unrelated to npm package content verification.

What you can build with it

Verifying Package Contents Before Publishing

Run the skill to ensure that only the intended files are included in your npm package tarball.

Debugging Publish Issues

Use the skill to identify missing or unexpected files that may cause problems during the npm publish process.

Streamlining Package Management

Incorporate this skill into your workflow to maintain clarity and control over your npm package contents.

How to install List NPM Package Content

View source

1. Install with the skills CLI

npx skills add vercel/ai/list-npm-package-content --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by vercel

List npm Package Content

This skill lists the exact contents of an npm package tarball - the same files that would be uploaded to npm and downloaded by users.

Usage

Run the script from the package directory (e.g., packages/ai):

bash scripts/list-package-files.sh

The script will build the package, create a tarball, list its contents, and clean up automatically.

Understanding Package Contents

The files included are determined by:

  1. files field in package.json - explicit allowlist of files/directories
  2. .npmignore - files to exclude (if present)
  3. .gitignore - used if no .npmignore exists
  4. Always included: package.json, README, LICENSE, CHANGELOG
  5. Always excluded: .git, node_modules, .npmrc, etc.

Frequently asked questions about List NPM Package Content

Similar skills