Monte9

Claude Function Hooks — Development skill for Claude Code

Development community

A reference implementation of the Function Hooks algebra proposed for Claude Code.

How to install Claude Function Hooks

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

What Claude Function Hooks does

A reference implementation of the Function Hooks algebra proposed for Claude Code.

Alternatives in Development

  • Book To Skill — Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work 25.9k ★
  • Example Plugin — Reference implementation for plugin developers 14k ★
  • Prioritization Frameworks — Reference guide to 9 prioritization frameworks with templates 7.8k ★

README

claude-function-hooks

A reference implementation of the **Function Hooks** algebra proposed for Claude Code in [anthropics/claude-code#91870](https://github.com/anthropics/claude-code/issues/91870), built from the proposal's architecture document so the design could be argued with empirically instead of from taste.

git clone https://github.com/Monte9/claude-function-hooks && cd claude-function-hooks
npm test            # 17 tests, each citing the spec section it checks
npm run demo:redact # redaction: the model never sees PII, the human still does
npm run demo:rules  # a real CLAUDE.md's non-negotiables, enforced

Node ≥ 20, and nothing else: the engine, the tests, the examples and four of the five findings run on a bare clone with no `npm install`. The fifth (`finding:await`) asks TypeScript a question, so it needs the one devDependency — `npm install`, then `npm run finding:await`.

What this is, and is not

**Not an Anthropic project, and not the feature.** Function Hooks is a *proposal*; it does not exist in Claude Code. The design is Alice Poteat's, from *"Function Hooks: Core Architecture"* (Anthropic, August 2026), attached here as [`docs/EXTERNAL.Function.Hooks.Core.Architecture.pdf`](docs/EXTERNAL.Function.Hooks.Core.Architecture.pdf) — the PDF linked from the issue. `docs/architecture-extracted.txt` is its text, extracted by decoding the PDF's font CMaps, so every `§` citation in this repo points at something you can check.

This repo is only the algebra, implemented from that spec by a third party, plus tests and two worked examples. Any mistake in it is mine, not the proposal's.

The proposal in a paragraph

Claude Code's `hooks.json` supports four hook *transports* today — `command`, `prompt`, `agent`, `http` — each a contract with an **environment** (a shell script reading JSON on stdin, signalling by exit code). The proposal adds a fifth: a TypeScript module, a contract with the **engine**.

export function register(on) {