Agent Skills: deferring-heavy-dependencies

Keep expensive resources — ML models, spellcheck dictionaries, embedded databases, large third-party imports — off code paths that never use them. Covers constructor work paid by every caller, one-size factories that load the heaviest member for the cheapest request, load-and-unload-per-call masquerading as a cache, measuring per-call cost in a fresh process, telling a one-time import from a repeated model load, and the test fallout (patches that only now take effect, autouse fixtures that hide the dependency). Use when a trivially cheap operation takes hundreds of milliseconds, when adding a heavy dependency to a shared constructor or factory, or when reviewing a class whose `__init__` builds something most callers never touch.

UncategorizedID: wdm0006/python-skills/deferring-heavy-dependencies

Install this agent skill to your local

pnpm dlx add-skill https://github.com/wdm0006/python-skills/deferring-heavy-dependencies

Skill Files

Browse the full folder contents for deferring-heavy-dependencies.

Download Skill

Loading file tree…

Select a file to preview its contents.