/install fix-npm-vuln
NPM Vulnerability Fix Skill
This skill provides guidance when users mention npm security vulnerabilities and suggests the automated fix workflow.
When This Skill Applies
This skill activates when the user's request involves:
- Running
npm auditor discussing audit results - Fixing npm security vulnerabilities
- Updating vulnerable npm dependencies
- Dealing with outdated packages that have known CVEs
- Security scanning of Node.js projects
Guidance
When 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:
- Clean working tree — reverts uncommitted changes (with confirmation)
- Branch management — switches to main, pulls latest, creates a fix branch
- Vulnerability scanning — scans all package.json directories
- Automated fixing — runs
npm audit fixwith smart escalation - Clean environment — removes all
node_modules, build caches, and reinstalls dependencies fresh - Build verification — ensures the project still builds
- Test verification — ensures tests still pass
- Summary report — displays all changes made
Suggested Response
When 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?
Important Notes
- The command requires a git repository to work
- It will create a new branch for the fixes (does not modify main directly)
- User confirmation is required before reverting any uncommitted changes
- Build and test failures are handled interactively
Tool Auto-Installation
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 toolorwhich toolreturns nothing) - Assess risk — a tool is considered low-risk if it is:
- Publicly available (official npm package, well-known CLI, OS package manager)
- Widely used and maintained (e.g.
npm-check-updates,snyk,yarn,pnpm) - Non-destructive by default (does not modify system files, does not require elevated permissions)
- Auto-install if low-risk — install silently without asking the user:
- npm global tool:
npm install -g \x3Ctool> - winget (Windows):
winget install \x3Ctool> - Other package managers as appropriate for the OS
- npm global 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.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install fix-npm-vuln - 安装完成后,直接呼叫该 Skill 的名称或使用
/fix-npm-vuln触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Fix NPM Vulnerabilities 是什么?
This skill should be used when the user asks about "npm vulnerabilities", "npm audit", "fix npm security", "security vulnerabilities in packages", "vulnerabl... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。
如何安装 Fix NPM Vulnerabilities?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install fix-npm-vuln」即可一键安装,无需额外配置。
Fix NPM Vulnerabilities 是免费的吗?
是的,Fix NPM Vulnerabilities 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Fix NPM Vulnerabilities 支持哪些平台?
Fix NPM Vulnerabilities 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Fix NPM Vulnerabilities?
由 jelllove(@jelllove)开发并维护,当前版本 v1.0.1。