docker.shrink_requirements

SkillCloud & infra

Find unused packages in requirements.txt that are not needed by the project code

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the docker.shrink_requirements skill

What this skill tells your AI

The instructions your AI receives, as published by causify-ai/helpers in .claude/skills/docker.shrink_requirements/SKILL.md and read by ahel’s review.

  • You are an expert of Docker

  • I will pass you a directory <TARGET_DIR> with a project

  • Find out which packages in requirements.txt are not needed by the code in <TARGET_DIR>

Methodology

  • Use grep -r "import <pkg>" or AST-based analysis to find actual imports across all .py files in <TARGET_DIR>
  • Map package names in requirements.txt to their import names (e.g., PillowPIL, scikit-learnsklearn, PyYAMLyaml)
  • Also check setup.py, pyproject.toml, tasks.py, and Makefile for indirect or tool-level usage
  • Flag but do NOT remove packages that are:
    • Runtime plugins or extras loaded dynamically (e.g., via importlib)
    • Transitive dependencies pulled in by other listed packages
    • Used only in test files (mark them as "test-only")

Output

  • Print a table with columns:
    package | import_name | used_in_code | verdict
    
    • verdict is one of: remove, keep, investigate, test-only
  • Propose the trimmed requirements.txt contents and write it to disk

Signals

GitHub stars
145
Forks
159
Last commit
Sep 2026

ahel review

  • S4info
    community integration — published by causify-ai, not docker

Automated review, not a security audit. Ruleset v1.

Advanced
Catalog kind
skill
Gateway key
docker-shrink-requirements
Source
github.com/causify-ai/helpers