Docker.Shrink Requirements
БесплатноБез исполняемых скриптовНе проверенFind unused packages in requirements.txt not needed by the project code
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- Act as an expert in Docker
- Given a project dir
<TARGET_DIR>, find the packages inrequirements.txtthat its code does not need
Plan Only (--only_plan)
- With
--only_plan, follow.claude/skills/skill.rules.mdsection "Create Only a Plan with--only_plan" - Write the plan to
docker.shrink_requirements.<INPUT_REF>.md, then stop without executing the skill
Workflow
Methodology
- Find actual imports in all
.pyfiles in<TARGET_DIR>withgrep -r "import <PKG>"or AST-based analysis - Map each package in
requirements.txtto its import name (e.g.,Pillow->PIL,scikit-learn->sklearn,PyYAML->yaml) - Also check
setup.py,pyproject.toml,tasks.py, andMakefilefor 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")
- Runtime plugins or extras loaded dynamically (e.g., via
Output
- Save a table to
docker.shrink_requirements.<INPUT_REF>.report.mdin the current dir<INPUT_REF>comes from<TARGET_DIR>, as in.claude/skills/skill.rules.md### Name the Output File
- Say in the file how it was generated, with this line right after the title:
- Generated by `.claude/skills/docker.shrink_requirements/SKILL.md` - Print the table and the path of the file
- The table has the columns:
package | import_name | used_in_code | verdictverdictis one of:remove,keep,investigate,test-only
- Propose the trimmed
requirements.txtcontents and write it to disk
Verification
-
--only_plan(check only this item): the plan is indocker.shrink_requirements.<INPUT_REF>.mdin the current dir, has theGenerated byline, and nothing was executed - The output file is
docker.shrink_requirements.<INPUT_REF>.report.mdin the current dir and has theGenerated byline - Confirm every package in
requirements.txthas a verdict - Confirm no package marked
removeis still imported anywhere in<TARGET_DIR> - Confirm the trimmed
requirements.txtwas written to disk
Установить Docker.Shrink Requirements в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Docker.Shrink Requirements?
Find unused packages in requirements.txt not needed by the project code
Как установить скилл Docker.Shrink Requirements?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Docker.Shrink Requirements запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic