plugins/dependency-management/skills/dependency-management/SKILL.md
Python dependency and environment management for multi-service or monorepo python backends. Use when: (1) adding, upgrading, or removing a Python package, (2) responding to Dependabot or security vulnerability alerts (GHSA/CVE), (3) creating a new service that needs its own requirements files, (4) debugging pip install failures or Docker build issues related to dependencies, (5) reviewing or auditing the dependency tree, (6) running pip-compile. Enforces the pip-compile locked-file workflow and tiered dependency hierarchy.
npx skillsauth add richfrem/agent-plugins-skills dependency-managementInstall 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.
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ./requirements.txt for the dependency lockfile (currently empty — standard library only).
./requirements.txt lockfile.For plugin packaging, DRY script distribution, and Windows symlink/junction compatibility rules, see the authoritative shared plugin packaging guidelines.
src/
├── requirements-core.in # Tier 1: shared baseline (fastapi, pydantic…)
├── requirements-core.txt # Lockfile for core
├── services/
│ ├── auth_service/
│ │ ├── requirements.in # Tier 2: inherits core + auth deps
│ │ └── requirements.txt
│ ├── payments_service/
│ │ ├── requirements.in
│ │ └── requirements.txt
│ └── database_service/
│ ├── requirements.in
│ └── requirements.txt
| Tier | Scope | File | Examples |
|------|-------|------|----------|
| 1 – Core | Shared by >80% of services | requirements-core.in | fastapi, pydantic, httpx |
| 2 – Specialized | Service-specific heavyweights | <service>/requirements.in | stripe, redis, asyncpg |
| 3 – Dev tools | Never in production containers | requirements-dev.in | pytest, black, ruff |
Each service .in file usually begins with -r ../../requirements-core.in to inherit the core dependencies.
Declare — Add or update the version constraint in the correct .in file.
requirements-core.in.in>= syntax: cryptography>=46.0.5Lock — Compile the lockfile:
# Core
pip-compile src/requirements-core.in \
--output-file src/requirements-core.txt
# Individual service (example: auth)
pip-compile src/services/auth_service/requirements.in \
--output-file src/services/auth_service/requirements.txt
Because services inherit core via -r, recompiling a service also picks up core changes.
Sync — Install locally to verify: Preferred (if available):
pip-sync src/services/<service>/requirements.txt
Fallback:
pip install -r src/services/<service>/requirements.txt
Verify — Rebuild the affected Docker/Podman container to confirm stable builds.
Commit — Stage and commit both .in and .txt files together.
Identify the affected package and fixed version from the advisory (GHSA/CVE).
Determine tier placement:
.in file)..txt files, it's transitive — pinned by something upstream.For direct dependencies: Bump the version floor in the relevant .in file.
# SECURITY PATCHES (Mon YYYY)
package-name>=X.Y.Z
For transitive dependencies: Add a version floor pin in the appropriate .in file
to force the resolver to pull the patched version, even though it's not a direct dependency.
Recompile all affected lockfiles. Since services inherit core, a core change means recompiling every service lockfile. Use this compilation order:
# 1. Core first
pip-compile src/requirements-core.in \
--output-file src/requirements-core.txt
# 2. Then each service
for svc in auth_service payments_service database_service; do
pip-compile "src/services/${svc}/requirements.in" \
--output-file "src/services/${svc}/requirements.txt"
done
Verify the patched version appears in all affected .txt files:
grep -i "package-name" src/requirements-core.txt \
src/services/*/requirements.txt
If no newer version exists (e.g., inherent design risk like pickle deserialization),
document the advisory acknowledgement as a comment in the .in file and note mitigations.
COPY requirements.txt + RUN pip install -r requirements.txt.RUN pip install <pkg> commands. No manual installs.requirements.txt before source code to preserve Docker layer caching.The agent MUST NOT:
pip install <pkg> directly to resolve dependency issues..txt lockfiles manually.pip-compile failures.pip-compile not installed).If any of the above occurs:
map-debt.md.Workarounds are considered Tier 0 Friction and must be logged.
When this skill encounters friction, failure, ambiguity, or a workaround:
references/self-evolution-profile.md.references/evolution-log.md.references/map-debt.md with severity, repeat risk, and recommended fix.Log to map-debt.md when:
pip-compile is absent).Do not silently proceed.
.in change.== instead of >= for security floors — use >= so pip-compile can resolve freely..in files — keep pytest, ruff, etc. in requirements-dev.in..txt without .in — always commit them as a pair.testing
Skill for creating and managing isolated git worktrees (`.worktrees/issue-NNN`) for issue execution branches. USE ONLY when setting up or cleaning up isolated git worktrees for specific issue execution. DO NOT USE for managing local task files (use `task-agent`) or escalating tasks to issues (use `github-issue-backlog-agent`).
data-ai
Skill for orchestrating the end-to-end GitHub issue lifecycle flow: Issue -> Worktree -> Implementation -> PR Creation -> Resolution Closure. USE ONLY when running or dry-running full lifecycle orchestration for resolving an issue with a PR. DO NOT USE for isolated worktree management only (use `issue-worktree-agent`) or logging issues (use `github-issue-agent`).
tools
Automatically ranks GitHub issues (P0-P3) based on friction tier, frequency, and blockages, synchronizing priority labels and GitHub Projects v2 custom fields.
testing
Bridge skill for escalating ephemeral local task scratchpad items (`tasks/*.md`) into durable, taxonomy-validated, evidence-rich GitHub Issues. USE ONLY when promoting a single-session local task into durable repository backlog. DO NOT USE for managing local kanban boards (use `task-agent` instead) or directly querying/commenting on issues (use `github-issue-agent` instead).