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

[Bug] Hookify plugin import error: incorrect package namespace structure

Open Anarkitty1 opened this issue 3 weeks ago • 1 comments

Title: Hookify plugin import error - missing hookify package namespace

Plugin: hookify@claude-code-plugins v0.1.0

Problem: The hook scripts (e.g., pretooluse.py, userpromptsubmit.py) try to import: from hookify.core.config_loader import load_rules from hookify.core.rule_engine import RuleEngine

But the plugin directory structure at ~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0/ doesn't have a hookify package - the core/ directory is directly in the version folder.

Error message: Hookify import error: No module named 'hookify'

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:

  1. Change imports in hook scripts to from core.config_loader import ... (relative to PLUGIN_ROOT)
  2. Or restructure the plugin to have a proper hookify/ package directory

Environment:

  • macOS Darwin 24.6.0
  • Claude Code with hookify plugin enabled

Anarkitty1 avatar Dec 09 '25 13:12 Anarkitty1

same issue on ubuntu linux. seems already have an issue and fix at https://github.com/anthropics/claude-code/issues/13426

bluet avatar Dec 09 '25 19:12 bluet

this is also happening to me on Mac OS Tahoe 26.1 (25B78)

asumaran avatar Dec 15 '25 20:12 asumaran