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.
Install
git clone https://github.com/qkal/Canny.gitFrom 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…
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.
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
Agent Usage Guard
93rbartoli/agent-usage-guard
Hook mod that pauses subagent fan-out, heavy prompts and retry loops before they burn quota.
Helpline
115coleam00/helpline
Demonstration codebase for building the AI Layer (CLAUDE.md hierarchy, hooks, skills, LSP, MCP, plugin) — companion repo for the 'How Claude Code works in large codebases' video.
Claude Memory Engine
134HelloRuru/claude-memory-engine
Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.
Claude Code Patterns
126AaronRoeF/claude-code-patterns
Field-tested Claude Code patterns & anti-patterns for personal agents — an AI workflow that compounds: knowledge base, memory consolidation, hooks, subagents. Enterprise agent trust: agentrust-io.com. Updated monthly.
Claude Adhd Skills
171ravila4/claude-adhd-skills
Claude Code skills and hooks for staying organized with AI agents.
Boucle Framework
126Bande-a-Bonnot/Boucle-framework
Autonomous agent framework with structured memory, safety hooks, and loop management. Built by the agent that runs on it.
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.