Skip to content

Conversation

@ship9599
Copy link

Summary

  • Fixes the hookify plugin failing with No module named 'hookify' error
  • The hook scripts were trying to import from hookify.core.config_loader but CLAUDE_PLUGIN_ROOT points directly to the plugin directory where core/ exists at the root level
  • Changed imports from hookify.core.* to core.* to match the actual directory structure

Changes

File Change
hooks/pretooluse.py Fix import path
hooks/posttooluse.py Fix import path
hooks/stop.py Fix import path
hooks/userpromptsubmit.py Fix import path
core/rule_engine.py Fix import path (2 locations)

Test plan

  • Verified imports work locally with python -c "from core.config_loader import load_rules; from core.rule_engine import RuleEngine; print('OK')"
  • Confirmed claude-plugins-official already has correct imports (this aligns with that)

Note

This fix matches the existing correct structure in claude-plugins-official/plugins/hookify/.

🤖 Generated with Claude Code

The hookify plugin hooks were failing with "No module named 'hookify'"
because they tried to import `from hookify.core.config_loader` but the
CLAUDE_PLUGIN_ROOT environment variable points directly to the plugin
directory where `core/` exists at the root level.

Changed imports from:
- `from hookify.core.config_loader import ...`
- `from hookify.core.rule_engine import ...`

To:
- `from core.config_loader import ...`
- `from core.rule_engine import ...`

This matches the structure in claude-plugins-official which already has
the correct imports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@athola
Copy link

athola commented Jan 5, 2026

would really like this to be included in the next release please! had to change this plugin in my cache in order to fix the hookify import error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants