AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Claude Code hooks catalogue — production-ready hooks for Claude Code, OpenAI Codex & GitHub Copilot. Install in one npx command.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Your AI agent runs fast. Hooks keep it honest. A catalogue of production-ready Claude Code hooks — also for OpenAI Codex and GitHub Copilot. Install them in one command — your agent gets guardrails in under a minute. Unit-test coverage (agrégat) · gate CI : lines/statements/branches ≥ 80 %, functions ≥ 75 % Installation takes under a minute.檢視完整 README ↗
Your AI agent runs fast. Hooks keep it honest.
A catalogue of production-ready Claude Code hooks — also for OpenAI Codex and GitHub Copilot.
Install them in one command — your agent gets guardrails in under a minute.
Unit-test coverage (agrégat) · gate CI : lines/statements/branches ≥ 80 %, functions ≥ 75 %
Installation takes under a minute.
npx hookstack-cli@latest install
That's it. The CLI detects your project's setup — its language stack (no Biome in a pure Python project, no google-java-format in a pure JS project) and the systems it uses (i18n, an okf/ knowledge bundle, Next.js, a front-end codebase, a GitHub-hosted repo, a test suite, Claude Code skills, a hook registry, a system TTS voice, a Slack webhook, a multi-surface docs setup) — then walks you through picking hooks, writes the hook scripts (.mjs, or .py variants on Python projects), and patches the right config file. No manual copy-paste, no JSON editing. The interactive menu lets you pick your target agent; --no-detect skips detection.
Want to fine-tune your Hookstack? Go to hookstack.app — browse the full catalogue, select exactly what you need, copy the generated command and paste it in your terminal
Language-aware by default. The CLI detects your project's toolchain (TypeScript/Node: package.json/tsconfig.json · Python: pyproject.toml/requirements.txt/… · Java: pom.xml/build.gradle/gradlew) and only installs hooks that match it — a Python repo gets the ruff/pyright/pytest stack, a Java repo the google-java-format/compile/test stack, never hooks that shell out to another ecosystem's tools. Mixed repos get both. When no TypeScript/Python/Java toolchain is detected (Go, Rust, bare JS…), only the universal hooks are installed — never tsc/biome/ruff/pytest/java hooks the project can't run — and the CLI says so. Override with --stack=typescript|python|java|all or --no-detect.
Python hooks, Python tests. On a Python project the hooks are installed as real .py scripts (python3 … commands) and --with-tests writes pytest tests instead of vitest tests — vitest is never installed on Python projects, so your GitHub Actions CI stays Python-only with no npm added to test the hooks. Every hook in the default stack carries a Python variant: a default Python install currently lands 63 hooks, 100 % as .py, zero .mjs fallback (see the install summary).
Same gates, everywhere. --pre-commit adds a git pre-commit hook, and --github-action adds CI — both replay the exact same quality/test gates your agent runs at Stop, so the agent, your terminal, and GitHub all enforce one identical set of checks. See the breakdown →
# In a Python project — ruff format, ruff check, pyright, pytest, uv guard
npx hookstack-cli@latest install
# Force one toolchain, or install everything regardless of the detected stack
npx hookstack-cli@latest install --stack=typescript
npx hookstack-cli@latest install --stack=java
npx hookstack-cli@latest install --stack=all
HookStack's quality gates aren't just for your agent. One install can wire the exact same checks into three surfaces, all driven by the same hook scripts — so they can never drift apart:
| Surface | When it fires | Enable with | What it checks |
|---|---|---|---|
| 🤖 Agentic session | at Stop, automatically | the default install | changed files |
| 💻 Your terminal | git commit | --pre-commit | changed files |
| ☁️ GitHub CI | every PR & push to main/master | --github-action | the whole repo |
npx hookstack-cli@latest install --pre-commit # gates on every git commit
npx hookstack-cli@latest install --github-action # gates on every PR & push
npx hookstack-cli@latest install --pre-commit --github-action # all three
tsc/biome/ruff/pytest commands to keep in sync.sh with a python3 → python fallback covers macOS, Linux, and Windows (Git Bash).hookstack-gates.yml that isn't ours is left untouched.--yes --pre-commit --github-action installs both non-interactively.See packages/cli/README.md → Same gates, everywhere for the full reference.
npx hookstack-cli@latest update
No need to remember which hooks you picked — the CLI reads the @hookstack <slug> fingerprint each installed script carries (// @hookstack on .mjs, # @hookstack on .py variants), re-fetches those exact hooks from the live registry, and overwrites only the scripts that changed. settings.json is re-merged but only actually touched if a hook's config fragment changed (the merge is idempotent). Installed somewhere other than the default project scope? Pass the same flag you installed with, e.g. update --global or update --codex-project. See packages/cli/README.md for the full breakdown.
Edited a hook in your own project and think the catalogue should have it too?
npx hookstack-cli@latest contribute
It finds the hooks you've locally modified and opens a PR with your changes — forking this repo for you, or pushing a branch straight to it when your gh account owns it (no fork needed). Hooks are detected by their @hookstack fingerprint, so even renamed local files get contributed under their canonical name, and locally edited unit tests (tests/hooks/) ride along with their hook so the contribution keeps the CI coverage gate green. No manual git/GitHub dance required. Requires the GitHub CLI (gh), already authenticated. See packages/cli/README.md for details.
106 hooks and counting — every one dogfooded on this repo, unit-tested, and shipped in public.
First hook 2026-05-29 · latest 2026-09-02 · explore the live timeline → hookstack.app/evolution
| Hook | Category | Added |
|---|---|---|
| PII redactor for display | security | Jun 13, 2026 |
| Force implementation doc at stop | documentation | Jun 13, 2026 |
| Dead link checker | documentation | Jun 13, 2026 |
| Single H1 heading guard | validation | Jun 12, 2026 |
| SEO structure gate | validation | Jun 12, 2026 |
| SEO page metadata guard | validation | Jun 12, 2026 |
| Next.js image guard | validation | Jun 12, 2026 |
| JSX accessibility guard | validation | Jun 12, 2026 |
→ Full timeline on hookstack.app/evolution
Install a production-ready HookStack in one command — up and running in 60 seconds, on Claude Code, OpenAI Codex, or GitHub Copilot.
The moment your agent starts a session, it knows absolutely nothing about your environment. It doesn't know which branch you're on, doesn't know your .env has secrets, doesn't know that rm -rf / is a terrible idea. It just runs.
Hooks change that.
A hook is an ordinary Node.js script wired into the agent lifecycle via a config file. No SDK, no plugin system — just events. When the agent is about to run a shell command, a PreToolUse hook fires first. It reads the full command, and it can block it. When the agent writes a file, a PostToolUse hook can reformat it automatically. When a long task finishes, a Stop hook can ping your phone.
Hookstack is the catalogue of these scripts — written, tested, and ready to install. You pick the ones you want, run one npx command, and your project gets a hooks folder and a patched config file. Done.
Agent-agnostic by design. Claude Code, OpenAI Codex, and GitHub Copilot share the same lifecycle event model, so the hook code is identical across all three — only the config file format differs (.claude/settings.json vs .codex/hooks.json). Write a hook once, deploy it on whichever agent you (or your team) run.
The result: your agent still moves fast. It just can't do the dumb things anymore.
If Hookstack has saved your production secrets or stopped a runaway rm -rf, I'd love it if you'd give the repo a star or sponsor the work.
Thanks! — Steve
Hooks fire at 25 distinct points in the Claude Code agent loop. Here is how the most important ones fit together:
1. SessionStart — set the stage
Fires the instant a session opens. Use it to inject context: current branch, recent commits, open issues. Your agent starts informed instead of cold.
2. PreToolUse — intercept before it's too late
Fires before any tool executes and can block it outright. The right place for security: secrets in commands, destructive filesystem ops, pushes to main, writes to .env. The agent sees your reason and adjusts — it doesn't just get a wall.
3. PostToolUse — observe and react
Fires after a tool completes, non-blocking. Run Biome + Prettier after every file write. Record what the agent touched. Validate that the file it wrote actually parses. The agent keeps moving; the hook handles the cleanup.
4. Stop / StopFailure — close the loop
Fires when the agent finishes (success or failure). Ping Slack. Send a push notification. Write a session summary to disk. The work is done — now you find out about it.
5. WorktreeCreate — bootstrap new environments
Fires when a new worktree is created. Copy .env, assign a free port, run pnpm install. Every worktree starts ready, not broken.
rm -rf /, DROP TABLE, direct disk writes, and other foot-guns.env and key files stay untouched by the agent, always.env secrets never enter the model context in the first placegit push --force, steering you to --force-with-lease.env, assigns a free port, runs install — every worktree, every timenpm or yarn commands when the project uses pnpmtsc --noEmit on touched TypeScript files right after an editmain and you're moved to a fresh worktreeregistry.json whenever a hook .mjs is edited (meta: powers this repo)settings.json.PreToolUse hook that stops a bad command costs nothing. A runaway rm -rf costs everything.PostToolUse hook that can't find Biome is silent, not crashing.hookstack. Bugs surface fast.See CONTRIBUTING.md for the full guide: local setup, hook authoring contract, registry metadata, CI gates, and the pull request process.
Quick path for adding a hook:
# 1. Write the script
touch .claude/hooks/<slug>.mjs # follow the run() + guard pattern
# 2. Write the test
touch tests/hooks/<slug>.test.mjs # coverage ≥ 80 % required
# 3. Add metadata to registry/registry.json, then sync
node .claude/sync-hooks.mjs
# 4. (Optional) ship a Python variant for pure-Python installs
touch .claude/hooks/<slug>.py # same run() contract, stdlib only
# 5. Open a PR — CI runs typecheck, tests, schema validation, and drift checks
git clone https://github.com/steve-magne/hookstack.git
cd hookstack
pnpm install
pnpm dev # → http://localhost:3000
# pnpm typecheck \
# pnpm lint > Don't need those — Hookstack does it for you.
# pnpm test /
pnpm build # Production build
| Layer | Technology |
|---|---|
| Framework | Next.js 15 — App Router, Server Components |
| Language | TypeScript 5.x |
| Styling | Tailwind CSS v4 |
| Animations | Motion (ex-Framer Motion) — springs, split-flap, FLIP |
| State | Zustand — persisted selection |
| CI enrichment | GitHub Actions + Claude Code (ANTHROPIC_API_KEY) |
| Package manager | pnpm 9.x |
Five short guides on Claude Code hooks — from first principles to production debugging:
.mjs to a tested, wired hook in under 10 minutes.Hookstack is built by Steve Magne with contributions from the Claude Code community.