meganemura

Steerhook — Development skill for Claude Code

Development community

🛞 Rules that block or warn before Claude Code runs a tool and tell Claude the alternative.

How to install Steerhook

This entry records only its repository, not the path inside it, so there is no exact command to give. Open meganemura/steerhook and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Steerhook does

🛞 Rules that block or warn before Claude Code runs a tool and tell Claude the alternative. A fork of Anthropic's hookify plugin: rule messages reach Claude, and rules live in ~/.claude/steerhook/ for every project.

Alternatives in Development

  • Hookify — Rule-based hook system for Claude Code 14k ★
  • Open Agent SDK TypeScript — Agent-SDK without CLI dependencies, as an alternative to claude-agent-sdk, completely open source 2.6k ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★

README

steerhook

[日本語](README.ja.md)

A hook that steers. Write a rule that names a command pattern you do not want Claude to run and the form you want instead. Before Claude runs a tool, steerhook checks the call against your rules. A rule can block the call or let it through with a warning. In both cases the rule's message reaches Claude, so Claude learns the alternative at the moment it matters.

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](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify) plugin for Claude Code (Apache 2.0, see `NOTICE`).

What is different from hookify

  • The rule message reaches Claude. hookify sends the message only to the user. Claude sees "denied" and cannot learn the alternative the rule asks for. steerhook sends the message as permissionDecisionReason (block) or additionalContext (warn). The user still sees it as systemMessage.
  • Rules live in ~/.claude/steerhook/*.md. hookify reads rules only from the project. Rules about your own tools apply in every project, so they need one place. The /steerhook:add command and the writing-rules skill write there. Set STEERHOOK_RULES_DIR to use a different directory.
  • A project's own rules are never read. hookify lets a project override a user rule by name. steerhook does not: opening a project is not the same as trusting it, and a rule file there could replace or switch off a user's rule with no confirmation.
  • The PostToolUse hook is removed. Rules read only the tool input, so the PostToolUse hook repeated the PreToolUse check and put the message in the transcript twice.
  • A bash rule matches what the shell runs. hookify matches the raw command text, so codex exec inside a quoted argument and a while loop inside a heredoc body both fire the rule, although the shell runs neither. steerhook