coding.fix_bloated_imports
SkillDev toolsFix Python imports of large packages needed only for few functions in a module
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the coding.fix_bloated_imports skill
What this skill tells your AI
The instructions your AI receives, as published by causify-ai/helpers in .claude/skills/coding.fix_bloated_imports/SKILL.md and read by ahel’s review.
-
I will pass you one or more files
<FILES>and one or more packages<PACKAGES>that are usually large to import (e.g.,ipython,pandas) and are needed only in few functions in the files -
In the files
<FILES>you will use a conditional import for type checking and lazy imports for<PACKAGES>- E.g., transform
intodef make_slider() -> "ipywidgets.IntSlider": import ipywidgets ...from typing import TYPE_CHECKING if TYPE_CHECKING: import ipywidgets def make_slider() -> "ipywidgets.IntSlider": import ipywidgets ...
- E.g., transform
-
Use forward references only for the types in the package to remove and not for the including
- Bad (quotes the whole expression as one string)
"Tuple[Union[ipywidgets.FloatSlider, ipywidgets.IntSlider], ipywidgets.HBox]" - Good (quotes only the package types)
Tuple[Union["ipywidgets.FloatSlider", "ipywidgets.IntSlider"], "ipywidgets.HBox"]
- Bad (quotes the whole expression as one string)
-
If you see that most of the functions in
<FILES>require the passed package<PACKAGES>, you might suggest to not do this transform
Verification
- Confirm
<PACKAGES>is imported only underTYPE_CHECKINGor inside the functions that use it - Confirm forward references quote only the package types, not full expressions
Signals
- GitHub stars
- 145
- Forks
- 160
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
coding-fix-bloated-imports- Source
- github.com/causify-ai/helpers