Yep — this is usually a skill packaging/instructions issue, not really a Python issue.
Smaller models often run the Python snippet from the workspace cwd, so Python can’t see the module inside the skill folder. Bigger models “fix” it by guessing cd / PYTHONPATH / sys.path automatically.
Workaround: make the skill instructions deterministic. In SKILL.md, before any Python snippets, tell the model to run Python with the skill’s scripts dir on PYTHONPATH:
cd "{baseDir}"
PYTHONPATH="{baseDir}/scripts:${PYTHONPATH:-}" python3 - <<'PY'
from openclaw_trent.openclaw_config.collector import collect_openclaw_metadata
PY
Even better: add a tiny wrapper in the skill, e.g. scripts/trent_phase1.py, and have the skill invoke only: