claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

fix(hookify): use relative imports for Python module resolution

Open KCW89 opened this issue 1 month ago • 1 comments

Summary

The hookify plugin fails with 'No module named hookify' error on all platforms.

Root Cause

Scripts use absolute imports like 'from hookify.core.config_loader' but PLUGIN_ROOT contains core/ directly, not in a hookify/ subdirectory.

Fix

Change to relative imports: 'from core.config_loader' which correctly resolve since PLUGIN_ROOT contains core/ directly.

Files Changed

  • plugins/hookify/hooks/pretooluse.py
  • plugins/hookify/hooks/posttooluse.py
  • plugins/hookify/hooks/stop.py
  • plugins/hookify/hooks/userpromptsubmit.py
  • plugins/hookify/core/rule_engine.py

Fixes #13426 Fixes #13427

KCW89 avatar Dec 09 '25 04:12 KCW89

Paste this to Claude Code: Fix hookify import error by running: cd ~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0 && sed -i 's/from hookify.core./from core./g' core/rule_engine.py hooks/*.py

ahlblad avatar Dec 09 '25 13:12 ahlblad