Clawback
Description
Claude Code and Codex hooks kit for verification loops: file protection, post-edit lint, and stop-time checks
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Clawback
**Stop your AI coding agent from saying "Done" until your code actually typechecks and lints.**
Mechanical verification hooks for **Claude Code** and **Codex** — zero dependencies, auto-detects your stack, cross-platform.
[](#testing) [](#) [](#) [](#license)
*Prompts are requests. Hooks are guarantees.*
See it
Your agent finishes a task. Before it's allowed to stop, the Stop gate runs:
Claude: "Done! I've implemented the feature."
└→ stop-verify fires
├→ tsc --noEmit (60s timeout)
├→ eslint (15s timeout)
├→ errors scoped to the files YOU changed (not pre-existing debt)
└→ errors found? → BLOCKED. "Fix these first."
└→ 3 consecutive blocks? → circuit breaker allows stop + final warning
**Before Clawback:** the agent says "Done!", you discover the type error. **With Clawback:** "Done!" → blocked → fixed → *actually* done.
No more "the code compiles in my imagination."
Install
npx @lzong.tw/clawback
That's it. Open Claude Code and type `/hooks` to verify. Add `--with-codex` to install the same guardrails into Codex.
# keep it around as a global binary instead
npm install -g @lzong.tw/clawback && clawback
# or from source
git clone https://github.com/LZong-tw/clawback.git && cd clawback && node install.cjs
What you get
One install wires up hooks that fire automatically — whether the agent wants them to or not.
| Hook | Event | What it does |
|---|---|---|
| protect-files | PreToolUse | Blocks edits to .env, lockfiles, .git/ — before the agent touches them |
| post-edit | PostToolUse | Formats your code, then lints it (r |
Related Skills
Import Drawio
Redraw a draw.io file as an editorial diagram at a chosen format, size, and detail level
Code Quality Import Mermaid
Redraw Mermaid as an editorial diagram at a chosen format, size, and detail level
Code Quality Job Stories
- Create job stories with acceptance criteria in JTBD format
Code Quality Wwas
- Create backlog items in Why-What-Acceptance format
Code Quality Code Quality Review
Review code quality in: $ARGUMENTS
Code Quality Standards Skills
Engineering standards and compliance skills
Code Quality