LZong-tw

Clawback — Code Quality skill for Claude Code

Code Quality community

Claude Code and Codex hooks kit for verification loops: file protection, post-edit lint, and stop-time checks.

How to install Clawback

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

What Clawback does

Claude Code and Codex hooks kit for verification loops: file protection, post-edit lint, and stop-time checks.

Alternatives in Code Quality

  • Brooks Debt — Run a Brooks-Lint tech debt assessment 1.5k ★
  • Claude Review Loop — Claude Code plugin: automated code review loop with Codex 589 ★
  • Lint Task — Lint coder-eval Task YAML 166 ★

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.

[![Tests](https://img.shields.io/badge/tests-59%20passing-brightgreen)](#testing) [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-blue)](#) [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)](#) [![License: MIT](https://img.shields.io/badge/license-MIT-yellow)](#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