Review, validate, and update Python dependencies safely. Use when adding a new package, upgrading an existing one, or reviewing the dependency surface.
Instal·la
npx skillscat add strikersam/autonomous-ai-agency/claude-skills-dependency-audit Instal·la des del registre de SkillsCat.
SKILL.md
Skill: dependency-audit
When to Use
- Before adding any new package to
requirements.txt - Before upgrading a package to a new major version
- Periodically (quarterly) to audit for known CVEs
Instructions
Step 1 — Evaluate the new dependency
Answer these questions:
- Is it necessary? Can this be done with the stdlib or an already-imported package?
- Is it maintained? Check the GitHub repo — recent commits, open issues, last release.
- Is the license compatible? This project appears MIT/Apache-compatible. Avoid GPL dependencies unless isolated.
- What is the download / adoption level? Low-adoption packages carry higher supply chain risk.
- Does it have known CVEs? Check https://pypi.org/project// and https://osv.dev.
Step 2 — Pin appropriately
This repo uses >= version lower bounds in requirements.txt.
- Use
>=X.Y.Zwith a known-working version. - For security-sensitive packages (auth, crypto), prefer
>=X.Y.Z,<X+1(major-pinned).
Step 3 — Install and verify
source .venv/bin/activate
pip install -r requirements.txt
pytest -xAll existing tests must still pass after the dependency change.
Step 4 — Check for conflicts
pip checkNo dependency conflicts should be reported.
Step 5 — Update changelog
Add an entry to docs/changelog.md:
### Changed
- `requirements.txt` — added `<package>>=X.Y.Z` for <reason>.or
### Changed
- `requirements.txt` — upgraded `<package>` from `>=X.Y` to `>=Z.W` for <reason>.Step 6 — Update .env.example if needed
If the new package requires configuration (API keys, URLs), add example env vars to .env.example.
Acceptance Checks
- Necessity evaluated — stdlib/existing package could not do the job
- License checked — compatible with project
- No known CVE at time of addition (note if CVE exists and is accepted)
-
requirements.txtupdated with appropriate version bound -
pytest -xpasses after adding package -
pip checkshows no conflicts -
docs/changelog.mdupdated -
.env.exampleupdated if new config required
Current Dependencies (quick reference)
| Package | Purpose | Risk Level |
|---|---|---|
| fastapi | Web framework | Low |
| uvicorn | ASGI server | Low |
| httpx | HTTP client (async) | Low |
| python-dotenv | Env loading | Low |
| langfuse | Observability | Medium (external API) |
| jinja2 | Templating | Low |
| python-multipart | File uploads | Low |
| itsdangerous | Session signing | Medium (crypto) |
| pytest | Testing | Dev only |
| pyngrok | Tunnel | Medium (external service) |