npm
/npm
Pomaga zarządzać zależnościami JavaScript i Node.js: package.json, pliki lock, workspaces w monorepo, skrypty, audyty bezpieczeństwa i publikowanie pakietów.
- Autor
- G1Joshi ↗
- Repozytorium
- Agent-Skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 01.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pomaga zarządzać zależnościami JavaScript i Node.js: package.json, pliki lock, workspaces w monorepo, skrypty, audyty bezpieczeństwa i publikowanie pakietów.
Oryginalny opis (EN)
Expert npm package manager assistance covering package.json, lockfiles, workspaces (monorepos), scripts, and security audits. Use when managing JavaScript/Node.js dependencies and publishing packages.
Jak działa
- When to Use
- Quick Start
- Core Concepts
- Common Patterns
- Best Practices
- Troubleshooting
- References
Podgląd SKILL.md
---
name: npm
description: Expert npm package manager assistance covering package.json, lockfiles, workspaces (monorepos), scripts, and security audits. Use when managing JavaScript/Node.js dependencies and publishing packages.
---
# npm
npm is the default package manager for Node.js, providing dependency resolution, workspace management, security auditing, and publishing workflows for JavaScript ecosystems.
## When to Use
- **JavaScript / TypeScript Package Management**: Installing, publishing, and managing npm modules and dependencies.
- **Multi-Package Monorepos (npm Workspaces)**: Coordinating interconnected local packages with unified dependency resolution.
- **Supply Chain Security & Provenance**: Publishing packages with cryptographically verifiable build provenance.
- **Vulnerability Auditing & Dependency Overrides**: Resolving transitively vulnerable packages using `overrides`.
## Quick Start
```bash
npm init -y
npm install lodash
npm install --save-dev jest
# Monorepo
npm init -w packages/my-lib
```
## Core Concepts
### Configuring npm Workspaces in Monorepos
Declaring multi-package structures in root `package.json`:
```json
{
"name": "enterprise-monorepo",
"private": true,
"workspaces": ["packages/*", "apps/*"],
"scripts": {
"build": "npm run build --workspaces --if-present",
"test": "npm test --workspaces --if-present"
},
"overrides": {
"glob": "^10.4.0",
"semver": "^7.6.0"
}
}
```
### Clean Installations & Deterministic Lockfiles
Installing dependencies in continuous integration:
```bash
# Clean install adhering strictly to package-lock.json (never mutates lockfile)
npm ci
# Audit dependencies for known CVEs
npm audit --audit-level=high
# Run targeted script across all workspaces
npm run test --workspace=packages/core-utils
```
### Publishing Packages with Cryptographic Provenance
Publishing to the npm registry with supply-chain verification:
```bash
# Publish package with Sigstore verifiable provenance
npm publish --access public --provenance
```
## Common Patterns
### Monorepo Workspaces Configuration
**Problem**: Managing shared libraries across multiple internal packages without publishing to external registries.
**Solution**:
Use native npm workspaces in root `package.json`:
```json
{
"name": "my-monorepo",
"private": true,
"workspaces": ["packages/*", "apps/*"],
"scripts": {
"build": "npm run build --workspaces --if-present",
"test": "npm test --workspaces"
}
}
```
## Best Practices
**Do**:
- Always use `npm ci` in CI/CD pipelines instead of `npm install` to enforce exact lockfile dependencies.
- Publish public packages with `--provenance` to establish cryptographic build transparency.
- Use `overrides` in root `package.json` to resolve security vulnerabilities in deep transitive dependencies.
- Commit `package-lock.json` to version control in all projects.
**Don't**:
- Use `npm install --force` or `--legacy-peer-deps` in production builds; resolve peer version conflicts cleanly.
- Publish packages containing sensitive files; maintain an explicit `.npmignore` or `"files"` whitelist.
- Execute untrusted scripts during install without verifying packages (`npm install --ignore-scripts`).
## Troubleshooting
| Error | Cause | Solution |
| :----------------------------------------------------- | :----------------------------------------------------------------------- | :-------------------------------------------------------------------------- |
| `npm ERR! code ERESOLVE: could not resolve dependency` | Peer dependency version conflict. | Run `npm install --legacy-peer-deps` or align conflicting package versions. |
| `npm ERR! code EACCES: permission denied` | Installing global packages without permissions on system node directory. | Configure user npm prefix: `npm config set prefix ~/.npm-global`. |
| `package-lock.json out of sync` | Dependencies installed with different npm major versions. | Delete `node_modules` and run `npm ci` for strict deterministic installs. |
## References
- [npm Documentation](https://docs.npmjs.com/)
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · G1Joshi/Agent-Skills | 100 | MIT |
| intentic/intentic | 90 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki b9c504de5cee (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90npm-workspaces # prettier-ignore
Pomaga zarządzać monorepo npm workspaces: zależności pakietów, kolejność buildów, rozwój między pakietami i publikacja. - 95package-management
Pomaga wybierać i konfigurować menedżery pakietów JavaScript i TypeScript npm, yarn, pnpm i bun, zarządzać zależnościami, workspace'ami monorepo, plikami lock oraz publikować pakiety. - 100bun-package-manager
Zarządza zależnościami przez menedżer pakietów Bun: instalacja pakietów, przestrzenie robocze, lockfile'e i migracja z npm, yarn i pnpm. - 100uv-workspaces
Zarządza wielopakietowymi projektami Pythona przez workspaces uv: monorepo, wspólne pliki lock i zależności członków. - 98monorepo-management
Pomaga zarządzać monorepo JavaScript i TypeScript: Turborepo, Nx, workspaces pnpm i npm, granice pakietów, zdalny cache, CI dla zmienionych pakietów, Changesets i cykliczne zależności. - 90monorepo-workspaces
Prowadzi monorepo JavaScript i TypeScript z workspaces, orkiestracją zadań i wersjonowaniem wewnętrznych pakietów, gdy buildy i instalacje rosnącego monorepo zwalniają.