npm-package-audit

Audit npm package.json fields, exports maps, and build configuration.

3|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/anthril/official-claude-plugins --skill npm-package-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-package-audit
Source: https://github.com/anthril/official-claude-plugins/tree/main/plugins/package-manager/skills/npm-package-audit
Command: npx skills add https://github.com/anthril/official-claude-plugins --skill npm-package-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Audit npm packages for publishing quality, cross-OS compatibility, type declarations, build config, security, and CI/CD — produces a scored report with actionable fixes

Core Features & Use Cases

  • Automated validation of package.json fields (name, version, description, license, files, exports/main)
  • Exports map verification and dual CJS/ESM build compliance
  • Build configuration checks ensuring type declarations, source maps, and correct publish metadata
  • Security and publishing hygiene checks including npm audit, tarball contents, and prerelease workflows
  • Guidance for publishing, changelogs, and contributor-ready documentation

Quick Start

Run the npm-package-audit skill against your project by providing package.json at the project root and executing the audit to generate a structured report.

Frequently Asked Questions about npm-package-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my npm package.json for publishing quality and exports map compliance?

To audit an npm package, validate package.json fields like exports maps, dual CJS/ESM builds, type declarations, and publish metadata to surface gaps in publishing hygiene and generate a scored actionable report.

What is an exports map and why does my JavaScript library need a dual CJS/ESM build?

An exports map defines package entry points for different environments. Enforcing dual CJS/ESM builds and type declarations ensures cross-OS compatibility and correct module resolution for JavaScript and TypeScript libraries.

Can I run an npm package audit locally or does it only work in CI pipelines?

You can run npm package audits across CI pipelines and local development workflows. Providing package.json at the project root triggers the audit to evaluate build configuration, test setup, and publishing workflows.

What's the best way to check npm publishing hygiene and tarball contents before release?

The best way to check npm publishing hygiene is to audit tarball contents, prerelease workflows, and package.json files. This validates security, build configuration, and recommended metadata to produce an actionable scored report.

Does an npm package audit check for type declarations and source maps in the build config?

Yes, npm package audits check build configurations to ensure type declarations and source maps are correctly generated. They verify these alongside package.json fields and dual CJS/ESM build compliance for TypeScript libraries.