hookify plugin: broken Python imports - 'No module named hookify'
Resolved 💬 3 comments Opened Dec 29, 2025 by filter-tiago Closed Jan 2, 2026
Summary
The hookify plugin's Python hook scripts fail with No module named 'hookify' because the import statements don't match the package structure.
Steps to Reproduce
- Install hookify plugin via marketplace
- Create any hookify rule (e.g., in
.claude/hookify.pretooluse.local.md) - Trigger any hook event (PreToolUse, PostToolUse, Stop, UserPromptSubmit)
- Observe error:
Hookify import error: No module named 'hookify'
Root Cause
The hook scripts use absolute imports like:
from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine
But the package structure has core/ directly in the plugin root:
plugins/hookify/
├── core/ # ← directly here
├── hooks/
├── utils/
└── ...
For the imports to work, the structure should be:
plugins/hookify/
├── hookify/ # ← package folder needed
│ ├── __init__.py
│ ├── core/
│ ├── utils/
│ └── ...
Affected Files
All hook scripts have this issue:
hooks/stop.pyhooks/pretooluse.pyhooks/posttooluse.pyhooks/userpromptsubmit.py
Also core/rule_engine.py imports from hookify.core.config_loader.
Workaround
Create a symlink in the plugin directory:
cd ~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0
ln -sf . hookify
Suggested Fix
Either:
- Restructure: Move modules into a
hookify/subfolder - Or use relative imports: Change
from hookify.core...tofrom core...(with appropriatesys.pathsetup)
Environment
- macOS
- Claude Code (latest)
- hookify plugin v0.1.0 (installed via marketplace)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗