Community编程与开发github.com

olonok69/cursor_code_ml_engineer

使用 pip-audit 审计 Python 依赖,并验证应用仍能正常工作。当用户要求进行 pip-audit、Python CVE 检查或审计 requirements.txt 项目(例如 ex_app)时使用。对于 Node/npm,请使用 audit 技能。

cursor_code_ml_engineer 是什么?

此技能专为 AI 代理设计,用于审计 Python 项目的依赖安全性。当用户提到“审计依赖”、“CVE 检查”或“pip-audit”时,代理会自动定位目标项目文件夹(含 `requirements.txt`),确保 `pip-audit` 工具已安装,并执行安全扫描。扫描结果会列出所有已知漏洞(CVE),并仅在用户明确同意后才执行自动修复。修复后,技能会自动运行项目的测试套件(如 pytest)或执行最小冒烟测试(例如导入主要模块),以验证应用仍然正常工作。该技能支持 Cursor、Claude Code 等主流 AI 编码代理,适用于任何包含 `requirements.txt` 的 Python 项目。它强制代理在修复前征求用户同意,避免自动升级主版本带来的风险。最终输出包含实际命令执行的原始输出,确保透明可信。对于 Node 项目,技能会引导用户使用对应的 `/audit` 技能。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/olonok69/cursor_code_ml_engineer/tree/HEAD/.cursor/skills/audit-python

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

依赖审计(Python)

目标:包含 requirements.txt 的文件夹(例如 ex_app/)。

  1. 进入目标应用目录(或使用用户 @ 提及的路径)。
  2. 确保 pip-audit 已安装:如有必要,执行 python -m pip install pip-audit。
  3. 运行 python -m pip_audit -r requirements.txt(或用户指定的 requirements 文件)。
  4. 不得 在未询问的情况下自动应用主版本升级。如果用户要求安全修复:仅在用户明确确认后,执行 python -m pip_audit -r requirements.txt --fix。
  5. 测试:
    • 如果存在 pytest / tests/ / test_*.py 文件 → 运行 pytest(或 README 中指定的命令)。
    • 如果没有测试套件 → 执行最小冒烟测试:解析 AST 或运行 python -c "import …" 导入主要模块。
  6. 总结:发现的 CVE(如有)、应用的修复(如有)、测试/冒烟测试的结果。

始终显示命令的实际输出(证据优于断言)。

如果目标是 Node(package.json),不要虚构 pip——告知用户使用 /audit 技能。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相关技能