This skill provides guidance when users mention npm security vulnerabilities and suggests the automated fix workflow.
This skill activates when the user's request involves:
npm audit or discussing audit resultsWhen a user mentions npm vulnerabilities or security issues in their Node.js project, suggest using the /fix-npm-vuln slash command which provides a complete automated workflow:
npm audit fix with smart escalationnode_modules, build caches, and reinstalls dependencies freshWhen this skill activates, inform the user:
You can use
/fix-npm-vulnto run a complete automated npm vulnerability fix workflow. It will scan all project directories, fix vulnerabilities, verify builds and tests, and create a dedicated branch with all the changes. Would you like to run it?
If a tool required to complete any step is not installed on the current machine, apply the following policy before asking the user:
Check availability — verify whether the tool is missing (e.g. where tool or which tool returns nothing)
Assess risk — a tool is considered low-risk if it is:
npm-check-updates, snyk, yarn, pnpm)Auto-install if low-risk — install silently without asking the user:
npm install -g <tool>winget install <tool>Ask the user if high-risk — if the tool requires admin rights, modifies system config, or is from an unverified source, show the install command and ask for confirmation before proceeding.