Claude Code hook
Grip
A git hook that won't let you push code you can't explain. Quizzes you on your own diff. Works with Claude Code, Codex, Cursor.
Install
/plugin marketplace add guilyx/gripRun inside Claude Code, then /plugin to pick what to install from it.
pipx install grip-hook # or: uv tool install grip-hookFound in the project README. Check it for setup steps after installing.
git clone https://github.com/guilyx/grip.gitFrom the README
grip A git hook that won't let you push code you can't explain. Before your code leaves your machine, grip reads the diff and asks you about it: why it is built this way, where it fails, what a malicious caller could do, how you know it works. In the terminal, or on a whiteboard of your change in the browser. A model grades your answers out of 100. Below your team's pass mark, the push waits. It checks the developer, not the code. Let AI write it; just be able to defend it. Follow one real change from commit to push to see what it asks and how it grades. "If I ask 'why did you do X instead of Y?', 'what happens if this actor behaves maliciously?' [...] you should be able to answer confidently." Mitchell Hashimoto, on X, about the whiteboard defense (not affiliated with grip) Try it in 30 seconds No hook, no account, no API key: the fake provider runs the whole flow offline. The offline grader does not read your answers, it only checks their length: twenty characters, or the word "because", gets full marks. Any long answer passes and a row of "idk" fails, so this shows the flow, not the grading. For questions written from your diff and real grading, use a model you have (--provider claude-code, codex, gemini or anthropic), or read the walkthrough. Nothing is blocked until you install the hook with grip init. Features - Five questions from your diff, graded against a hidden rubric into a Grip Score out of 100. Never line numbers or trivia. - grip whiteboard: your change drawn as parts and arrows in the browser, with the questions pinned to it, including what a malicious actor could do. Set hook_mode = "whiteboard" and every push is defended there. - Works with what you have: reuse Claude Code, Codex or Gemini CLI as the model (no API key), or use…
How hooks work
- Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
- They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
- A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Details
- Repository
- guilyx/grip
- Type
- Hooks
- Website
- guilyx.github.io/grip
- Language
- Python
- License
- BSD-3-Clause
- Last updated
- 28 October 2026
- Topics
- aiclaude-codeclicode-reviewcodexcursordeveloper-toolsgit-hooksllmpre-commipre-push
FAQ
What is Grip?
A git hook that won't let you push code you can't explain. Quizzes you on your own diff. Works with Claude Code, Codex, Cursor. It is a hook for Claude Code, from guilyx/grip on GitHub.
How do I install Grip?
Run pipx install grip-hook # or: uv tool install grip-hook, then follow the setup in the README.
Is Grip popular?
guilyx/grip has 439 GitHub stars and 98 forks. It was last updated on 28 October 2026.
More hooks
Taskmaster
533blader/taskmaster
Stop hook for Claude Code that keeps the agent working until all plans and user requests are 100% complete
cchooks
131GowayLee/cchooks
Python SDK that simplifies parsing hook input and returning decisions for Claude Code hooks.
LSP Enforcement Kit
328nesaminua/claude-code-lsp-enforcement-kit
Hooks that steer Claude Code toward LSP-based navigation instead of grep to save tokens.
TypeScript Quality Hooks
179bartolli/claude-code-typescript-hooks
Hooks that run TypeScript type checks, ESLint and Prettier automatically after Claude edits files.
Abide
621coldteadotai/abide
Make your coding agent abide by all your project rules
Claudecode Rule2hook
403zxdxjtu/claudecode-rule2hook
Transform natural language project rules into Claude Code automation hooks - Write rules in plain English and let Claude automatically generate powerful hooks for code formatting, testing, validation and more
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.