A Claude Code PostToolUse hook that
formats/lints a file right after Write/Edit/MultiEdit/NotebookEdit writes it
Single global Go binary (format-dispatch), no per-repo setup. Native
in-process formatters for JSON, shell, and Go; everything else routes to
biome, prettier, taplo, markdownlint-cli2, sqlfluff, ruff/black, rustfmt,
terraform fmt (or tofu fmt), and buf.
git clone git@github.com:Rethunk-Tech/claude-format-hooks.git
cd claude-format-hooks
./install.shInstall, prerequisites, config, and uninstall: HUMANS.md.
- Native JSON, shell, Go — in-process; JSON preserves key order.
--checkfor CI — reports files needing format; distinct exit codes.--writeapplies them.--doctor— every formatter, the extensions it owns, and whether its tool is installed.- Real tools for everything else — honors project config; no config-presence gate.
- Silent on success, always exits 0 — failures reach both the operator and the model.
- One
./install.sh— wires Claude and Cursor hooks globally.
| Document | Purpose |
|---|---|
| Humans guide | Install, configuration, troubleshooting |
| Agents guide | Architecture, layout, invariants |
| Contributing | Build, test, and pull request workflow |
| Security | Vulnerability reporting |
| Changelog | Release history |
| Code of conduct | Community standards |
| License | MIT License |
Copyright (c) 2026 Rethunk Tech. Licensed under the MIT License — see LICENSE.