Claude Code hook

Canny

Stops AI coding agents from claiming work is done without evidence. Deterministic hooks decide, TypeSafe's Jev advises. Append-only ledger, zero runtime dependencies.

132 stars 18 forksHooks Source

Install

From source
git clone https://github.com/qkal/Canny.git

From the README

Canny

A supervision layer for AI coding agents. It hooks into Claude Code and Codex CLI, keeps a ledger of what the agent actually did, and will not let it finish on a claim.

Install · What it looks like · What blocks · Configuration · Commands · Does it help? · Contributing
Done. Skipped tests — one-liner, no branch to break.

That is Claude Code, verbatim, during this project's first live run. It had been asked to add a function, it wrote the file with a shell heredoc, ran nothing, and finished. No error. No warning. Nothing in CLAUDE.md could have stopped it, because a rules file only asks the model to remember, and nothing checks that it did.

Canny is the hook that noticed. On the next run of the same prompt, the agent's "done" was refused with this message:
Canny: math.js changed, but no check has passed since the last edit. The last command was cat > math.js

Install by pasting a prompt

Canny is not on npm. Your agent installs it from this repository: a clone and one command. The compiled CLI is committed, so there is nothing to build. You need git and Node 22 or newer.

Paste this into Claude Code or Codex, inside the project you want guarded:

init writes hook entries for the agents it finds installed, so the same prompt works in either agent. To choose explicitly, change step 3 to init --claude or init --codex. To guard every project instead of this one, use init --global, which writes to ~/.claude/settings.json and ~/.codex/hooks.json.

To update later:

To remove it from a project:

By hand, the same thing is two commands, and a third if you want a canny on your PATH:

With canny on your PATH, init writes canny hook into the hook config instead of the absolute path.

What a guarded session looks like

Every hook event lands in an append-only ledger, one…
Read the full README on GitHub

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.
Claude Code docs

Details

Repository
qkal/Canny
Type
Hooks
Language
TypeScript
License
MIT
Last updated
22 September 2026
Topics
agent-hooksai-agentsclaude-codeclaude-code-hookscodexcodex-cliguardrailsjevtypesafetypescript

FAQ

What is Canny?

Stops AI coding agents from claiming work is done without evidence. Deterministic hooks decide, TypeSafe's Jev advises. Append-only ledger, zero runtime dependencies. It is a hook for Claude Code, from qkal/Canny on GitHub.

How do I install Canny?

Clone qkal/Canny from GitHub and follow the setup steps in its README.

Is Canny popular?

qkal/Canny has 132 GitHub stars and 18 forks. It was last updated on 22 September 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.