hookify plugin: Python import error due to missing package structure

Resolved 💬 3 comments Opened Mar 17, 2026 by hereinthehive Closed Mar 21, 2026

Bug Description

The hookify plugin fails with No module named 'hookify' on every hook execution because the Python scripts expect a hookify package directory that doesn't exist.

Error Message

Hookify import error: No module named 'hookify'

Root Cause

The hook scripts (e.g., userpromptsubmit.py) import modules like:

from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine

But the plugin is installed at:

~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0/
├── core/
│   ├── __init__.py
│   ├── config_loader.py
│   └── rule_engine.py
├── hooks/
│   └── userpromptsubmit.py
└── ...

The import expects hookify/core/config_loader.py but the actual path is just core/config_loader.py.

Workaround

Create a symlink inside the plugin directory:

cd ~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0
ln -s . hookify

Suggested Fix

Either:

  1. Add a hookify/ subdirectory to the plugin structure containing the Python modules
  2. Change the imports in hook scripts to use relative imports (from core.config_loader import ...)
  3. Add the symlink creation to the plugin's post-install hook

Environment

  • Claude Code version: Latest
  • OS: macOS
  • Plugin version: 0.1.0

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗