claude-code
claude-code copied to clipboard
fix(hookify): use relative imports for Python module resolution
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
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