feat(hookify): load rules from ~/.claude global location#54749
Open
watarus wants to merge 1 commit intoanthropics:mainfrom
Open
feat(hookify): load rules from ~/.claude global location#54749watarus wants to merge 1 commit intoanthropics:mainfrom
watarus wants to merge 1 commit intoanthropics:mainfrom
Conversation
Rules in ~/.claude/hookify.*.local.md now apply across every project, in addition to the existing <cwd>/.claude/hookify.*.local.md project-local rules. When the same rule name exists in both, project-local wins so a project can override a global rule. Existing project-only setups are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hookifycurrently only loads rules from<cwd>/.claude/hookify.*.local.md, so a rule has to be re-created in every project.~/.claude/hookify.*.local.mdso a rule can be defined once and apply across every project.Behavior
~/.claude/hookify.*.local.md(global) merged with<cwd>/.claude/hookify.*.local.md(project-local).namefield, project-local last-write-wins.cwd == $HOMEthe two globs hit the same files; those are filtered viaos.path.abspathso each file is only loaded once.enabledfiltering is preserved.Test plan
cwd == $HOME→ no double-loading🤖 Generated with Claude Code