Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By meganemuraApache-2.0In 1 marketplace
Rules that block or warn before a tool runs and tell Claude the alternative. Rules live in ~/.claude/steerhook/ and apply in every project.
You run one by typing its /name in Claude Code.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Rules that run before Claude Code runs a tool. A rule names a pattern you do not want in a tool call and the form you want instead. When the pattern matches, steerhook blocks the call or lets it through with a warning. In both cases the rule's message reaches Claude, so Claude learns the alternative at the moment it matters. You see the same message on screen.
Rules are yours. They live in ~/.claude/steerhook/ and apply in every
project. A project's own rules are never read.
steerhook is a fork of Anthropic's hookify plugin (Apache 2.0, see NOTICE).
Create ~/.claude/steerhook/no-force-push.md:
---
name: no-force-push
enabled: true
event: bash
pattern: git\s+push\b[^\n]*\s(--force\b(?!-with-lease)|-f\b)
action: block
---
Do not force-push. Use `git push --force-with-lease`, which refuses to
overwrite work that someone else pushed in the meantime.
Ask Claude to run git push --force origin main. The call is denied. Claude
reads the message as the reason and can act on it; you see the same message.
No restart is needed. A rule file takes effect on the next tool call.
/steerhook:add <what to prevent> writes a rule for you. /steerhook:list
shows every rule that is loaded.
One file per rule, in ~/.claude/steerhook/. The file has two parts: a
frontmatter between two --- lines, then the message.
| Field | Required | Values | Notes |
|---|---|---|---|
name | yes | kebab-case | Heads the message as **[name]**. |
enabled | no, default true | true, false | false switches the rule off. |
event | yes | bash, file, stop, prompt, all | Which hook input the rule sees. See "Events and fields". |
action | no, default warn | block, warn | block denies the call. warn lets it through and adds the message to Claude's context. |
pattern | this or conditions | a regular expression | Matched against the command (bash) or the added text (file). Other events need conditions. |
conditions | this or pattern | a list, see below | Every condition must match. |
The frontmatter is not YAML. steerhook reads it with a small parser of its own, and these are its rules:
key: value. Spaces around the key and the value are removed.# is a comment. A # after a value is part of
the value: action: block # why reads as block # why, which is not
block.pattern: \s+ and
pattern: "\s+" read the same. A pattern that itself starts and ends with
a quote needs a wrapper: (?:"[^"]*[^"]*")`.conditions: starts a list. Each item starts with -. An item is either
three indented lines or one line with commas:conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: content, operator: contains, pattern: KEY
---, with leading and
trailing blank lines removed. Markdown is fine.npx claudepluginhub meganemura/steerhook --plugin steerhookPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.