npm 与 pip 依赖审计
dependency-audit
审计 npm 或 pip 依赖,检查过时软件包和已知漏洞。适用于检查软件包健康度、发布前准备、合并 PR 前审查依赖,或被问及过时软件包或安全公告(security advisories)时。
- License 许可
- MIT
- 最近更新
- 2026-05-15
- Stars
- ★ 13
- Forks
- 1
01 前言 Front Matter
- name
- dependency-audit
- title
- dependency-audit
- description
- Audit npm or pip dependencies for outdated packages and known vulnerabilities. Use when checking package health, preparing for a release, reviewing dependencies before merging a PR, or when asked about outdated packages or security advisories.
- when_to_use
- Also use when the user mentions CVEs, npm audit output, pip check, dependency rot, or wants to know if it is safe to upgrade a specific package.
- allowed-tools
- Bash(npm outdated) Bash(npm audit) Bash(npm list *) Bash(pip list *) Bash(pip-audit) Bash(pip show *) Read
- argument-hint
- [ "package-name or \"all\"" ]
02 资源文件 7
- 资产文件assets/template.txt9 B
- 脚本helper.py21 B
- 参考文档README.md2.8 KB
- 参考文档references/REFERENCE.md12 B
- 脚本scripts/.hidden8 B
- 脚本scripts/extract.py17 B
- 脚本scripts/helpers/util.py21 B
03 SKILL.md 正文
Dependency audit
Run a dependency health check for the current project. If a specific package name was provided as an argument, focus the audit on that package. Otherwise audit all dependencies.
Step 1: Detect the package manager
Check whether this is a Node.js or Python project:
- If
package.jsonexists in the working directory, use npm. - If
requirements.txt,pyproject.toml, orsetup.pyexists, use pip. - If both exist, audit both.
Step 2: Check for outdated packages
For npm:
npm outdated
For pip:
pip list --outdated
If $ARGUMENTS is a specific package name, filter the output to that package. If $ARGUMENTS is empty or "all", show the full list.
Step 3: Check for known vulnerabilities
For npm:
npm audit
For pip (if pip-audit is available):
pip-audit
If pip-audit is not installed, note its absence and recommend installing it: pip install pip-audit.
Step 4: Summarize findings
Present a concise report:
- Total outdated packages (current version vs latest version for the top 10 most outdated)
- Any vulnerabilities found: severity level, affected package, advisory ID
- Recommended actions in priority order: fix critical vulnerabilities first, then high, then update packages with breaking changes separately from patch updates
- If
$ARGUMENTSnames a specific package: show its current version, latest version, changelog link if available fromnpm info <package> homepageorpip show <package>, and whether any known vulnerabilities affect this specific package
Notes
- Do not modify
package.json,requirements.txt, or any lock file. This skill audits only; it does not upgrade. - If the project has no dependencies file at all, report that and stop.
04 同仓库更多 Skills
版本号升级与 Git 标签
tag-version
升级软件包版本并创建带注释的 git 标签。接受语义化版本号(1.2.0)或升级类型(patch、minor、major)。不执行推送——请使用 publish 技能进行推送。作为发布工作流的一部分使用。
项目完整发布流程
release
运行完整的发布工作流:变更日志条目、版本升级、git 标签和 GitHub Release。依次调用 changelog-entry、tag-version 和 publish。在发布项目新版本时使用。
GitHub 版本发布
publish
将当前分支和所有标签推送到 origin,然后使用最新标签及其 CHANGELOG.md 条目创建 GitHub Release。在 tag-version 之后使用以完成发布。
变更日志条目生成
changelog-entry
按照 Keep a Changelog 格式为所有未发布的提交起草变更日志条目。将提交分组为新增(Added)、变更(Changed)、修复(Fixed)、移除(Removed)和安全(Security)。在发布新版本之前或更新 CHANGELOG.md 时使用。
代码自动格式化
auto-format-on-edit
每次编辑后使用 Prettier 和 ESLint 自动格式化代码文件。当 Claude 编辑文件时在后台激活。格式化是静默的——没有提示,除非格式化程序失败,否则没有输出。当您希望在编码会话期间自动执行一致的格式化时使用。
代码质量审计
code-quality-audit
运行全面的代码质量审计,涵盖安全性、性能和可维护性。用于季度审计、发布前审查或接入大型代码库时。