claude-code - 💡(How to fix) Fix hookify plugin: support global rules from ~/.claude/ [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56318Fetched 2026-05-06 06:31:19
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Fix Action

Workaround

I've applied this as a local edit to the installed plugin, but it'll be overwritten on plugin updates.

Code Example

# Project-local rules
pattern = os.path.join('.claude', 'hookify.*.local.md')
files = glob.glob(pattern)

# Global rules from ~/.claude/
global_pattern = os.path.join(os.path.expanduser('~'), '.claude', 'hookify.*.local.md')
files += glob.glob(global_pattern)
RAW_BUFFERClick to expand / collapse

Feature Request

The hookify plugin currently only loads rules from the project-local .claude/hookify.*.local.md directory. It would be useful to also load rules from ~/.claude/hookify.*.local.md for cross-repo concerns.

Use Case

Rules like "remind me to use TDD when creating new production source files" apply to every repository, not just one. Currently you need to duplicate the rule file into every project's .claude/ directory.

Proposed Change

In core/config_loader.py, load_rules() should also glob ~/.claude/hookify.*.local.md:

# Project-local rules
pattern = os.path.join('.claude', 'hookify.*.local.md')
files = glob.glob(pattern)

# Global rules from ~/.claude/
global_pattern = os.path.join(os.path.expanduser('~'), '.claude', 'hookify.*.local.md')
files += glob.glob(global_pattern)

Project-local rules could take precedence over global rules with the same name (allowing per-project overrides).

Workaround

I've applied this as a local edit to the installed plugin, but it'll be overwritten on plugin updates.

extent analysis

TL;DR

Modify the load_rules() function in core/config_loader.py to also load rules from ~/.claude/hookify.*.local.md to support cross-repo concerns.

Guidance

  • Update the load_rules() function to include the proposed change, which involves globbing ~/.claude/hookify.*.local.md and adding the results to the files list.
  • Ensure that project-local rules take precedence over global rules with the same name to allow for per-project overrides.
  • Test the updated function to verify that rules are correctly loaded from both project-local and global directories.
  • Consider submitting a pull request with the proposed change to the hookify plugin repository to make the fix permanent and avoid overwrites on plugin updates.

Example

# Project-local rules
pattern = os.path.join('.claude', 'hookify.*.local.md')
files = glob.glob(pattern)

# Global rules from ~/.claude/
global_pattern = os.path.join(os.path.expanduser('~'), '.claude', 'hookify.*.local.md')
files += glob.glob(global_pattern)

Notes

The proposed change assumes that the os and glob modules are already imported in the core/config_loader.py file. Additionally, this fix may not be compatible with future versions of the hookify plugin if the load_rules() function is modified.

Recommendation

Apply the workaround by modifying the load_rules() function as proposed, as this will provide the desired functionality until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING