Install
openclaw skills install skill-dependency-resolverAutomatically detects and resolves conflicting Python package versions across multiple skill requirements.txt files, generating a merged, conflict-free requi...
openclaw skills install skill-dependency-resolver自动检测并解决技能间的 Python 依赖冲突
当安装多个 OpenClaw 技能时,不同技能可能依赖不同版本的 Python 包(如 pandas、numpy),导致冲突和安装失败。本技能自动扫描所有技能的 requirements.txt,检测版本冲突,并提供自动解决策略,生成统一的 requirements-merged.txt 供一键安装。
pip install 版本冲突错误requirements.txtrequirements.txt| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
skills_dir | string | 否 | ~/.openclaw/workspace/skills | 技能目录路径,递归搜索所有子目录的 requirements.txt |
output_file | string | 否 | ./requirements-merged.txt | 输出的合并后 requirements 文件路径 |
strategy | string | 否 | auto | 冲突解决策略:auto(自动选最高版本),manual(列出冲突等待用户选择) |
report (object): 依赖分析报告
total_skills (int): 扫描的技能数量conflicts_count (int): 检测到的冲突数量solutions (array): 每个冲突的解决方案(包名、冲突版本、选定版本、策略)output_path (string): 生成的 merged requirements 文件路径summary (string): 简要总结skill-dependency-resolver skills_dir="./skills" output_file="requirements.txt"
skill-dependency-resolver strategy="manual"
skill-dependency-resolver output_file="/tmp/merged.txt" | jq '.conflicts_count'
os.walk 递归查找 requirements.txt,跳过 tests/ 和 node_modules/pkg>=1.0,<=2.0 格式auto:取所有版本上限中的最小值(保守)或下限中的最大值(激进,当前使用:选最高版本)manual:输出冲突详情供用户决策requirements.txt 格式,不支持 Pipfile 或 pyproject.toml; python_version < "3.8")pip install,仅生成合并后的文件pyproject.toml 和 Pipfileclawhub install 流程,自动预处理依赖skill-composer:工作流编排,可调用本技能预处理依赖skill-secure-checker:安全扫描,确保合并后的 requirements 无恶意包workspace-heartbeat-integration:定期扫描依赖,保持系统健康作者:小叮当
标签:devops, dependency, installation, quality
许可证:MIT