Skill dependency analyzer
分析 GitHub 仓库中的 skill 脚本,自动识别 Python 依赖并生成 requirements.txt 文件。用于快速了解 skill 的依赖环境,方便本地部署和运行。From its SKILL.md
npx -y skills add zhou-xingxing/my-skills --skill skill-dependency-analyzerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, 509 tokens by cl100k_base, as published. Nobody here has run it
Skill Dependency Analyzer
分析 GitHub 仓库中的 skill 脚本,自动识别 Python 第三方依赖并生成 requirements.txt 文件。
功能
- 脚本发现:克隆 GitHub 仓库并扫描 scripts/、src/、lib/、根目录下的 Python 脚本文件
- Python 依赖分析:识别 import/from 语句,生成 requirements.txt
- 标准库过滤:自动过滤 Python 标准库和相对导入
使用方法
- 用户提供 GitHub 链接(支持
user/repo、github.com/user/repo等格式) - Agent 展示发现的 Python 脚本,询问分析范围(all 或指定文件)
- 执行分析并展示结果
- 询问是否保存 requirements.txt
示例:
用户:分析 https://github.com/user/skill-repo
🐍 Python 依赖: requests, beautifulsoup4
是否保存 requirements.txt?(y/n)
用户:y
✅ 已生成 requirements.txt
命令行快速使用
# 基本用法
python3 scripts/run_analyzer.py <仓库URL>
# 保存到指定目录
python3 scripts/run_analyzer.py <仓库URL> --output-dir ./dependencies
# 详细输出模式
python3 scripts/run_analyzer.py <仓库URL> --verbose
# 查看帮助
python3 scripts/run_analyzer.py --help
技术细节
- 检测方式:静态正则匹配 import/from 语句
- 过滤规则:自动过滤 Python 标准库和相对导入
- 克隆策略:使用浅克隆(depth=1)减少下载量
- 临时文件:自动清理,不污染用户目录
What ships with it: 3 files
16.8 KB alongside SKILL.md, 3 of them executable
scripts/
- dependency_analyzer.pyruns7.8 KB
- github_parser.pyruns4.2 KB
- run_analyzer.pyruns4.8 KB