Skill
dep_manager
Manages Python dependencies — add, remove, audit for vulnerabilities with pip-audit, and detect unused packages. Use when asked to "manage deps", "add dependency", "remove dependency", "audit dependencies", "find unused packages", "pip audit", "security audit deps", "check vulnerabilities", or "dependency management".
From dep-managerInstall
1
Run in your terminal$
npx claudepluginhub shouenlee/ghcp-dev-plugin --plugin dep-managerTool Access
This skill uses the workspace's default tool permissions.
Skill Content
Dependency Manager
Manages Python project dependencies with support for adding, removing, auditing, and detecting unused packages across multiple package manager formats.
When to Use
- You need to add or remove a Python dependency and keep your dependency file in sync
- You want to audit your project for known security vulnerabilities
- You suspect there are unused packages inflating your dependency list
- You want a quick security check after adding a new package
Prerequisites
- A Python project with a dependency file (
pyproject.toml,requirements.txt,Pipfile, orsetup.py) pip-auditfor vulnerability auditing (install withuv pip install pip-audit)- An activated virtual environment is recommended
Workflow
/deps add <package> — Add a dependency
- Detect package manager — check for
pyproject.toml(uv/pip),requirements.txt,Pipfile,setup.py:ls pyproject.toml requirements*.txt Pipfile setup.py 2>/dev/null - Install the package:
or fall back to:uv pip install <package>pip install <package> - Update the appropriate dependency file — add the package with its resolved version to the correct file format.
- Run a quick security check on the new package:
pip-audit --require-hashes --no-deps -r <file> - Verify import works:
python -c "import <package>"
/deps remove <package> — Remove a dependency
- Remove from dependency file — delete the entry from
requirements.txt,pyproject.toml,Pipfile, orsetup.py. - Uninstall the package:
or fall back to:uv pip uninstall <package>pip uninstall <package> - Check for broken imports in the codebase:
grep -r "import <package>" --include="*.py" . grep -r "from <package>" --include="*.py" . - Report if any files still reference the removed package, listing each file and line.
/deps audit — Security audit
- Run
pip-auditon the project dependencies:
or:pip-audit -r requirements.txtpip-audit - If pip-audit is not installed, suggest installing it:
uv pip install pip-audit - Run
safety checkas a secondary scanner (if available):safety check --full-report - Parse results and present:
- Package name, installed version, fixed version
- CVE ID and severity
- Description of vulnerability
- Offer to update vulnerable packages:
uv pip install <package>==<fixed-version> - Re-run audit after updates to confirm fixes.
/deps unused — Find unused packages
- List installed packages from the dependency file.
- For each package, search the codebase for imports:
grep -r "import <package>" --include="*.py" . grep -r "from <package>" --include="*.py" .- Account for package name vs import name differences (e.g.,
python-dateutil->dateutil,Pillow->PIL)
- Account for package name vs import name differences (e.g.,
- Report packages with no detected imports.
- Flag false positives — plugins, CLI tools, test dependencies, runtime-only deps.
- Offer to remove confirmed unused packages.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| No dependency file found | Project not initialized | Run pip freeze > requirements.txt or create a pyproject.toml |
pip-audit not installed | Missing audit tool | Run uv pip install pip-audit or pip install pip-audit |
| Virtual environment not activated | System Python in use | Activate your venv with source .venv/bin/activate or create one with python -m venv .venv |
| Package name vs import name mismatch | Different PyPI name and import name | Manually verify the import name; common mappings are handled automatically |
| Permission denied during install | System Python or restricted env | Use a virtual environment or add --user flag |
Similar Skills
Stats
Parent Repo Stars0
Parent Repo Forks0
Last CommitMar 5, 2026