"""Make the CAD skill (skill.src/modules/*) importable. skill.src uses package-relative imports under a top-level `modules` package, the same way step_processor.py runs it (script dir on sys.path[0]). We replicate that by putting SKILL_SRC on sys.path, then `import modules.loader` etc. resolves. Heavy deps (build123d/OCP) are imported lazily inside the skill functions, so importing the modules here is cheap; the kernel only loads when a job runs. """ import sys from .config import SKILL_SRC _p = str(SKILL_SRC) if _p not in sys.path: sys.path.insert(0, _p)