# List Npm Package Content

> List the contents of an npm package tarball before publishing.

List the contents of an npm package tarball before publishing. Use when the user wants to see what files are included in an npm bundle, verify package contents, or debug npm publish issues.

- Page: https://ss33.ai/skills/vercel/list-npm-package-content-81550354846
- Publisher: vercel
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Developer docs & tooling](https://ss33.ai/skills/category/software-development-t44z8z/developer-docs-and-tooling-nich6w)
- License: Apache-2.0
- Source: https://github.com/vercel/ai/blob/d08bb664284fefe1201076626781dfe4e416a9b9/skills/list-npm-package-content/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/vercel/list-npm-package-content-81550354846

# 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
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.
