Dependency hygiene
Skill jcdavis131/cursor-agent-skills/skills/dependency-hygiene
42 agent-discipline skills for Cursor, distilled by watching an autonomous terminal coding agent (Claude Code + Fable 5). Includes the derivation method.
npx -y skills add jcdavis131/cursor-agent-skills --skill dependency-hygieneAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 28 days oldThe repository was created 28 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Keep heavy, pin-pulling adapters out of a project's universal lockfile by declaring them as opt-in extras installed only where needed. Use when adding a dependency with heavy or conflicting transitive pins (LLM libs, PDF/OCR libs, ML frameworks), when a shared environment must stay coherent for training/inference, or when an adapter is only needed by one workspace.
SKILL.md
2.5 KB, 550 tokens by cl100k_base, as published. Nobody here has run it
Dependency Hygiene
A single heavy dependency can hold a whole monorepo's environment hostage via its transitive pins. The fix is structural, not behavioral: keep heavy adapters out of the universal lock.
The rule
If a dependency meets any of these, it belongs in an opt-in extra, not the core deps:
- Heavy install (large wheels, model downloads, system libs).
- Transitive pins that constrain foundational libs (tokenizers, transformers, torch, numpy, pillow).
- Only one workspace / one code path actually needs it.
- It pulls a pin that conflicts with the training or inference environment.
Common offenders: litellm, instructor, crawl4ai, marker-pdf, outlines, transformers, torch, sentence-transformers.
Pattern (PEP 621 / pyproject)
[project]
name = "my-package"
dependencies = ["pypdf>=4.0"] # always needed, light, no conflicting pins
[project.optional-dependencies]
llm = ["litellm>=1.40", "instructor>=1.3"] # heavy, pin-pulling → opt-in
pdf = ["pypdf>=4.0"]
vector = ["qdrant-client>=1.9"]
Install only where needed:
uv pip install -e ".[llm]" # the workspace that talks to LLMs
uv pip install -e "." # everyone else — stays coherent
Write the "why" into the diff
The next agent (or future-you) will see the extra and be tempted to promote it to core deps "for convenience". Stop that with a comment in the pyproject:
# Heavy adapters (litellm, instructor) are opt-in via `uv pip install` —
# kept out of the universal lock so their transitive pins
# (litellm->tokenizers) can't constrain the shared training environment.
A one-line rationale in the same file as the decision is the cheapest possible guardrail.
Anti-patterns
- "Just add it to core deps, it's easier." — one heavy lib in core deps and now every CI job, every worker, every training run inherits its pins.
- Extras without a comment. The next contributor re-inlines them.
- One giant
extras = "all"that re-combines everything — defeats the isolation. - Promoting an extra back to core without checking the transitive pin set. Run
uv treeorpip showfirst.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most pdf office docs skills give in 550 tokens
Counted across 636 of the 690 authors here whose files we hold, read 2026-08-07
- Extract text or tables using pdfplumber or pdftotextin 89 of 636, across 23 files
- Create new PDFs using reportlabin 83 of 636, across 16 files
- Read forms.md before filling out PDF formsin 80 of 636, across 13 files
- OCR scanned PDFs using pytesseract and pdf2imagein 77 of 636, across 10 files
- Use qpdf to merge or split PDFs or large filesin 70 of 636, across 3 files
- Use Excel formulas instead of hardcoded calculated values or Python calculationsin 68 of 636, across 13 files
- Unpack, edit, and repack XML for existing documents or presentationsin 63 of 636, across 8 files
- Document sources for all hardcoded valuesin 61 of 636, across 9 files
- Write minimal, concise Python code without unnecessary commentsin 59 of 636, across 7 files
- Run the recalculation script (recalc.py) after adding or modifying formulasin 59 of 636, across 7 files
- Fix all identified formula errors and recalculate before finishingin 58 of 636, across 6 files
- Format years as text stringsin 57 of 636, across 5 files
Said here and by no other author read
- declare heavy dependencies as optional extras
- keep heavy or pin-pulling adapters out of core dependencies
- add a rationale comment for optional dependencies
- verify transitive pins before promoting an extra
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.