hookify plugin: Python import fails on NixOS

Resolved 💬 3 comments Opened Jan 24, 2026 by jwilger Closed Jan 29, 2026

Description

The hookify plugin fails to load on NixOS with the error:

Hookify import error: No module named 'hookify'

Environment

  • OS: NixOS (Linux 6.18.5)
  • Claude Code: v2.1.19
  • Plugin: hookify@claude-code-plugins v0.1.0

Root Cause

The Python hooks (userpromptsubmit.py, stop.py, etc.) add CLAUDE_PLUGIN_ROOT to sys.path and then attempt to import:

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

However, the actual directory structure places the Python modules directly in the plugin root:

hookify/0.1.0/
├── core/
│   ├── __init__.py
│   ├── config_loader.py
│   └── rule_engine.py
├── hooks/
│   ├── userpromptsubmit.py
│   └── ...
└── ...

The import expects hookify/core/ to exist within CLAUDE_PLUGIN_ROOT, but it's actually at CLAUDE_PLUGIN_ROOT/core/.

Reproduction

  1. Install NixOS
  2. Install Claude Code
  3. Install hookify plugin: claude plugin install hookify
  4. Run any Claude Code command
  5. Observe error in hook output

Suggested Fix

In all Python hooks, change the import statements from:

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

To:

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

Or restructure the directory to have a hookify/ subdirectory.

Impact

The plugin is completely non-functional on NixOS (and likely other systems with different Python path handling).

View original on GitHub ↗

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