Analysis updated 2026-05-18
Stop an AI coding assistant from running destructive commands like force pushes or mass deletes.
Automatically format any file the assistant edits using the project's existing formatter.
Get notified on desktop or Slack when a coding assistant session finishes or needs input.
Require passing tests before the assistant is allowed to consider a task done.
| rongtnt/claude-code-hooks-cookbook | 1ncendium/aibuster | aaronmayeux/ha-hurricane-tracker | |
|---|---|---|---|
| Stars | 5 | 5 | 5 |
| Language | Python | Python | Python |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | ops devops | general |
Figures from each repo's GitHub metadata at analysis time.
This project is a collection of ready to use configuration recipes for Claude Code, the AI coding assistant tool. Claude Code has a feature called hooks, which are small shell commands that the tool runs automatically at certain moments while it works, such as right before it runs a command, right after it edits a file, or when a coding session starts or ends. This repository gives copy and paste examples of hooks that solve common, practical problems, rather than just demonstrating the feature. The repository includes eight separate recipes. One automatically formats any file the assistant edits, using whichever code formatter is already installed in the project. Another blocks dangerous commands, such as commands that could delete large amounts of files or force push over other people's changes, and explains to the assistant why the action was refused. A third recipe protects sensitive files, like environment variable files or password certificates, from being edited, and also prevents the assistant from writing files outside the current project folder. Another recipe checks that a project's automated tests pass before allowing the assistant to consider its work finished. There is also a recipe for sending a desktop or messaging notification when a session finishes or needs the user's attention, one that adds useful background information about the project when a session begins, one that automatically approves harmless read only commands so the user is not asked to confirm them every time, and one that keeps a log file recording every action the assistant took. Each recipe includes both a short configuration snippet to add to a settings file and a matching script file. The project has no external dependencies beyond what is already available on a typical computer, and it is released under the MIT license, meaning anyone can use or modify it freely.
A set of copy-paste Claude Code hook recipes that auto-format files, block risky commands, gate on tests, and send notifications.
Mainly Python. The stack also includes Python, Shell.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.