dependency-doctor
它能做什么
这项技能检查单个依赖文件中的常见问题,例如未锁定版本的软件包、已停止维护的回移植版本,以及重复或冲突的条目。适合希望在安装时或安装前发现这些问题的开发者。
适用场景
- ✓你询问 requirements 或包文件是否存在依赖问题的时候。
- ✓安装软件包失败,你想排除文件本身的问题的时候。
- ✓你怀疑依赖中存在旧的版本锁定或重复条目的时候。
技能链接
https://github.com/Shubhamsaboo/awesome-llm-apps/blob/main/agent_skills/dependency-doctor/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我的 requirements.txt 是否存在依赖问题,并提出安全的修复建议,但先不要做任何修改。”
每周 5 个新技能,1 分钟读完。
工作原理
它读取你选择的文件,用通俗的语言解释发现的问题,并提出一个小的修复方案供你审阅。它不会诊断每一次安装失败。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Dependency Doctor
Inspect one dependency manifest on the user's machine for direct, surface-level footguns. Explain each finding in plain language, then offer a small, reviewable fix. This does not diagnose a failed pip or uv resolution.
This is a local developer tool for a project the user chooses. It is not a repository-wide lint rule, a CI gate, or a proposal to enforce dependency policy across unrelated apps.
When to use
- The user asks to check, audit, diagnose, or autopsy a dependency manifest
- The user wants to rule out direct-manifest issues before deeper install debugging
- The user suspects stale pins, backports, duplicate entries, or dependency rot
- The user asks whether anything looks wrong with their dependencies
When not to use
- Installing the current dependencies without diagnosing them
- Upgrading every package or adding a new package
- A full vulnerability audit. Use
pip-audit,npm audit, or the project's approved security scanner for CVE coverage - Creating a repo-wide CI check. This skill is user-invoked and local
Choose the manifest
Use the path the user names. If no path is given and several manifests exist, ask which one to inspect. Do not sweep the repository or edit anything merely because the skill was triggered.
Supported inputs:
requirements.txtpyproject.tomlusing PEP 621 or common Poetry dependency tablespackage.jsondependency sections
Run the offline diagnosis
From this skill directory:
python3 scripts/dep_doctor.py /path/to/requirements.txt --json
The default path is fully offline. It reads only the selected manifest. The report shape is:
{
"file": "/path/to/requirements.txt",
"findings": [
{
"severity": "high",
"kind": "stdlib-shadowing",
"package": "pathlib",
"line": 4,
"why": "...",
"fix": "..."
}
],
"summary": {
"total": 1,
"by_severity": {"high": 1},
"by_kind": {"stdlib-shadowing": 1},
"online": false
}
}
The offline checks cover:
- Python standard-library names published as packages
- Known backports that should not be installed on supported Python versions
- Dependencies without a usable version constraint
- Repeated package entries
- Conflicting exact pins for the same package
For package.json, Python-specific standard-library and backport checks do not
apply. The doctor still checks unpinned values and repeated dependency entries.
Explain the diagnosis
Read references/dependency-pitfalls.md before presenting findings. Lead with
high severity items, then medium and low. For each finding, include:
- Package and source line
- What can break
- The suggested fix
Do not call every range a conflict. The deterministic core reports conflicting constraints only when exact pins disagree. Compatible constraints split across multiple lines are duplicate entries that should be combined.
If there are no findings, say what was checked and note the limits. A clean report is not a CVE audit or a full dependency resolver.
Optional PyPI yank check
The online check sends package names and exact pinned versions to pypi.org.
Ask for permission before enabling it, even if the user previously requested an
offline diagnosis.
python3 scripts/dep_doctor.py /path/to/requirements.txt --json --online
It reports an exact Python release only when every file for that release is marked yanked. Network failures become low-severity findings instead of hiding the offline diagnosis.
Offer fixes, do not apply them silently
After explaining the report, offer a focused edit. Wait for approval before changing the manifest.
- Remove standard-library packages from supported Python projects
- Remove obsolete backports, or add a Python-version marker when an old runtime genuinely needs one
- For an unpinned dependency, inspect the working environment's installed version, confirm it is intended, and propose an exact reviewed pin
- Keep one entry for duplicates and combine compatible constraints
- For conflicting exact pins, inspect dependents before choosing a version
- Replace a yanked pin with a tested, non-yanked release
After any approved edit, rerun the offline diagnosis and the project's existing install or test command. Do not introduce a new CI gate.
Files
scripts/dep_doctor.py: stdlib-only manifest parser and diagnosis enginereferences/dependency-pitfalls.md: reasoning guide for the reported risks
常见问题
它会检查安全漏洞吗?
不会。它不是完整的漏洞审计,因此仍需要单独的安全扫描工具。
它会自行修改我的文件吗?
不会。它会解释发现的问题,并提供一个小的修复方案,供你先行审阅。
它能检查哪些文件?
它支持 requirements.txt、pyproject.toml 和 package.json 文件。
详情
作者的原始描述
Checks requirements.txt, pyproject.toml, and package.json dependency manifests for surface-level direct-dependency footguns: standard-library shadowing pins, abandoned backports, unpinned dependencies, and obvious intra-manifest conflicts, plus opt-in PyPI yanked releases. Use when the user asks to check a manifest for dependency problems, asks why dependencies won't install or whether anything is wrong with their dependencies, wants a dependency autopsy, or suspects dependency manifest rot. Runs offline by default as a local tool for the user's own project, not repository CI.
热度
- GitHub 星标
- 144k
- 排名
- #675
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/22
评论
- …
同一仓库的更多技能
advisor-orchestrator-worker
144k帮你的智能体把非常庞大的任务分配给一组 AI 模型,由较强的模型负责规划和检查,较便宜的模型负责执行。
commit-archaeologist
144k帮你的智能体通过阅读本地 git 历史,解释某段代码存在的原因,包括是谁添加的以及之后发生了哪些改动。
first-reader
144k帮你的智能体模拟真实读者的阅读体验来测试草稿,指出读者可能在哪里失去兴趣,以及他们会记住什么。
project-graveyard
144k帮你的智能体扫描电脑上未完成的业余项目,解释每个项目停滞的原因,并挑选出值得完成的那一个。