# ns-replace-package

> Claude/Codex skill by [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars · Updated 2026-09-16

Finds and evaluates alternatives to an npm package. Use when the user wants to replace, drop, or swap a dependency, migrate away from a deprecated/abandoned/risky package, or asks "what can I use instead of X?" Compares candidates with NCM data and provides migration/API-diff guidance. Use ns-upgrade-package for staying on the same package.

## Install

```sh
git clone https://github.com/nodesource/nsolid-skills-plugin /tmp/nsolid-skills-plugin && ln -s /tmp/nsolid-skills-plugin/skills/ns-replace-package ~/.claude/skills/ns-replace-package
```

## From README

Identify the Package to Replace Extract the package name from the user's request. Read package.json to confirm whether it is installed and note the current version and whether it is a direct or dev dependency. Detect package manager by lockfile (pnpm-lock.yaml → pnpm, yarn.lock → yarn, package-lock.json → npm; default npm). Fetch NCM Data for the Target Package Call getPackageQuality for the package being replaced. Document: vulnerabilities (severity + title), license, module risks flagged by NCM (e.g. scripts, obfuscation, author risk, malware), quality scores. Use these findings as the objective reasons why replacement is warranted. Propose Alternatives Based on the package's domain and the user's context, identify 2–3 realistic alternative packages. For each proposed alternative, call getPackageQuality to retrieve its own vulnerability, license, and quality data before recommending it.

## Links

- HTML page: https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-replace-package/
- GitHub: https://github.com/nodesource/nsolid-skills-plugin
- Author: [@nodesource](https://omgskills.com/library/nodesource/index.md)

## More from this repo

- [ns-advanced-memory-leak-hunter](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-advanced-memory-leak-hunter/index.md) — Performs an advanced N|Solid memory leak hunt comparing baseline vs peak heap evidence to isolate retained...
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
- [ns-analyze-asset](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-analyze-asset/index.md) — Analyzes an existing N|Solid diagnostic asset by asset ID or local asset path using asset-summary.
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
- [ns-analyze-event](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-analyze-event/index.md) — Investigates an existing N|Solid event payload and correlates relevant MCP evidence.
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
