skills/dependency-risk-audit/SKILL.md
Review Python dependencies for known security advisories, stale version pins, and unsafe upgrade paths. Use when users ask for dependency security reviews, requirements or lockfile audits, upgrade planning, pre-release risk checks, or remediation prioritization for Python projects.
npx skillsauth add ragnarok22/agent-skills dependency-risk-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a repeatable dependency-risk audit for Python projects and return a prioritized remediation plan.
poetry.lock + pyproject.tomluv.lock + pyproject.tomlPipfile.lock + Pipfilerequirements*.txt and optional constraints*.txtpyproject.toml (requires-python).python-versionCreate an inventory with:
direct or transitive)exact, range, unbounded)If direct/transitive split is unavailable from project files, state that limitation explicitly.
Prefer pip-audit. If unavailable, fall back to lockfile/static analysis and mark advisories as partially evaluated.
Common commands:
# requirements.txt projects
pip-audit -r requirements.txt -f json
# active environment
pip-audit -f json
For non-requirements workflows, export to requirements format first when possible, then audit that export.
For each finding, capture:
PYSEC-*, CVE-*, GHSA-*)Classify each direct dependency:
current: no newer release in same majorminor/patch stale: behind within same majormajor stale: newer major availableunknown: latest data unavailableFlag stale pins as higher risk when:
For each dependency requiring change, assess upgrade risk:
low: patch/minor upgrade, no known breaking changesmedium: minor upgrade with behavior/config changeshigh: major upgrade, Python-version jump, or resolver conflicts likelyCheck these risk signals:
When possible, propose a stepwise path:
Return a markdown report using this structure:
## Dependency Risk Audit
Audit root: `<path>`
Dependency source: `<lockfile or manifest>`
Python runtime target: `<version/constraint>`
### Executive Summary
- Overall risk: [LOW|MEDIUM|HIGH|CRITICAL]
- Known advisories: X (Critical Y, High Z, ...)
- Stale direct dependencies: X (Major-stale Y)
- Unsafe upgrade paths: X
### Security Advisories
| Package | Version | Advisory | Severity | Fixed In | Notes |
| ------- | ------- | -------- | -------- | -------- | ----- |
### Stale Pins
| Package | Current | Latest | Drift Type | Risk Notes |
| ------- | ------- | ------ | ---------- | ---------- |
### Upgrade Path Risks
| Package | Current -> Target | Risk | Why Risky | Recommended Path |
| ------- | ----------------- | ---- | --------- | ---------------- |
### Prioritized Remediation Plan
1. ...
2. ...
3. ...
### Not Evaluated
- Item + reason
If the user asks for a numeric score, start at 100 and deduct:
-15-10-6-3-4-5Floor at 0. Cap repeated deductions for the same package/advisory pair.
If the user asks for fixes:
development
Create Git commit messages that conform to Conventional Commits 1.0.0, including type/scope/description format, optional body, trailer-style footers, and explicit BREAKING CHANGE signaling. Use when users ask to draft commit messages, commit current changes, rewrite a commit message into conventional format, or enforce conventional commit standards in a repo.
development
Optimize Django ORM performance by detecting N+1 query patterns, missing `select_related`/`prefetch_related`, and likely index gaps. Run targeted static scans, optional runtime query capture, and produce a prioritized remediation plan with expected query-count impact. Use when users ask to speed up Django endpoints, reduce database hits, investigate slow views/serializers, or audit QuerySet efficiency before release.
development
Audit Python codebases for security, performance, correctness, and architecture antipatterns. Run optional trusted runtime checks (syntax, tests, lint, typing) plus static rule scans, then output a 0-100 health score with actionable fixes. Use when users ask to inspect a Python project, run a Python health check, review backend code quality, or perform a pre-release audit.
development
Verify Dockerfiles and Docker Compose manifests for security issues, reliability risks, optimization opportunities, syntax errors, and misconfiguration before builds or deploys. Run deterministic checks (`scripts/verify-docker.sh`, `docker compose config -q`, optional `hadolint`) and produce a 0-100 health score with prioritized fixes. Use when users ask to validate Dockerfile(s), docker-compose/compose YAML files, harden container configuration, optimize image/runtime setup, debug configuration failures, or run a pre-deploy Docker audit.