SuperAPI AI 工具集

ln-823-pip-upgrader

编程与开发

查看项目

更新于 10-15 23:59

技能介绍

用途:升级 Python 项目依赖,覆盖 pip、poetry、pipenv 三种包管理器,并在升级过程中处理破坏性变更。输入为项目路径与包管理器类型,输出更新后的依赖清单及机器可读的依赖升级摘要。

主要能力:按阶段执行 Pre-flight、检测管理器、安全审计、检查过期、应用升级、验证安装、报告结果。安全审计命令:pip 用 pip-audit --json,poetry 用 poetry audit,pipenv 用 pipenv check;Critical 阻断并报告,High 警告后继续,Moderate/Low 仅记录。检查过期命令:pip list --outdated --format=json、poetry show --outdated、pipenv update --outdated。升级命令:pip install --upgrade <package>、pip freeze > requirements.txt、poetry update、pipenv update。跨主版本或出现导入错误时,可用 MCP 工具查询迁移文档(context7、Ref、WebSearch)。验证包括导入冒烟测试 python -c "import <package>" 与 pytest。

使用方式:需存在 requirements.txt、pyproject.toml 或 Pipfile,且包管理器可用,否则阻断升级;虚拟环境未激活会警告。配置项含 upgradeType(major/minor/patch)、auditLevel、minimumReleaseAge、pythonVersion、useVirtualenv、runTests。托管运行由 ln-820 提供 runId 与 summaryArtifactPath;独立运行写入 .hex-skills/runtime-artifacts/runs/{run_id}/dependency-worker/ln-823--{identifier}.json。

适用场景:需要批量更新 Python 依赖并关注破坏性变更与安全问题的项目。限制:资料未提供具体收费、平台支持范围与效果数据;破坏性变更模式需参考 breaking_changes_patterns.md,虚拟环境处理参考 python_venv_handling.md。