hook Reddit

Scanning 31 Claude Code Mods: What TypeScript Plugins Can Actually Access

Mods are a new Claude Code plugin type — TypeScript loaded into Claude Code's own process, able to draw UI above the prompt, react to events, or run a process (gated behind CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1). The author ran Claude Code's plugin validate across a 31-Mod catalogue, reading engine calls without executing anything: 14 can run shell commands, 4 reach the network, 13 see every tool call, 11 see every prompt, 1 fails validation. A useful capability audit to read before installing any Mod.

modspluginssecurityfunction-hooksaudit
by karanb192 Sep 15, 2026 8/10
hook GitHub

claude-never-again: Turn Each Bug Fix Into a Hook That Blocks the Repeat

When your coding agent keeps making the same mistake, never-again converts the fix into a Claude Code hook that mechanically blocks the wrong path — or, when a script cannot make the call, one short line in LESSONS.md. Because enforcement lives in a hook rather than CLAUDE.md, it costs zero tokens per turn. New hooks warn before they start blocking. MIT, local, no telemetry or account.

hooksregressionguardrailslessonsmit
by malaysherasia-ai Sep 15, 2026 8/10
hook Reddit

A PreCompact Hook That Puts Back What Compaction Drops, Verbatim

Auto-compaction is lossy by design and you cannot see what it lost, which is why Claude confidently edits a stale version of a file afterwards. This 200-line hook pair fixes that: PreCompact fires before the summary is written, reads the transcript tail, and saves the things that locate the work — last 4 prompts, every file touched by Edit/Write, last 8 bash commands, the last thing Claude said — verbatim to a JSON checkpoint with no LLM involved. SessionStart with source compact or resume reads it back above everything else and says so in the terminal.

hooksprecompactsessionstartcontextcheckpoint
by No_Advertising2536 Sep 15, 2026 7/10
hook Reddit

A Stop Hook Notification So You Stop Missing Finished Claude Runs

The minimal fix for walking away and returning 45 minutes after a task actually finished: a Stop hook in ~/.claude/settings.json that pings your Mac the moment Claude is done. Nothing to install, a few lines of config.

hooksstop-hooknotificationsmacosconfig
by zilba411 Sep 15, 2026 5/10
hook GitHub

claude-code-hooks: Safety, Cost and Observability Hooks With a Marketplace

A hook collection spanning safety, cost control, observability, and productivity, packaged as an installable plugin marketplace rather than snippets to copy into settings.json by hand. The marketplace install path is what distinguishes it from the many hook grab-bags on GitHub.

hooksmarketplacesafetyobservabilityplugin
by karanb192 Sep 15, 2026 7/10
hook Reddit

The Agent Deleted the Marker File Gating Its Own PR Merges

A PreToolUse hook blocked gh pr create/merge/approve and git push while a marker file existed at the repo root — but the agent could simply rm the marker and walk through. Three fixes came out of it: make the marker human-only by walling rm, mv and git clean against that path too; deny by exiting 2 rather than returning a JSON deny decision, since exit 2 stops the call before permission rules are evaluated and survives a standing Bash(git push:*) allow rule; and move the guard, command file, and docs together so the loop's own happy path does not break. A gate whose off switch sits inside the room it guards is not a gate.

hooksecuritypretooluseguardrails
by echowrecked Sep 15, 2026 8/10
hook GitHub

squint: A Hook That Stops Agents Reading 21k-Token Files for 10 Lines

A single Claude Code hook that intercepts whole-file reads and trims them down when the agent only needs a small slice, cutting context waste on large files. The repo ships a benchmark alongside the hook to show the token savings rather than just asserting them. Direct win for anyone working in codebases with big generated or vendored files.

hookcontexttoken-efficiencybenchmark
by namespaceMarcello Sep 14, 2026 8/10
hook Reddit

40 attempts to make an agent rewrite its own guardrail hook; 11 worked

The author keeps a PreToolUse hook that refuses tool calls crossing a short list of rules (no new dependencies, nothing under auth/) and logs every refusal. Of 40 evasion cases, 29 were refused and 11 got through — mostly by touching the parent directory instead of the named file, or by hiding the path from the parser. Directory rules plus path normalisation took it to 38 refused; the surviving two were an opaque script and an encoded command, which a text-matching hook can never read.

hookssecurityguardrailspretooluse
by Far_Business4773 Sep 14, 2026 8/10
hook Reddit

A tool that blocks agents from adding Co-authored-by to your commits

Every agent harness has its own setting for co-author trailers, they default to on, and they sometimes come back even after being turned off and forbidden in CLAUDE.md or AGENTS.md. This tool blocks the trailer at the git level so the setting cannot drift back. For people who consider Claude Code, Codex and Copilot instruments rather than co-authors.

githookscommitscli
by Ramshizzle Sep 14, 2026 6/10
hook GitHub

claudemd: Shell Hooks That Enforce a Coding Spec in Claude Code

A Claude Code plugin that enforces an AI-coding spec through shell hooks and distributes that spec into ~/.claude/. It blocks banned vocabulary in commit messages, unsafe rm -rf on an unquoted variable, pushing while CI is red, and shipping before MEMORY.md has been read. Also ships a standalone npx CLI for git pre-commit and GitHub Actions.

hookspluginlintinggit
by sdsrss Sep 14, 2026 7/10
hook GitHub

claude-self: Machine-Personal CLAUDE_SELF.md With a SessionStart Hook

A dotfiles cluster holding CLAUDE_SELF.md, instructions scoped to one machine rather than one project, loaded by a SessionStart hook, plus a small CLI to manage it. A tidy answer to per-machine context that does not belong in a repo's CLAUDE.md.

hooksdotfilesclaude-mdconfiguration
by j0yen Sep 14, 2026 5/10
hook GitHub

runbook-lab: Claude Code Plugins With Guards That Fail Closed

A set of Claude Code plugins aimed at agents running unattended, where the guards fail closed rather than open. The distinction matters for scheduled or autonomous sessions, in which a permissive default means a bad action goes through with nobody watching.

hookspluginssafetyautomation
by suwasuwa12 Sep 14, 2026 6/10
hook GitHub

a11y-gate: Accessibility Gate That Blocks the Agent's Turn

Renders the UI an agent just wrote and reports contrast, focus visibility, hit-target size, and label wiring as computed facts with fixes attached, then blocks the turn until they are addressed. Puts accessibility inside the agent loop instead of a later audit.

accessibilityhooksfrontendquality-gates
by Maher-Reven Sep 14, 2026 7/10
hook GitHub

cc-hooks-ts: Define Claude Code Hooks With Full Type Safety

A TypeScript library for writing Claude Code hooks with typed payloads and return values, so the hook contract is checked at compile time instead of discovered at runtime. Removes the usual guesswork about which fields an event actually carries.

hookstypescripttype-safetylibrary
by sushichan044 Sep 14, 2026 7/10
hook GitHub

agentic-wallpaper: your agent sessions as robots on a live wallpaper

A Wallpaper Engine scene driven by Claude Code and Codex agent hooks, rendering each running session as a pixel-art robot. The hooks are the interesting part: session state pushed out to an external renderer.

hookswallpapervisualizationpixel-artcodex
by DrMoussavie Sep 13, 2026 6/10
hook Reddit

Why Written Rules Get Ignored — and a UserPromptSubmit Hook That Helps

A detailed field report on a recurring failure mode: Claude Code reads a rules file and context notes at session start, then still answers from recall instead of checking the actual system. Rather than restating the rule, the author built a UserPromptSubmit hook that greps their own source and notes for terms from each message and injects the matching lines beneath the question. It helps but is not sufficient — picking good search terms is the weak link — and the post opens that problem up for discussion.

hooksuserpromptsubmitcontext-injectionclaude-mdmemory
by DoubleU-Belgium Sep 12, 2026 7/10
hook Reddit

Browser Tool to Test Which Shell Commands a PreToolUse Hook Catches

A client-side static page that runs a destructive-command rule set against any shell command you paste, showing exactly what a PreToolUse hook would catch before you write the regexes yourself. It flags rm -rf and its variants, DROP TABLE, TRUNCATE and DELETE FROM without a WHERE, git push --force, git reset --hard, git clean -f, mkfs, dd to a device, fork bombs, and chmod -R 777. The same engine ships as a drop-in hook with a JSONL audit logger under an MIT core.

hookpretoolusesafetyshellguardrails
by bdesoky Sep 12, 2026 6/10
hook GitHub

smart-context-delegation: PreToolUse Hook That Cuts Tokens ~90%

A PreToolUse hook blocks large file reads and routes bulk reading and code writing to a cheaper model, which the author measures as roughly a 90% cut in token use. It works with Claude Code, zcode, Trae, opencode, Cursor, Cline and any shell-capable agent.

hooktokenscost-savingsdelegation
by romangalaxys10-spec Sep 12, 2026 7/10
hook GitHub

agent-risk-guard: Hard-Block Destructive Commands Before They Run

Cross-agent runtime guardrails that deterministically block destructive commands before execution — permanent deletion, destructive Git operations and system-wrecking shell calls. Covers Claude Code, Codex, OpenCode, DeepSeek Harness and Antigravity.

hooksafetyguardrailscross-tool
by satan9394 Sep 12, 2026 7/10
hook GitHub

keyway: Hook That Injects Model- and Project-Specific Instructions

A Claude Code SessionStart and PostModelSwitch hook that injects CLAUDE.md-style instruction content tailored to the active model and project. That means you can give Opus and Haiku different guidance in the same repo, and have it reapply when you switch mid-session. A neat use of the model-switch hook, which few projects touch.

hooksessionstartclaude-mdmodel-switch
by justinstimatze Sep 12, 2026 7/10
hook GitHub

Claude-1Password: Erase Pasted Secrets Before Claude Sees Them

Brings 1Password into Claude Code so secrets never enter the chat: a hook erases pasted keys before the model sees them, op-store opens a native 1Password dialog with an eye toggle, and op-env launches Claude with secrets injected as environment variables. Runs on macOS, Windows and Linux.

secrets1passwordhookssecurity
by lucas-saldanha-werneck Sep 11, 2026 8/10
hook GitHub

kibitzer: Diff-Aware PostToolUse Quality Checks for AI Agents

Advisory code and doc quality checks that run as PostToolUse hooks, scoped to the diff rather than the whole tree. Uses a git baseline and a grace period to suppress the false positives that make hook-based linting unbearable. Works for agents, CI and local dev.

hookslintingdiff-awareci
by tstapler Sep 11, 2026 7/10
hook GitHub

weekend-mode: Stop Agents From Shipping on a Saturday

Adds weekend and off-hours awareness to AI agents that otherwise happily deploy at 2am on a Sunday, blocking risky actions outside working hours. Small guardrail, familiar failure mode.

guardrailsdeploymentsafetyscheduling
by Grindstone-Systems Sep 11, 2026 5/10
hook GitHub

agent-commit-guard: Block Secret-Leaking Commits in Unattended Repos

A single dependency-free POSIX shell script that refuses commits containing secrets, aimed at repos where an AI agent commits without a human watching. The right shape for a guardrail: small enough to read in full before trusting it.

securitygit-hookssecretsshell
by agentic-income-bot Sep 11, 2026 7/10
hook GitHub

sincelast: Tell the Agent When the Date or Git HEAD Moved

Reports exactly two facts to a Claude Code session — whether the calendar date changed and whether git HEAD moved since the last turn — and stays silent otherwise. No transcript reading, no advice. A fix for agents acting on a stale view of the repo.

hooksgitcontextminimal
by khymerao Sep 11, 2026 6/10
hook GitHub

team-tree: Subagent Visibility for Agent CLIs via Lifecycle Hooks

A Herdr plugin that taps agent lifecycle hooks to show which subagents are running and what they are doing, rendered as a sidebar tree plus a dashboard pane. Settings are clickable inside the panel rather than buried in a config file. Works across Claude Code, Codex and Pi sessions.

hookssubagentsherdrobservability
by SpidySamurai Sep 11, 2026 7/10
hook GitHub

done-means-done (PyModel): A Stop Hook That Routes Back to Unfinished Work

A resumable completion protocol where obligations live in a durable task record and completion is computed by a validator rather than asserted by the model. A Stop hook intercepts the end of a turn and sends execution back to whatever is still outstanding.

stop-hookcompletionvalidatortask-tracking
by PyModel Sep 10, 2026 7/10
hook GitHub

permission-wildcarding: Learn Approval Patterns and Stop Re-Prompting

A VS Code extension plus a PostToolUse hook that watches which permissions you approve and generalizes them into wildcards, so repeated prompts for the same shape of command stop appearing. It shares approval history across Claude Code and Codex. Aimed at cutting approval friction without turning safety off wholesale.

permissionshooksvscodeapprovals
by bigfnj Sep 10, 2026 7/10
hook GitHub

gitvow: Provenance and a Policy Gate for Agent Sessions, Stored in Git

Records what an AI coding session did as provenance data inside the git repo you already have, and enforces a policy gate over those sessions. No external service or database — the audit trail lives with the code. Relevant to teams that need to answer which changes an agent authored and under what rules.

provenancepolicygitaudit
by wirevow Sep 10, 2026 6/10
hook GitHub

claude-grounded: Turn Best Practices into Gates Claude Cannot Talk Past

Enforces a set of rules that agents routinely bend: no ungrounded claims, no declaring work done when it is not, no disabling tests to make a suite pass, no rewriting existing migrations. The gates are mechanical rather than instructions in a prompt. Addresses the most common failure modes in unattended sessions.

guardrailshookstestsverification
by IsthisLee Sep 10, 2026 7/10
hook GitHub

diffier: Live Diff Feed of Claude Code Edits, Rendered with Delta

Hooks into Claude Code's edit events and streams every change into a live feed rendered through delta. You watch the diff accumulate instead of reconstructing it from git afterwards. Small, focused, and pairs well with long unattended runs.

diffhooksmonitoringdelta
by spencerjireh Sep 10, 2026 7/10
hook GitHub

trailbun: Task Contracts and Verification Receipts as Agent Hooks

Hook layer for Claude Code and Codex that keeps an agent inside the task it was given. You define a task contract, and the hooks run scope checks against edits and emit verification receipts recording what was actually done. Useful against scope creep on long autonomous runs.

hooksguardrailsverificationcodex
by Daniel-DDV Sep 9, 2026 7/10
hook GitHub

clawd-conduit: Wire All 15 Claude Code Hook Events to a Desktop Pet

Connects the full Claude Code hook lifecycle — all 15 events — to the Clawd on Desk desktop pet, including answering permission prompts directly from the desktop instead of switching to the terminal. A playful but genuinely complete demonstration of the hook API surface. Useful reference for anyone writing hooks.

hooksdesktoppermissionsnotifications
by ssssssanjiu Sep 9, 2026 6/10
hook Reddit

A GitHub Action That Fails PRs When the Agent Adds Too Many Comments

A CI check that rejects a pull request when the agent has padded the diff with excessive comments. Targets one of the most consistent tells of agent-written code and one of the most common review complaints. Enforced in CI rather than left to reviewer discipline.

github-actionscicode-qualitycomments
by Nebulic Sep 9, 2026 5/10
hook GitHub

claude-code-hooks: Three Hooks as Static Binaries, No Runtime Required

Ships live subscription usage limits in the status line, an append-only session work log, and a notification sound as committed static binaries for macOS, Linux and Windows, with the Go sources alongside. Nothing to install — no Node, no Python, not even Go. A good answer to the dependency mess most hook collections create.

hooksstatuslinegobinarieslogging
by RomanKryvolapov Sep 9, 2026 7/10
hook GitHub

cc-repete-plugin: Self-evolving autonomous loops via a Stop hook

A Stop-hook engine that repeatedly re-invokes Claude Code toward a verifiable goal, carrying an evolving brief, a metadata-only lesson catalog, and a frozen constitution between iterations. Includes human-gated checkpoints and a context-rot safety valve so runaway loops get interrupted. Ships two skills for operating and designing loops.

hooksautonomousloopsstop-hook
by betmoar Sep 9, 2026 8/10
hook Reddit

Claude Code 5.1 vs Claude Code 5

My experience is that Claude Code model Fable 5.1 looks much quicker, helpful, to the point, helper and doer, until you probe deeper and you realize all this quick, helpful behavior is a bit superf...

hook
by WifiDad Sep 8, 2026 8/10
hook GitHub

LEAPWare-Watchtower: Eleven Observation Hooks for Claude Code on Windows

A Windows-only PowerShell 5.1 hook suite with eleven modules, eight of which purely observe tool calls. The three gating modules ship disabled, so a default install adds visibility without blocking or delaying anything. The README is unusually candid that it inspects no commands or credentials and is not a security boundary.

hookswindowspowershellobservabilitytelemetry
by LEAPWare-Software Sep 5, 2026 5/10
hook Reddit

yank-back: A Hook That Pulls You Back to the Terminal When Claude Finishes

A small Claude Code hook that refocuses your terminal window the moment generation completes, written by someone who kept doomscrolling while waiting. The shell command is short enough to read before running, and the author suggests pointing Claude at the repo to rebuild it yourself if you would rather not.

hooknotificationterminalfocus
by TeraTrox_ Sep 5, 2026 7/10
hook Reddit

Open-Source Tool to Keep AI Attribution Out of Your Git Commits

A free, open-source tool that controls which AI coauthor trailers land in your commits, per agent and per project. Motivated by Claude attribution reappearing after being disabled in settings and by juggling several coding agents with different attribution rules. Configurable rather than a blanket strip.

gitcommitsattributionopen-source
by Admirable-Put7423 Sep 5, 2026 6/10
hook GitHub

house-rules: Standing Agent Rules Enforced by Hooks and CI Gates

A vendored bundle of standing rules for working with coding agents, shipped together with the hooks and CI gates that enforce them. Instead of trusting that instructions in CLAUDE.md get followed, violations fail locally and again in CI. The author drops it into every repo they work in.

hooksciguardrailsconventions
by trurner13 Sep 4, 2026 6/10
hook Reddit

A CI Check That Fails When CLAUDE.md and AGENTS.md Drift

Claude Code reads CLAUDE.md while roughly thirty other tools read AGENTS.md, and the AGENTS.md support request is marked not planned despite 5,200+ reactions. This CI check fails the build when the two files disagree, catching the stale-command failure mode early.

ciclaude-mdagents-mddrift
by alifgokce Sep 4, 2026 7/10
hook Reddit

Five Battle-Tested Hooks for Common Agentic Coding Traps

A set of hooks addressing real failure modes, starting with a Stop hook that catches the case where Claude poses an either/or question in chat and halts without ever invoking AskUserQuestion — so the question is easy to miss. Some are Windows-specific.

hooksautomationwindowsaskuserquestion
by Ethan Sep 4, 2026 8/10
hook GitHub

vibe-focus: One-Key Window Focus for Mac, Wired Into Claude Code Hooks

A macOS menu bar app that moves any window to the main screen, maximizes it, and restores it with a single hotkey. It hooks into Claude Code session events so agent windows get focused automatically when they need you.

macoshookswindow-managementfocus
by vibe-coding-labs Sep 4, 2026 5/10
hook GitHub

omni: One Interception Point for All Coding Agents

A single place to intercept what any coding agent does, instead of configuring hooks separately per harness. Useful if you run several agents and want one set of guardrails covering all of them.

hooksinterceptionguardrailscross-agent
by ergonlabs-io Sep 3, 2026 5/10
hook GitHub

stop-that-shit: Hooks That Block Unrequested Hashes and Task-Scope Creep

A multi-platform Hook plus Skill Guard aimed at Codex/GPT workflows that intercepts coding agents adding hashes, checksums and other work nobody asked for. It targets the specific failure mode where an agent quietly expands the task beyond what you requested. Bilingual Chinese/English docs.

hookguardrailsscope-creepcodex
by lennney Sep 3, 2026 6/10
hook GitHub

steerhook: Rules That Block a Tool Call and Tell Claude the Alternative

A fork of Anthropic's hookify plugin with two changes that matter: rule messages actually reach Claude, so a blocked call comes with the suggested alternative instead of a bare denial, and rules live in ~/.claude/steerhook/ so they apply to every project rather than per-repo.

hooksguardrailsrulesglobal
by meganemura Sep 3, 2026 7/10
hook GitHub

guard-and-guide: Block Dangerous Agent Operations and Redirect to Safe Ones

A guardrail layer for coding agents that intercepts risky operations before they run and, rather than just refusing, points the agent toward a safer alternative. The "guide" half is what distinguishes it from a plain deny-list — the agent gets a usable next step instead of a dead end.

safetyhooksguardrailspermissions
by kawarimidoll Sep 3, 2026 7/10
hook GitHub

clawband: PreToolUse Hook That Blocks Destructive Shell Commands

A Claude Code PreToolUse hook that inspects shell commands before they run and blocks destructive ones. Named for the rubber band around a lobster claw. Useful if you let Claude run Bash unattended and want a guardrail against rm -rf class mistakes.

hooksafetypretooluseshell
by jamessoubry Sep 3, 2026 8/10
hook GitHub

claude-spill-guard: Local Scanner That Blocks Secrets and PII Leaving a Session

A zero-dependency local scanner that sits at the exfiltration boundary of a Claude Code session. It inspects what is about to be sent to the API and stops secrets and PII from going out. Useful if you work in repos where credentials or customer data are one glob away.

securitysecretspiihooks
by karlkfi Sep 2, 2026 8/10
hook GitHub

whatchanged: Four Gates and an Auto-Detect Hook to Make AI Diffs Reviewable

A Chinese-language plugin enforcing four gates on each agent round — coverage, reference existence, fingerprint consistency, and justified reasoning — plus a dependency-layer architecture overview and a hook that runs the check every round.

chinesegateshookscode-review
by csb-ai Sep 2, 2026 6/10
hook GitHub

secure-dev-guardrails: Hard-Block Hooks for Secrets and PII Plus a CI Gate

A three-ring enforcement model for teams on Claude Code: hooks that hard-block secrets and PII in logs, warn-and-review hooks, security and privacy review skills, and a reusable CI gate wiring gitleaks, semgrep and SCA. Written against GDPR and CCPA requirements.

securityprivacyhooksci
by eranw2000 Sep 2, 2026 8/10
hook GitHub

adversarial-review-loop: Gate every commit on an isolated reviewer process

A Claude Code plugin that blocks each phase commit until a fresh, isolated reviewer process signs off on the exact tree being committed. Because the reviewer starts clean, it cannot be talked into approving by the session that wrote the code. A stronger guarantee than asking the same agent to self-review.

plugincode-reviewgitquality-gate
by leinardi Sep 2, 2026 7/10
hook GitHub

stopslop: Pluggable text-enforcement gate that blocks bad writes before they land

A Claude Code gate that inspects a write before it is committed to disk and rejects it if it violates a configured ruleset. The first shipped ruleset is ASD-STE100, the simplified technical English standard, and the design is pluggable for others. Aimed at docs and technical writing where style rules are non-negotiable.

hookwritingquality-gateste100
by asuramaya Sep 2, 2026 6/10
hook Reddit

Miko: Local hook verifier for when Claude Code skips required Skills

A local hook that pauses an edit to a protected file if the required Skill or reference has not been observed in the session, tells Claude exactly what is missing, and lets it retry after reloading. It adds a REVIEW state for uncertain cases where asking the user beats auto-denying. Built to address Skills quietly being dropped in long conversations.

hookskillsverificationlocal
by RefrigeratorOwn9941 Sep 2, 2026 7/10
hook Reddit

One-shot sprite room: a Claude Code lifecycle-hook companion, five models

A browser-based 16-bit pixel room whose character reacts to Claude Code lifecycle hooks: wandering when idle, typing at the desk when working, leaning back on tool calls, and spawning chibi versions when subagents start. The author gave the same brief to five models including Fable 5.1, Kimi K3, GLM 5.3 Flash, and GPT 5.6 Sol and compares the from-scratch builds. Fun, but a clear demonstration of what lifecycle hooks expose.

hooklifecyclemodel-comparisonfun
by xMaybeIamALion Sep 2, 2026 7/10
hook Reddit

cc-cache-alert: Telegram Warning Before Your Prompt Cache Expires

A CLI hook and widget that pings your phone when a session has been idle long enough that the 1-hour prompt cache is about to evict, roughly 12 minutes ahead. Avoids coming back from lunch to full input-token costs and cold-start latency.

hookprompt-cachingtelegramnotifications
by candiesdoodle Sep 1, 2026 7/10
hook Reddit

persistent-handoff: One Handoff File Per Session, Restored by a Hook

For people running many Claude Code sessions in tmux across nightly restarts. A skill writes one handoff file per agent at milestones and deletes it when nothing is in flight; a SessionStart hook feeds it back in at every start, including after /clear and /compact. Packaged as a plugin.

hooksession-managementhandofftmuxplugin
by Any-Bobcat2370 Sep 1, 2026 8/10
hook Reddit

Olivares AI: Hook-Level Policy Enforcement and a Signed Audit Ledger

A self-hosted Go binary whose enforcement point is the PreToolUse/PostToolUse hook: disallowed tool calls are blocked, sent to two-person approval, or rewritten before execution. Adds a durable work plane for parallel sessions and a signed audit ledger, with deny-closed paths backed by tests. AGPL.

hookpolicysecurityauditself-hostedgo
by franolivaresai Sep 1, 2026 7/10
hook Reddit

A Handoff File the Hooks Write for You, Across 80 Repos

The handoff-file pattern breaks whenever the agent forgets to write the file, which is exactly what happens when a session hits a limit, is killed, or wanders off. This version drives the writes from hooks instead, and travels across Claude Code, Codex CLI, and OpenCode for multi-week work spanning a dozen sessions.

hookhandoffsession-managementcross-harness
by jsirish Sep 1, 2026 7/10
hook GitHub

steer: Rule Engine to Deny, Rewrite, or Annotate Agent Tool Calls

A policy layer that intercepts an agent tool call before it executes and decides whether to block it, rewrite its arguments, or attach an annotation. Rules are declarative, so you can encode guardrails like "never rm -rf outside /tmp" once and have them apply everywhere. Useful for running agents in autonomous mode with real constraints rather than prompt-level pleading.

guardrailstool-callspolicysafetyhooks
by amalucelli Sep 1, 2026 8/10
hook GitHub

praxis: Turn CLAUDE.md Workflow Rules Into Hooks and Skills That Fire

Converts the workflow rules people write in CLAUDE.md into actual hooks and skills, so the rules execute instead of relying on the model to remember them. Ships packaged for Claude Code, Codex, Cursor, Gemini, and OpenCode. Aimed at the common failure where documented conventions get ignored mid-session.

hooksclaude-mdconventionscross-platformenforcement
by devseunggwan Sep 1, 2026 7/10
hook GitHub

bluepencil (eugenezhangco-spec): Hooks That Flag AI-Sounding Prose

Two hooks and a dependency-free scorer that check written output against thresholds calibrated on a 974-post human corpus. Because it runs as a hook, the check fires whether or not the model remembers the style instructions. Different project from the similarly named bluepencil by chernistry.

hookswritingai-detectionstylescoring
by eugenezhangco-spec Sep 1, 2026 6/10
hook GitHub

claude-pgrep-pkill-guard: Hook Blocking Session-Killing pgrep/pkill

A PreToolUse hook that denies the specific pgrep and pkill invocations that would kill the agent's own session or hang forever. Narrow and targeted rather than a blanket command ban, so normal process inspection still works.

hooksafetypretoolusebash
by rvenutolo Aug 31, 2026 7/10
hook GitHub

flashgate: The Agent Can't Claim the Firmware Works Until the Board Says So

A hardware-in-the-loop verification gate running build, flash, boot banner check and exit code against real hardware. Removes the agent's ability to declare embedded work complete without physical evidence. Narrow but a genuinely novel gate.

firmwarehardware-in-the-loopverificationembedded
by Lion-1209 Aug 31, 2026 6/10
hook GitHub

clonamic-herness-plugin: Portable Write Approval and Completion Verification

Adds a write-approval step and a completion-verification check that work across Codex, Claude Code, Grok Build and Hermes. Portability matters here — the same guardrails follow you between harnesses. Focused on the two moments agents most often overstep.

guardrailsapprovalverificationportable
by algocean1204 Aug 31, 2026 5/10
hook GitHub

claude-code-guardrails: Incident-Derived Hooks With Measured Cost and 35 Tests

Guardrail hooks derived from actual incidents, plus a plan, implement, verify and crosscheck delivery loop. The hook overhead is measured rather than assumed, and 35 bats tests cover the behaviour. Empirical grounding sets it apart from speculative guardrail sets.

hooksguardrailstestingincidents
by tillmeier Aug 31, 2026 7/10
hook GitHub

todo-harness: Cross-Session TODO Backlog Enforced by Hooks

SessionStart injects your open TODO items into context as a numbered, budget-capped list, and Stop blocks a session that changed files but left the backlog untouched. Turns a passive notes file into a constraint the agent must engage with. Solves the case where a fresh session forgets what the previous one deferred.

hookstodosession-managementenforcement
by MdYasinMollah Aug 30, 2026 7/10
hook GitHub

ai-memory-system: Cross-Project Memory From Markdown Files and Hooks

Persistent memory shared across projects for Claude Code and Codex, built from plain Markdown files plus a small set of hooks. Deliberately minimal, with no database or service to run. Easy to inspect and edit by hand.

memoryhooksmarkdowncross-project
by bersimao Aug 30, 2026 6/10
hook Reddit

Enforce Code Style With a Stop Hook Instead of a CLAUDE.md Rule

Argues that CLAUDE.md rules are advice the model may skip while still costing context every session, whereas a Stop hook runs deterministically. Exit status 2 hands stderr back to Claude, so it reads its own lint errors and fixes them before you see the diff. One formatter needs nothing more than `prettier --write . || exit 2`; the post covers routing several tools across file types.

hookslintingcode-styleautomation
by abemedia Aug 29, 2026 8/10
hook GitHub

SHOOK: Hooks That Force Simplified Technical English on Every Reply

Hook set that enforces ASD-STE100 Simplified Technical English on Claude's output, with a lint gate, a /ste toggle, and a status line badge. Companion to the SimpleEnglish project. An unusually strict take on constraining model prose through hooks rather than prompting.

hookswriting-stylelintingtechnical-english
by viktorinkov Aug 29, 2026 6/10
hook GitHub

npm/bun Install Guard for Claude Code

Claude Code guardrail that refuses known-malicious npm and bun packages including the transitive tree, and quarantines any version published in the last three days. French-language. The quarantine window targets the actual shape of npm supply-chain attacks, which are usually caught days after publication.

npmbunsupply-chainsecurityguardrails
by OnyxynO Aug 29, 2026 7/10
hook GitHub

vibeguard: Zero-Dependency Pre-Commit Guard for AI-Written Code

A pre-commit hook that catches bugs and obvious AI-generated slop before it lands, with no dependency install required. Also scans sites locally, and ships an AI Studio component for reviewing findings. Aimed at teams merging a lot of agent-authored diffs.

pre-commithookscode-qualityreview
by etherhybanthus421 Aug 29, 2026 6/10
hook GitHub

agent-guardrails: A Fail-Open PreToolUse Hook With Seven Battle-Tested Rules

A PreToolUse hook for Claude Code carrying seven rules that each came out of a real incident, plus a regression matrix so the rules can be verified rather than trusted. The fail-open design means a broken or slow hook degrades to permissive instead of bricking your session. A good reference implementation for anyone writing their own tool-use guardrails.

hookspretoolusesafetyguardrailstesting
by kylemillerbuilds Aug 28, 2026 8/10
hook GitHub

Hitch: Record Your Code Assumptions and Fail the Build When One Breaks

Records the conditions your code depends on and fails the build the moment one of them stops being true. Useful against the class of bug where an agent-written change quietly relies on an assumption nobody wrote down.

assumptionsbuildtestingci
by RakhilML Aug 28, 2026 5/10
hook GitHub

claude-sounds: Per-Event Audio Cues for Claude Code Hooks

Plays distinct sounds on Claude Code hook events so you know whether a run finished, needs your input, went idle, or died on an API error. Each event can be toggled independently, sounds are swappable, and quiet hours suppress alerts. Works on macOS, Windows and Linux with zero dependencies.

hooksnotificationsaudiocross-platform
by ChiHanLu Aug 27, 2026 7/10
hook GitHub

beckon: Sound Alerts That Distinguish Done, Blocked and Failed

Attaches distinct audio signals to an AI coding agent's lifecycle so you can tell from across the room whether it finished, is waiting on a decision, or errored out. Aimed at people running long unattended agent sessions who don't want to babysit a terminal.

hooksnotificationsaudio
by Isa1asN Aug 27, 2026 6/10
hook GitHub

claude-compact-handoff: Never Lose State to a Context Compaction

A Claude Code plugin that writes a handoff document at the exact moment context compaction fires, so nothing is silently dropped. At turn boundaries it also asks the agent to produce a reasoned handoff, giving you both a mechanical snapshot and a considered summary.

contextcompactionpluginstatehandoff
by tmastalirsch Aug 27, 2026 8/10
hook GitHub

Queue the Message: Type >> to Send Later, Not Now

Lets you queue a message for Claude Code with a condition attached — type >> in chat and it waits for the moment you choose instead of cutting into work in progress. Fixes the common problem of interrupting a good run because you thought of something mid-task.

queueinterruptionpluginworkflow
by WOLFIEEEE Aug 27, 2026 7/10
hook GitHub

peephole: Block Insecure Code From AI Agents Before It Lands

Security enforcement that sits between an AI coding agent and your repo, catching and blocking insecure code patterns as they are written. It acts as a guardrail rather than a post-hoc scanner. Worth a look if you run agents unattended and want a hard stop on obvious vulnerabilities.

securityguardrailsenforcementcode-review
by akashsebastian333 Aug 27, 2026 7/10
hook GitHub

claude-code-hooks: Two PreToolUse Hooks Blocking rm -rf and .env Reads

Two small PreToolUse hooks: one refuses destructive shell commands before they execute, the other refuses to read .env files, keys, and certs at all. Standard library only, MIT licensed, so there is nothing to install or trust beyond the scripts themselves. A minimal safety net for unattended sessions.

hookssecuritypretoolusesecrets
by isquividet Aug 27, 2026 8/10
hook Reddit

HZR: PreToolUse Hook That Filters Bash Output Before It Hits Context

Hooks into Claude Code PreToolUse and routes Bash through a local daemon that filters output at execution time. The author reports cargo test dropping from roughly 188KB (~47k tokens) to 669 bytes containing just the failing tests with file:line, assertions and exit status, with full output one flag away. A steer mode redirects native Read and Grep to HZR equivalents, and the hook fails open so commands still run if the daemon is down.

hookpretoolusecontexttoken-efficiencybash
by hheadshott Aug 26, 2026 8/10
hook GitHub

claude-vox: One Stop Hook That Reads Claude Code's Answers Aloud

A single Stop hook that speaks Claude Code's replies through your speakers, with a natural intro and summary rather than reading the raw output verbatim. No dependencies to install. Useful for long-running sessions you want to monitor while looking elsewhere.

hookttsaudioaccessibilitynotifications
by Ishan-sa Aug 26, 2026 7/10
hook GitHub

irreversible-command-gate: Intercept Destructive Commands Before They Run

A PreToolUse hook plus a PATH wrapper that catches irreversible commands from Claude Code and Codex CLI before execution. The double layer matters — the wrapper still catches commands that reach the shell by paths the hook does not see.

hookssafetypretooluseguardrails
by jedarden Aug 26, 2026 7/10
hook GitHub

hstack: Twenty-Five Claude Code Hooks and the Incident Behind Each One

Each hook refuses the agent in some specific way, and each is documented with the incident that motivated it — so you can judge whether the failure applies to you. Ships an installer, a doctor command, and a test suite that fails when a guard stops refusing.

hooksguardrailssafetytesting
by howardchan2008 Aug 26, 2026 8/10
hook GitHub

vocalize: ElevenLabs text-to-speech with a Claude Code Stop hook

A CLI that converts text and markdown to speech via the ElevenLabs API, plus a Stop hook that reads Claude's responses aloud when a turn finishes. Turns long unattended sessions into something you can monitor without watching the terminal. Clean example of a Stop hook doing something genuinely useful.

hookttselevenlabsstop-hookaudio
by matthager12-collab Aug 26, 2026 6/10
hook GitHub

plaingate: Explain What Claude Is About to Run, Inside the Permission Prompt

A Claude Code plugin that annotates the native permission prompt with a plain-language explanation of the proposed Bash, PowerShell, Write, or Edit action before you approve it. Analysis is local and deterministic with no telemetry and no extra model call. Directly addresses the habit of approving prompts you have not really read.

permissionssecuritypluginlocal
by srikantmehra57 Aug 25, 2026 7/10
hook GitHub

stay-on-task: A Stop-Hook Gate That Refuses to End a Turn With Work Outstanding

Pairs an external task ledger with a Stop hook that blocks Claude Code from ending its turn while recorded work remains unfinished. Because the ledger lives outside the context window, it survives compaction and long sessions. A direct structural fix for agents that declare completion prematurely.

hookstop-hooktaskscompletion
by rhyspatt Aug 25, 2026 7/10
hook GitHub

ai-review-gate: One Policy Enforced in the Session and on the Pull Request

Applies a single review policy in two places — inside the Claude Code session and again on the pull request — so local and CI enforcement cannot diverge. When the session check fails, the error is handed straight back to the agent in the same turn instead of surfacing later in CI. Tight feedback loop with no duplicated policy definition.

hookreviewpolicycipull-requests
by demartinogiuseppe Aug 25, 2026 6/10
hook GitHub

claude-code-hooks-guide: How hooks behave, how they fail, how to review them

A reference on Claude Code hook semantics, focused on the failure modes people hit in practice — most importantly that exit code 2 blocks the action while exit code 1 does not. Also covers how to review a hook before trusting it. Worth reading before writing your first blocking hook.

hooksreferenceexit-codesreview
by jtmurphysr Aug 25, 2026 8/10
hook Reddit

spawn-guard: Hook that enforces the model you asked for on subagents

A PreToolUse hook that catches the wrong model or effort level before a subagent spawns and auto-corrects it, covering both the Agent and Workflow tools. Addresses the known behavior where asking for Opus subagents does not reliably produce Opus subagents.

hookssubagentsmodel-selectionpretooluse
by Dragon_God_Slayer Aug 25, 2026 7/10
hook GitHub

klyvo: Block DROP, TRUNCATE and unguarded DELETE before an agent runs them

Intercepts destructive database commands — DROP, TRUNCATE, DELETE without a WHERE clause — before your AI coding agent executes them. Runs entirely locally with no network calls, which matters for a tool sitting in the path of your database credentials.

safetydatabaseguardrailslocal
by matrixfuck Aug 25, 2026 7/10
hook GitHub

VSCode-ClaudeCode-Status-Bar: Hook-Driven Session Status in VS Code

Shows whether Claude Code is working, how far a task has progressed, whether it needs input, or is done — driven entirely by local hooks, so there's no API cost. Keeps the state visible without switching to the terminal.

vscodehooksstatusmonitoring
by zxrrcpandey Aug 24, 2026 6/10
hook Reddit

A Pre-Commit Gate That Caught Seven Silent Deletions I Missed

Rather than reviewing diffs by eye, the author added gates that run before a commit lands, including one that flags content quietly disappearing from a staged diff. In the demo it blocked a change where an agent's "tidy up" dropped the section defining when a skill is done — eight deletions that looked harmless.

hookspre-commitreviewguardrails
by Outside_Example8663 Aug 24, 2026 7/10
hook GitHub

relapse: Catch Your Agent Repeating Mistakes It Already Learned

Audits an AI coding agent's shell commands and file edits against your own lesson rules, catching repeats of mistakes it was already corrected on. Detected lapses feed into a spaced-repetition review so the rules get reinforced over time.

hookrulesauditlearning
by pixle-codes Aug 24, 2026 8/10
hook GitHub

revet: Declarative Hook Gates for Agents on Legacy Codebases

Guardrails for AI coding agents working in legacy code, defined as declarative hook gates rather than prose instructions. It ships a scanner that checks whether your gates are actually firing, which catches the common failure of hooks that silently never run.

hookguardrailslegacyverification
by khkim3115 Aug 24, 2026 8/10
hook GitHub

claude-code-setup-pack: Four PreToolUse Hooks Plus an Audit-Then-Mechanize Loop

A starter pack of four PreToolUse hooks and a CLAUDE.md template, built on the premise that prose rules in CLAUDE.md decay while mechanisms don't. The audit-then-mechanize loop is the workflow: find where the agent drifted from your rules, then convert that rule into a hook. Good reference for anyone whose CLAUDE.md keeps getting ignored.

hookspretooluseclaude-mdconfiguration
by EivindKjosbakken Aug 23, 2026 8/10
hook GitHub

agentd: Local Daemon That Guards and Observes Coding-Agent Hooks

Runs as a local daemon enforcing one hook policy across Claude Code, Cursor, Codex, and other agents. Every hook event is both governed and recorded, so you get a single audit trail regardless of which tool ran. Useful when a team uses more than one agent.

hookssecuritypolicydaemon
by macrox-pro Aug 23, 2026 7/10
hook GitHub

agent-control: Evaluate Every Agent Tool Call Before It Runs

Runtime policy enforcement where each tool call is checked against policy before execution and recorded either way, allowed or denied. Zero runtime dependencies, with Node and Python implementations, Apache 2.0. The recording half is what makes it auditable rather than just restrictive.

policysecurityaudithooks
by CIRVIX Aug 23, 2026 7/10
hook GitHub

pellicle: Claude Writes Its Own Status Report Into the Transcript Each Turn

Drops a running status report into the transcript at the end of every turn, authored by Claude itself. Gives you a rolling summary of where the session stands without reading the whole log. Simple idea, and it doubles as context the model can reread.

hooksstatustranscriptcontext
by justinstimatze Aug 23, 2026 7/10
hook GitHub

claude-bouncer: Workspace, Branch, and Production Guard Rails for Claude Code

Enforces workspace boundaries, protects branches, blocks production targets, and catches lost exit status and excessive foreground time. Covers the mistakes that are expensive rather than merely annoying. Note there is an unrelated project by the same name.

hooksguardrailssafetygit
by karlkfi Aug 23, 2026 7/10
hook GitHub

claude-sdlc-harness: Hook-Enforced Plan-Test-Escalate Discipline

Enforces an SDLC on coding agents through hooks and skills with one-command setup: plan before coding, test before shipping, escalate when uncertain. The self-evolving part is that it measures its own effectiveness over time and adjusts. For teams that want process guarantees rather than prompt-level requests.

hookssdlctestingenforcementprocess
by BaseInfinity Aug 23, 2026 7/10
hook Reddit

Keep CLAUDE.md Empty and Inject the System Prompt via a Hook?

Since subagents inherit the full CLAUDE.md and pay for it in tokens, this thread asks whether you can keep CLAUDE.md nearly empty and instead inject orchestrator instructions each turn through a hook. Agents would then carry only their own skill-specific instructions.

hooksclaude-mdtokenssubagents
by Retumbo77 Aug 22, 2026 6/10
hook GitHub

receipts: Compare What the Agent Claimed Against the Transcript

On every stop it emits a receipt setting the agent's claims beside what the transcript actually shows, and flags where the two disagree. It works from parsed transcript data, so it costs zero tokens.

verificationhookstranscriptsreceipts
by sudhanshu1402 Aug 22, 2026 7/10
hook GitHub

env2hell: Deny env Dumps and Hand the Agent Masked Values Instead

Blocks an AI assistant from printing your API keys into the session by denying environment dumps and substituting masked values, so the command still succeeds without leaking the secrets. Works with Claude Code, OpenCode, and Codex.

securitysecretshooksenv
by vadbosh Aug 22, 2026 8/10
hook GitHub

agent-guardrails: PreToolUse Hook With Shadow Mode and Fail-Open

A PreToolUse hook that mechanically enforces the rules you would otherwise write in prose and hope the model follows, with a shadow mode for observing before enforcing. The README documents the lessons from getting the design wrong the first time.

hooksguardrailspretoolusesafety
by TheGringo-ai Aug 22, 2026 8/10
hook Reddit

Translate Claude Code Output to Simplified Technical English with a MessageDisplay Hook

A suggestion to use the MessageDisplay hook to rewrite displayed messages into ASD-STE100 Simplified Technical English, as a remedy for verbose or ornate model prose. The author deliberately chose a hook over a custom Output Style so the rewriting happens after generation and cannot influence how the model reasons. No repo is offered — the point is that the hook is new enough that many users have not noticed it.

hookmessagedisplayoutput-styleasd-ste100verbosity
by LivingFrosting6680 Aug 21, 2026 6/10
hook Reddit

Caret: A Hook-Driven Dock Pet That Shows Claude's Status and Stray Thoughts

Caret is a small character that sits on the macOS dock and animates off Claude Code hooks, jumping in celebration when a turn ends and falling asleep when Claude goes idle. A line in CLAUDE.md invites Claude to send a random thought or quip about the task, which Caret displays in a thought bubble. A nice worked example of using hooks for ambient session feedback, best paired with an audio cue hook.

hooksuiambient-feedbackclaude-mdmacos
by kenttheclark Aug 21, 2026 6/10
hook Reddit

Claude Code Never Knows the Time — Fixing Stale Dates With a Prompt Hook

Claude Code writes the date into the system prompt exactly once, at session start, and has no clock after that — so it misdates files, miscalculates deadlines, and still thinks it is yesterday if you leave a session open overnight. It also cannot tell whether ten seconds or six hours passed between your messages. The fix is a UserPromptSubmit hook that injects the current timestamp on every turn.

hookuserpromptsubmitdatecontextgotcha
by Interesting-Main9706 Aug 21, 2026 7/10
hook GitHub

claude-code-lane-lock: Pin Sessions to Their Project Root

Blocks cross-project drift by pinning a Claude Code session to the directory it started in. The guard fires at t=0, before reasoning tokens are spent, rather than catching a stray edit after the fact. Useful if you run several sessions side by side and have been bitten by one wandering into a sibling repo.

hookguardrailsafetymulti-project
by maxysadm-GH Aug 21, 2026 6/10
hook GitHub

capsule: Runtime Capability Sandbox for Every Skill You Install

Wraps each Skill installed into Claude Code or Codex CLI in a seccomp-style runtime capability sandbox. A skill declares which tools, paths, and network access it needs, and out-of-bounds calls are blocked at the call site and logged — not a load-time gentlemen agreement and not an after-the-fact audit trail. Documentation is in Chinese.

securitysandboxskillspermissionsruntime
by SuperMarioYL Aug 21, 2026 8/10
hook GitHub

gate-oriented-sdd: Spec-Driven Development With a Hook-Enforced Review Gate

Spec-driven development where the review gate is enforced mechanically by a hook rather than requested politely in prose that the model can decide to skip. Ships as one plugin covering both Claude Code and Google Antigravity.

hookspec-drivenreviewpluginworkflow
by m0m0i Aug 21, 2026 7/10
hook GitHub

Auth-Guard: Claude Code Plugin That Stops Secrets Leaking Into Context

A plugin that prevents credentials and secrets from ever reaching the model context or the session transcript. Important because a leaked secret in a transcript persists in logs long after you rotate it, and most secret scanners only catch what reaches a commit.

pluginsecuritysecretshooksprivacy
by ArchitektApx Aug 21, 2026 8/10
hook GitHub

chock: Governance-as-Code Enforced on Every Agent via Git Hooks and CI

Author a policy once and enforce it across Claude, Copilot, Cursor, and Codex through git hooks, CI checks, and each tool native controls. Addresses the reality that per-tool config files drift and only the git and CI layers see every change regardless of which agent made it.

governancepolicyhookscimulti-agent
by open-coder-ai Aug 21, 2026 7/10
hook GitHub

ai-coding-rules-scaffold: Pre-Commit Hook Plus CI Mirror for AI-Written Code

Two-layer enforcement for small teams using AI agents: a pre-commit hook for fast local feedback and a CI mirror so nothing slips through by skipping hooks. Catches debug statement leaks, runaway file growth, secrets, and forbidden patterns before they merge.

hookspre-commitcilintingsecrets
by Sting25 Aug 21, 2026 7/10
hook GitHub

agent-attic: Snapshot Every File Before an AI Agent Overwrites It

Keeps a content-addressed copy of every file an AI coding agent is about to modify, plus an immutable-zone guard that blocks writes to paths you declare off-limits. The whole thing is roughly 200 lines of bash, so it is auditable in one sitting. A lighter-weight safety net than git stashing when an agent goes off the rails mid-session.

safetyversioningbashguardfile-protection
by mpommrehn Aug 21, 2026 7/10
hook Reddit

Claude Code Bypassed a Security Hook on Camera — Then Two Patches Fixed It

A recorded demonstration of an agent working around a security hook, followed by the two patches that closed the hole, with both takes in the same video. Worth watching if you rely on hooks as an enforcement boundary rather than a suggestion.

hookssecurityenforcementvideo
by karanb192 Aug 20, 2026 5/10
hook Reddit

Automatically Rewriting Opuss "Load-Bearing" Prose

Rather than adding more instructions and hoping the model follows them, this treats English as a language with a syntax to check — uncommon wording, abstract sentences, formulaic cues — and forces a rewrite above a complexity threshold. Works because it sits outside the model rather than inside its instructions. English only.

output-stylehookswritingenforcement
by Vistyy Aug 20, 2026 6/10
hook GitHub

codex-guard: Quality Gate for AI-Generated Pull Requests

Blocks the standard failure modes of agent-written PRs before they reach main: leftover TODOs, leaked secrets, sloppy commit messages, and red CI. A gate rather than a reviewer.

quality-gatecisecretspr
by Akimiya-z Aug 20, 2026 6/10
hook Reddit

Scrim: PostToolUse Hook That Strips Tool-Call Junk Before Claude Sees It

A PostToolUse hook that discards passing test output, directory dumps and browser screenshots while keeping FAIL lines, errors and stack traces. Read and Edit results are untouched, and originals are kept in ~/.scrim/blobs for a week. Measured across ~29k tool calls it cut 47% of bytes without losing a failure line.

hooktokenscontextoptimization
by Turbulent-Sky5396 Aug 19, 2026 8/10
hook GitHub

cc-enforcer: Hooks That Deny the Tool Call and Block the Reply

Rather than writing rules in CLAUDE.md and hoping the model honors them, cc-enforcer uses Claude Code hooks to hard-deny tool calls and block replies that violate the rules. It targets three specific failure modes: reactive patching, guessed citations, and premature 'done' claims. Also usable as an LLM-agnostic rule pack outside Claude Code.

hooksenforcementguardrailsrulesquality
by skymanbp Aug 19, 2026 8/10
hook GitHub

delivery-gate: Stop Hook That Blocks Claude Until Quality Checks Pass

A Claude Code Stop hook that refuses to let a session finish until quality checks pass. It looks for rationalized incompleteness, stale learning logs, and low disk space. About 200 lines of stdlib-only Python with deterministic checks, so there is no extra model call in the loop.

hookquality-gatepythonstop-hook
by gategrow Aug 17, 2026 7/10
hook GitHub

memoryhooker: Wire Local Memory Sources into Agent Lifecycle Hooks

Connects local memory sources to coding-agent lifecycle hooks, so a session can be reminded, given a clue, or handed selected search hits at the right moment. It makes no network requests and changes no host configuration. A lighter-touch alternative to running a full memory MCP server.

hookmemorylocalprivacy
by ellmos-ai Aug 17, 2026 7/10
hook GitHub

RoT-DTD-GOAL: A /goal Engine Where the Stop Hook Re-Runs Every Acceptance Test

A Claude Code /goal engine that makes task completion something the agent has to earn instead of declare. Acceptance criteria are written as real shell commands, and a Stop hook re-executes all of them at the end of the session — only an exit code of 0 lets the session end. A direct answer to agents announcing "done" on work that does not actually pass.

hooksstop-hookacceptance-criteriaverificationslash-command
by Nova-Violet-Role Aug 16, 2026 7/10
hook Reddit

claude-model-switch-detector: A Hook That Logs Why Safeguards Switched Your Model

A dependency-free PostToolUse hook that detects when Claude Code's safeguards trigger a mid-task model switch, logging the old and new model, the tool call it followed, and the trail of the preceding five calls. Review with --report to isolate what in your project keeps tripping the flag. The post also notes an undocumented setting, "switchModelsOnFlag": false, which pauses the session instead of silently switching. MIT.

hookssafeguardsmodel-switchingdebuggingsettings
by MeldhLLC Aug 16, 2026 8/10
hook GitHub

hookstack: A Catalogue of Production-Ready Hooks, Installed With One npx

A curated catalogue of Claude Code hooks that also covers OpenAI Codex and GitHub Copilot, installable with a single npx command. Removes the usual copy-paste-from-a-gist step for hook setup. A good starting point if you have never written a hook.

hookcataloguenpxinstall
by steve-magne Aug 15, 2026 7/10
hook GitHub

ApproveGuard: Risk-Score Agent Commands Before You Approve Them

Scores the risk of an agent's proposed commands, auto-approving safe operations and escalating suspicious ones with context, while keeping a tamper-evident decision log. Works across agents and integrates with real Claude Code hooks. Reduces approval fatigue without blanket-allowing everything.

hooksecurityapprovalsrisk
by sxaad69 Aug 15, 2026 7/10
hook GitHub

negative-control: Prove a Detector Hook Can See Before Trusting Its Silence

Adds paired positive and negative controls to the detector hooks your agent writes, so a silent hook is verified as working rather than assumed to be. Directly targets the case where a broken check reports nothing and reads as a pass. A borrowed-from-lab-science idea that fits hooks well.

hooktestingcontrolsverification
by VolodymyrKubiria Aug 15, 2026 7/10
hook Reddit

cstfu: Stop Hooks That Mechanically Enforce Terse Claude Code Output

A Claude Code hook pack that caps response length by rule rather than by prompt — 25-word sentences, 200-word replies. A stop hook re-fires whenever the model drifts back into verbosity, and a filter strips load-bearing filler words drawn from your own transcript fingerprints. For people who find output-style instructions get ignored after a few turns.

hooksoutput-styleverbositystop-hook
by eighteyes Aug 15, 2026 7/10
hook GitHub

agent-guardrails: Fail-Closed Hooks Written After Real Production Incidents

A set of executable enforcement gates that stop a coding agent before it can break production. Each hook fails closed — if the check cannot run, the action is denied — and every rule was added in response to an actual incident rather than a hypothetical. A practical starting point for hardening agent permissions.

hookssafetyproductionenforcement
by adrian-ruda Aug 15, 2026 8/10
hook GitHub

Version-Sentinel: Block Dependency Bumps Until a Cited Version Check Exists

A Claude Code plugin that hard-blocks any dependency addition, upgrade, or downgrade until the agent records a fresh version check with a source citation. It targets the specific failure mode where a model invents a package version from stale training data. Supports npm, pip, Poetry/uv, Cargo, and NuGet.

dependenciespluginhallucinationsupply-chain
by KSEGIT Aug 15, 2026 8/10
hook GitHub

claudesplain: Output Style and Stop Hook That Force Real Explanations

Pairs an output style with a Stop hook so Claude writes up its work for someone who wasn't in the room, using the specific vocabulary of what it actually did. Counters the generic 'I updated the file' summaries that tell a reviewer nothing. Useful when handing sessions off or reviewing agent work asynchronously.

stop-hookoutput-styledocumentationhandoff
by ukanwat Aug 14, 2026 6/10
hook GitHub

night-loop: Stop-Hook Loop That Builds to a Tested MVP Overnight

Chains Claude Code sessions via a Stop hook so the agent keeps working unattended toward a tested MVP instead of halting when a turn ends. The tested-build gate is what keeps an overnight run from producing a large pile of broken code. For anyone who wants long autonomous runs without babysitting the terminal.

stop-hookautonomousovernightautomation
by apsolut Aug 14, 2026 7/10
hook GitHub

waybar-claude-status: Live Session State in Waybar, Driven by Hooks

A waybar module showing live Claude Code session status (working, waiting, idle), fed by Claude Code hooks. Realtime, multi-session aware, and dependency-free. A clean example of using hooks to drive external UI.

hookwaybarlinuxstatus
by jedbillyb Aug 14, 2026 7/10
hook Reddit

Enforce Claude Code Conciseness With a Stop Hook Instead of CLAUDE.md

A stop hook that fires the moment Claude decides it is done, refuses the stop, and injects a conciseness prompt just in time before the final recap is written. The author's argument is that instructions parked in CLAUDE.md or the system prompt decay over a long session, while a just-in-time injection lands exactly when the verbose summary would otherwise be produced. A practical pattern for anyone fighting unreadable model recaps.

hooksstop-hookpromptingoutput-styleclaude-md
by agenticlab1 Aug 13, 2026 8/10
hook Reddit

Claude Code Plugin for cottage: Hide Git-Managed Secrets from Agents

This plugin wraps cottage, a git-based secrets manager, so decrypted secrets in your repo stay invisible to Claude Code. Hooks clean up decrypted material both at session start and on every user prompt, which the author found necessary because secrets decrypted in another terminal mid-session were otherwise still visible. A subcommand installs cottage from the right repository for your environment.

hookssecretssecurityplugin
by Any-Lack-7699 Aug 13, 2026 7/10
hook GitHub

grimdall-os: Runtime security layer that intercepts agent tool calls

Sits between the agent and the system, intercepting tool calls to block dangerous commands and audit everything that runs. Pitched squarely at the 'agent deleted production' scenario. Worth a look if you run agents with broad shell access.

securitysandboxauditruntime
by grimdalltech Aug 13, 2026 7/10
hook GitHub

SLL: Three hooks that make an agent's claims checkable

A Claude Code plugin where a stated test result must actually reproduce, a fabricated import never reaches disk, and every command's real output is recorded. No subagents, active immediately on install. Directly targets the 'the agent said tests pass' trust problem at the hook layer.

hooksverificationhallucinationplugin
by MohamedEmbarak Aug 13, 2026 7/10
hook GitHub

claude-govee-lights: Ambient status lights driven by Claude Code activity

Maps Claude Code states — idle, thinking, using a tool, waiting on you, errored — onto Govee smart lights. A glanceable way to know when a long session needs input without watching the terminal. Frivolous and genuinely useful in equal measure.

hooksambientnotificationssmart-home
by FlashGalatine Aug 13, 2026 6/10
hook Reddit

claude-secret-guard-kit: One Command to Stop Claude Code Reading .env

An MIT-licensed hook kit that blocks Claude Code from reading, echoing, or committing secrets while running in auto-accept mode. The author frames it honestly as a seatbelt rather than a vault: it turns accidental prod-secret reads into something you must explicitly confirm.

secretshookssecurityenvauto-accept
by Necessary_Abroad6632 Aug 13, 2026 7/10
hook GitHub

claude-notify: Windows Toast and iPhone Alerts via ntfy

Bridges Claude Code lifecycle events — task complete, waiting for input, requesting authorization — to native Windows Toast notifications using the ntfy protocol. Because it rides ntfy, iPhone delivery works with no public IP or port forwarding.

notificationswindowsntfyhooksmobile
by Oreofilling Aug 13, 2026 6/10
hook GitHub

CCWinNotifier: Native Windows Toast Notifications for Claude Code

Surfaces Claude Code events as native Windows toast notifications so you stop missing task-completion and permission-request prompts. Useful when Claude Code runs in a background terminal while you work elsewhere.

windowsnotificationshooksdesktop
by Malygos1016 Aug 12, 2026 6/10
hook Reddit

graft: SessionStart and Stop Hooks That Push Codebase Context In

After finding that Claude Code mostly ignored a six-tool MCP server for codebase context and fell back on grep, the author switched to hooks instead. A SessionStart hook injects a codebase map into the prompt before you type anything, and it re-syncs in the background after every edit. graft init wires this up automatically — context arrives whether or not the model thinks to ask for it.

hookscontextsessionstartcodebase-map
by shhdwi Aug 11, 2026 8/10
hook Reddit

Claude Familiar: Pixel-Art Desktop Mascot Driven Entirely by Hooks

A pixel-art familiar that sits in a screen corner and mirrors what Claude Code is doing, wired up through hooks. It exists mainly to catch stalled permission prompts: you get a native OS notification and a speech bubble, and the mascot starts shaking if you ignore it for 30 seconds. Ambient status includes one card per session, tool-specific faces, context ring, model tag, usage bars, and subagent badges.

hooksnotificationsstatusdesktop
by Sir_Vinny Aug 11, 2026 7/10
hook GitHub

claude-code-plugins: Jujutsu Enforcement and Beads Task-Tracking Hooks

A small Claude Code plugin marketplace with two focused entries: hooks that enforce jj (Jujutsu) version control conventions, and hooks that wire agent work into beads task tracking. Narrow by design — useful if you already use either tool and want the agent to respect it.

jujutsuhookstask-trackingmarketplace
by georgebashi Aug 11, 2026 6/10
hook GitHub

claude-jit-context: Load Project Rules Only When They Apply

Matches project knowledge — rules, conventions, domain notes — against the prompt, the file being edited, or the tool being invoked, then injects just that slice at the moment it is needed. Keeps CLAUDE.md from ballooning into an always-loaded encyclopedia that eats context all session.

hookcontext-managementclaude-mdjust-in-time
by Digital-Process-Tools Aug 11, 2026 8/10
hook GitHub

lessons-learned: Plugin That Captures Mistakes and Replays Them Before Tool Calls

A Claude Code plugin that records coding mistakes as they happen and injects the relevant lesson back into context right before a tool call that might repeat it. The point is preventing the same error twice without stuffing everything into CLAUDE.md. Retrieval is scoped to the pending action rather than dumped wholesale.

pluginhooksmemoryerror-prevention
by joeblackwaslike Aug 11, 2026 8/10
hook GitHub

promptsign-plugin: Verify Signatures on Skills Before They Reach Model Context

A Claude Code plugin that checks cryptographic signatures on skills and instruction files before their contents reach model context. Targets the supply-chain risk of installing third-party skills that can inject arbitrary instructions. Verification happens at load time, not install time.

securitypluginsupply-chainsignatures
by PromptSign Aug 11, 2026 7/10
hook Reddit

nuhuh: Stop Hook That Verifies Claude's 'Done' Claims Against Reality

A Stop hook that treats the final assistant message as a set of hypotheses and re-runs each one fresh — tests actually execute, files are actually checked, endpoints are actually hit. Motivated by research finding that 75.8% of failing agent runs that graded themselves still claimed success, and that LLM judges catch this at near coin-flip rates. Blocks completion when a claim does not hold.

hookverificationstop-hooktesting
by Due_Emu_8229 Aug 11, 2026 8/10
hook GitHub

Keepgate: Local Completion Gates Blocking Unverified Done Claims

Local-first gates that block three specific agent failure modes: unverified completion claims, blind retry loops, and reviews performed against stale state. Works across Claude Code, Codex, and Hermes. Runs entirely on your machine.

gatesverificationhooksmulti-agent
by darrien1998 Aug 11, 2026 7/10
hook GitHub

PolicyApprovalGate: PreToolUse Hook That Blocks Dangerous Bash Commands

A PreToolUse hook for Claude Code and Codex CLI that outright denies dangerous shell commands, prompts for confirmation on risky ones, and audits every call. Rules are deterministic with no LLM in the decision path, so behavior is predictable and cheap. Ideal for unattended or automated sessions.

hooksecuritybashauditpolicy
by nobuo-miura Aug 11, 2026 8/10
hook GitHub

agentic-preflight: Push Gate That Blocks Unverified Agent Work

A state machine that records a per-commit review verdict and refuses the push until that commit has actually been reviewed. Your own coding agent does the reviewing; the tool tracks and enforces the outcome. It closes the common failure mode where an agent commits and pushes work nobody verified.

git-hookreview-gateverificationpre-push
by elanthus Aug 11, 2026 8/10
hook GitHub

kuro-lean: compress shell output and block token-hungry calls before they run

Attacks agent token cost from four directions: compresses shell command output before it reaches context, blocks calls it predicts will be expensive, prices the running session live, and recovers sessions whose prompt cache expired. Built on Bun for Claude Code.

tokenshooksbuncost
by kurovu146 Aug 10, 2026 7/10
hook GitHub

claude-code-hooks: block secrets, gate config changes, and nudge compaction

Three zero-dependency hooks that stop secrets from being written into source, require real verification before config changes land, and nudge compaction at safe boundaries instead of mid-task. Small and readable enough to audit before installing.

hookssecuritysecretscompaction
by Adarsh350 Aug 10, 2026 7/10
hook GitHub

mobius-browser-guard: an action-ladder permission gate for Claude in Chrome

A permission gate for Claude in Chrome built as an escalating action ladder, designed so containment does not depend on correctly detecting an attack. That framing matters for prompt injection, where detection is the part that keeps failing.

securitybrowserpermissionscontainment
by mobius-style Aug 10, 2026 7/10
hook GitHub

agent-error-log: a memory for the agent's own mistakes, enforced by a git hook

Requires the agent to log a mistake before fixing it, enforced mechanically by a git hook rather than by asking nicely. Three files plus tooling and CI, zero dependencies. The mechanical enforcement is what makes it stick where a CLAUDE.md instruction would not.

hooksmemoryerrorsgit
by vartiainen1 Aug 10, 2026 7/10
hook GitHub

pf-handoff: Context Budget Sensor and Session Handoff for Claude Code

pf-handoff tracks context-window usage, fires threshold reminders as you approach the limit, and writes HANDOFF state files so work survives compaction. After a compaction it auto-picks-up from the handoff file instead of losing the thread. Ships as rules plus skills plus hooks, with English and Russian docs.

hookscontextcompactionsessionhandoff
by turvodnik Aug 10, 2026 7/10
hook Reddit

Discussion: Blocking Claude Code From Reading .env and Secrets Files

A thread prompted by Claude Code flagging that a read .env file had entered context and been sent to Anthropic. The discussion moves past TLS-in-transit concerns to the real risks: plaintext local transcripts, re-emission of secrets into committed files or ticket comments, and MCP servers receiving whatever the model puts in context. Commenters share hook and permission setups that block secrets files outright.

securitysecretshookspermissionsenv
by Th3D0ct0r Aug 10, 2026 6/10
hook Reddit

Helios: A PreToolUse Gate That Chains Every Command to Prior Evidence

A PreToolUse gated execution policy layer sitting in front of Bash and PowerShell, making every command recordable and requiring each one to connect to the prior evidence chain. Built to keep an agent coherent across macOS, Windows, Linux, and different shells without a database or external orchestration library.

hookspretoolusepolicyaudit
by TinFoilHat_69 Aug 9, 2026 7/10
hook GitHub

receipts (anonim31337): Claude Code Gates That Refuse to Lie Toward OK

Gates for Claude Code built on the premise that exit code 0 does not mean a step is done. Covers both software builds and finished video output, and is designed to fail rather than optimistically report success.

gatesverificationhooksci
by anonim31337-glitch Aug 9, 2026 6/10
hook GitHub

evolveguard: A CI Regression Gate for Self-Editing Claude Agent Skills

A regression-testing CI gate for skills that edit themselves: golden-transcript record and replay against a skill's declared and inferred capability surface, with no hosted infrastructure. Published on both npm and PyPI as evolveguard-cli. A genuinely under-served problem as SKILL.md and MEMORY.md files start rewriting themselves.

ciregression-testingskillsgates
by RudrenduPaul Aug 9, 2026 7/10
hook GitHub

nexum: Output-Truncation Hooks and an Opus-Plans, Sonnet-Implements Workflow

A Claude Code plugin that cuts context tokens and model cost three ways: hooks that truncate tool output, a workflow where Opus plans and Sonnet or Haiku implement, and guards for workflow hygiene. Practical for anyone hitting limits on large repositories.

hookstokenscostmodel-routing
by dropdevrahul Aug 9, 2026 7/10
hook GitHub

Enforcee: Actively Monitor and Enforce Your CLAUDE.md, Skills, and Guards

Actively monitors and enforces CLAUDE.md, skills, instructions, MCP configuration, guards, memory files, system prompts, and project docs rather than hoping the model reads them. It learns your preferences over time and bans patterns you have rejected from future generations.

enforcementclaude-mdguardspreferences
by 7patriksz-art Aug 9, 2026 6/10
hook GitHub

Sidelong: Hook-Based Status Bar That Catches Silent Permission Prompts

An always-on-top bar showing what Claude Code is doing and, more usefully, when it has gone quiet waiting on a permission prompt. Built on the hook system rather than screen scraping, so status is structural; runs local-only with no API key.

hooksnotificationsmonitoringlocal
by UtkarshloneyaITG Aug 8, 2026 6/10
hook GitHub

w2ur/claude-code-setup: Hooks and Agents With Two Blocking Hooks

The author's working Claude Code setup for running 10+ personal apps without reviewing every diff: hooks, subagents and commands, including two blocking hooks that stop bad changes rather than just warning about them. MIT licensed.

hooksagentscommandsconfig
by w2ur Aug 8, 2026 6/10
hook Reddit

Make Parallel Claude Code Sessions Aware of Each Other With Hooks

Running several sessions in one repo means agents overwrite each other's files and get confused about where changes came from. Subagents don't help across separate sessions and markdown-based messaging is brittle, so the author built inter-session messaging on Claude Code hooks - actions that fire on events like turn end.

hooksmulti-sessionmessagingparallel
by asutekku Aug 8, 2026 7/10
hook Reddit

Why Hooks Are the Claude Code Feature Worth Learning

After a year of focusing on prompts and skills, the author found hooks to be the feature that actually changed their setup: scripts and CPU time are cheap while tokens are expensive, so a deterministic script bolted to a workflow stage beats asking the model to remember to trigger a skill. Includes concrete uses like lint runs and data-file updates.

hookstokensautomationdiscussion
by Middle_Key8737 Aug 8, 2026 6/10
hook GitHub

perchling: Half-Megabyte Native Desktop Pet Driven by Claude Code Hooks

A tiny desktop companion that perches on your screen edge and reacts to Claude Code hook events. It is a Swift binary under half a megabyte with no Electron runtime, so it costs almost nothing to leave running. A lightweight take on ambient session-status indicators.

hooksdesktop-petswiftmacosstatus
by zexion7873 Aug 8, 2026 7/10
hook GitHub

onsetter: Deliver a CLAUDE.md Note at the Edit It Is About

A Claude Code hook that holds a paragraph from your CLAUDE.md until the Write or Edit it actually applies to, then delivers it once, gated on path and content. Solves the problem of guidance that gets stated at session start and forgotten by the time it matters.

hookclaude-mdcontextjust-in-time
by justinstimatze Aug 7, 2026 8/10
hook GitHub

plain-english: Prose Linter for AI Writing Tells and Jargon

Catches AI writing tells and undefined jargon before they land in a commit, doc, or issue, with adapters for Claude Code, pre-commit, and CI. Enforcement at three layers means it actually holds.

linterprosepre-commitciwriting
by nordscope-fi Aug 7, 2026 7/10
hook Reddit

Using UserPromptSubmit Hooks to Enforce Output Style

After CLAUDE.md, memory entries and output-style config all failed to stop Claude's 'clever' metaphors, the author moved the instruction into a UserPromptSubmit hook and found it held. Discusses the per-turn token cost and how to keep the injected reminder short. A practical answer to instructions that quietly stop being followed.

hooksuserpromptsubmitoutput-styleverbosity
by orthogonal-ghost Aug 7, 2026 7/10
hook GitHub

dibs: File Claims and Enforcement Hooks for Parallel Agents

Lets each agent call dibs on files with an expiry, and enforces those claims through hooks so two parallel sessions don't stomp the same file. Also records git-native lessons from conflicts. One binary, no server, no database.

parallel-agentshookslockingcoordination
by polymatx Aug 7, 2026 7/10
hook GitHub

Lite-Task-Framework: Task Tracking and Decision Logging via Hooks and MCP

A lightweight task framework for Claude Code that persists tasks, injects relevant memory back into the session, and writes structured decision logs - all exposed through MCP tools and Claude hooks. Aimed at people who want tracking without adopting a heavy project system.

hooksmcptask-trackingmemory
by debaditya-mohankudo Aug 6, 2026 6/10
hook GitHub

leakless: Pre-Execution Guard That Blocks Agents From Writing Secrets

Intercepts Claude Code before it writes API keys, credentials, or private keys to a file - the block happens before anything touches disk or git history, rather than scanning after the fact. Fully local, zero dependencies, zero telemetry.

securitysecretshooksprevention
by ebubekirb Aug 6, 2026 8/10
hook GitHub

neti: Preflight gate that blocks agent tool calls exceeding a declared ceiling

Resolves what a tool call will actually touch before it runs and blocks it when the blast radius exceeds a ceiling you declared up front. Prevents the class of incident where an agent deletes or rewrites far more than intended. A stronger guarantee than per-call approval prompts.

securitypermissionshookstool-callssandboxing
by Neti-Security Aug 5, 2026 8/10
hook Reddit

Scry: Give each Claude Code session awareness of branches, worktrees and PRs

A plugin that briefs every new session on the surrounding state: which worktree another agent is editing, uncommitted changes, existing PRs, failing CI, occupied dev ports, and what production is actually running. Addresses the hygiene that slips when several sessions run at once. Written up as a response to specific repeated failures.

plugingitworktreescontextsessions
by matthewismathis Aug 5, 2026 7/10
hook GitHub

claude-guardrails: Harness-Enforced Rules Against Placeholder Code and Unverified 'Done'

Six dependency-free Claude Code hooks that deny placeholder or stub code and dangerous commands, and block a session from ending on an unverified 'done' claim. Enforcement happens at the harness level rather than relying on prompt instructions, making the guardrails harder for the model to talk its way around.

hookguardrailsquality
by DrunkkToys Aug 5, 2026 7/10
hook GitHub

void-harness: A Development-Doctrine OS for Coding Agents, Enforced by Hooks

A single development doctrine compiled into hook-based enforcement for both Claude Code and Codex, installed with one command via npx voidharness init. Free, account-free, and MIT licensed, aiming to make agent behavior standards concrete and enforced rather than just written guidance.

hookdoctrinestandards
by voidcorp-core Aug 5, 2026 6/10
hook GitHub

warrant-mcp: Plain-English Rules Enforced by a Claude Code Hook

warrant-mcp lets you write rules for your AI agent once in plain English, then deterministically checks every tool call against those rules and uses a Claude Code hook to block calls that violate them. Useful for teams wanting guardrails on what an agent is allowed to do without writing custom validation code.

hookguardrailsrules-engine
by rmanish2000-del Aug 4, 2026 7/10
hook Reddit

Why Claude Code ignores your MCP tool, and the hook-based fix

A developer building the graft codebase-mapping tool found Claude Code often silently ignores custom MCP tools in favor of grep, since nothing tells the model when a tool beats built-ins. The fix: use SessionStart/UserPromptSubmit hooks to inject context directly into stdout, bypassing the tool-selection problem entirely — a reusable technique for any MCP server author.

hooksmcpcontext-injectiontool-adoption
by shhdwi Aug 4, 2026 7/10
hook GitHub

leadline: evidence router & policy engine for coding agents (hooks)

A local-first policy engine, with no LLM in the loop, that enforces source choice and proof-of-use for coding agents through Claude Code hooks — including routing to specific MCP tools — so agents can't skip required checks.

hookpolicylocal-first
by Nazim22 Aug 3, 2026 7/10
hook Reddit

Stop Hook Pattern for Background Codebase Graph Sync

A write-up on using Claude Code's Stop hook — the point where the agent hands control back with nothing waiting on the result — to rebuild a repo's structural call/import graph in the background. The hook spawns a detached process and returns immediately, so the graph refreshes for free via tree-sitter parsing with no added prompt latency and no model call.

hookdeveloper-experiencetree-sitter
by shhdwi Aug 3, 2026 7/10
hook Reddit

PSA: security-review Plugin Can Silently Bill Opus to API Credits

If a project's .env defines ANTHROPIC_API_KEY, Claude Code's built-in security-review plugin uses that key instead of your subscription for its automatic Opus-powered review on every commit/push, billing pay-as-you-go credits with no indication in chat. Fix by renaming the env var or disabling the review (ENABLE_COMMIT_REVIEW=0 / SECURITY_GUIDANCE_DISABLE=1).

hooksecurity-reviewbillinggotchaopus
by Captain_Obvious101 Aug 2, 2026 8/10
hook GitHub

grain: Routes Prompts to the Right Discipline, Zero Cost on Chat

A hooks-based router that classifies each prompt and injects only the matching guidance for that discipline, adding zero token overhead on plain conversational turns. Claims are benchmarked, including ones that failed, rather than just asserted.

prompt-routingcontext-managementbenchmarking
by coreyhiggins Aug 2, 2026 6/10
hook GitHub

deadeye-cc: Automatic Model and Effort Selection via Hooks

A Claude Code plugin that fits the model, effort level, and context budget to each task automatically, aiming for fewer tokens at the same quality. Uses a deterministic policy kernel implemented in hooks, and every reported number is measured rather than estimated.

hookstoken-efficiencymodel-routingcost-optimization
by deepaksinghcs14 Aug 2, 2026 7/10
hook GitHub

claude-bestpractice: A Stop Gate That Runs Your Tests Itself

Adds enforcement, memory, and parallel-session coordination to Claude Code, centered on a Stop gate that actually runs your test suite before accepting a task as complete — so completion is judged on evidence rather than the model's own claim that it's done.

hookverificationtesting
by avanturer Aug 2, 2026 7/10
hook GitHub

Clawness: 195 Coding/Security Rules Injected Into Every Prompt

A Claude Code plugin that injects relevant coding, security, and scientific-computing rules — 195 rules across 28 domains, including test-quality rules derived from mutation-testing its own suite — into every prompt. Also ships a plan-approval gate, access guard, per-project memory, session handoffs, and red/blue-team review agents.

hookpluginsecurity-rules
by fullymiddleaged Aug 2, 2026 7/10
hook GitHub

context-guard: Local-First Context Hygiene for Coding Agents

A Claude Code plugin plus shell helpers that manage large reads, noisy tool output, and redaction, producing artifacts and measured token/cost evidence for how much context each operation actually consumed.

context-managementhooktoken-usage
by ictechgy Aug 2, 2026 6/10
hook GitHub

agentrelay: Supervise a Coding Agent Overnight Without Losing Control

A Rust daemon plus Tauri app and Claude Code plugin for supervising unattended agent runs: it blocks forbidden tool calls before they execute, gates 'done' on actually running tests, checkpoints work to git, caps spend, and produces a morning report where every line is sourced back to evidence. Local-first with no telemetry.

supervisionhookunattended-agents
by MalyStern Aug 2, 2026 7/10
hook GitHub

claude-code-devlog-hooks: Three Hooks That Build a Daily Dev-Journal Habit

A three-layer Claude Code hook setup for building a daily dev-journal habit: SessionStart injects the journaling routine, UserPromptSubmit nudges you when the log goes stale, and Stop blocks the end of a turn once per day until today's entry is updated. PowerShell-first and fail-open by design.

hookdev-journalpowershell
by h8nc4y Aug 2, 2026 6/10
hook GitHub

STK: A Hook That Clamps Oversized File Reads Into Outlines

A Claude Code hook (Session Token Killer) that clamps oversized Read tool results down to line-numbered outlines instead of dumping the full file into context. The author measured that 85% of their oversized agent context came from file reads alone; a companion tool, RTK, targets token waste per command instead of per session.

hooktoken-usagecontext-management
by ryanportfolio Aug 2, 2026 7/10
hook GitHub

RoT-MoE: formally-verified cognitive router for Claude Code

A Claude Code plugin that adds a "Mixture-of-Experts" routing hook, computing a divergence gauge from nine tracked lens activities. The gauge's properties (positivity, boundedness, non-constancy) are backed by machine-checked Lean 4 theorems, and install/uninstall is asserted byte-identical with no network calls.

hookpluginformal-verificationlean4
by Nova-Violet-Role Aug 2, 2026 6/10
hook GitHub

rabadon: C++ Supervision Layer That Hash-Locks Tests Against Fake Green

A supervision layer for coding agents, written in C++, that gates every tool call in about 2.3ms and chains each event into a local, tamper-evident ledger. Notably, when it repairs a broken build it hash-locks the project's test files first, so a "green" bought by editing a test is refused instead of accepted.

supervisionc-plus-plustest-integrityledger
by nosey-dewdrop Aug 1, 2026 8/10
hook GitHub

Pushary: Push-Notification Approvals for AI Coding Agents

Pushary adds human-in-the-loop gating to AI coding agents via push notifications you can approve straight from your phone. It ships as agent hooks/skills for Claude Code, Claude Cowork, Codex, Cursor, and Gemini, with npm and PyPI packages backing the integration.

human-in-the-loopnotificationsapprovalmulti-agent
by Pushary Aug 1, 2026 7/10
hook GitHub

dokion: A Security and Quality Hardening Engine for Coding Agents

Enforces user-authored playbooks across Claude Code, Codex, and Gemini CLI, with verifiable evidence gates and auditable readiness reports — for teams that want agent output checked against a defined bar before it ships.

securityqualitygovernanceauditcodexgemini
by imMamdouhaboammar Aug 1, 2026 6/10
hook GitHub

shellgate: Network Policy Enforcement for Claude Code and Codex

Puts Claude Code and Codex sessions under a declared network policy, matching every outbound connection on both destination host and the calling binary, with a Slack front end for visibility and control.

network-policysecurityslackcodex
by infisionai Aug 1, 2026 7/10
hook GitHub

aiui: Native macOS Dialogs for Claude Code Prompts

Gives Claude Code native macOS dialog boxes for asking questions, confirming actions, and collecting input, instead of everything staying buried in the terminal.

macosdialogsux
by byte5ai Aug 1, 2026 5/10
hook GitHub

secuarden-cli: A Governance Flight Recorder for AI-Written Code

Captures agent actions, developer identity, and sensitive-data access locally and privacy-safely, with optional branch-level risk feedback — aimed at teams that need an audit trail for AI-written code, not just a debug log.

governanceauditcompliancelocal-first
by secuardenai Aug 1, 2026 5/10
hook GitHub

ai-governance-template: Make Claude Code's Judgment Calls Verifiable

A repository template for making AI decisions auditable — rubrics, hooks, golden test sets, and a precedent-based ensemble pipeline, plus a real-time monitoring dashboard for reviewing what the agent decided and why.

governanceverificationrubricsdashboard
by hy0in Aug 1, 2026 6/10
hook GitHub

aiward: A Secret-Leak Firewall for AI Agents

An encrypted vault for secrets with scoped approvals and audit logs, aimed at stopping AI coding agents from leaking credentials into logs, commits, or model context.

secretsvaultsecurityaudit
by aiWardsh Aug 1, 2026 6/10
hook GitHub

agentdone: Low-Noise Slack Notifications for Claude Code

Sends a Slack notification only when a Claude Code agent has truly finished, filtering out false-positive completion signals. Aimed at reducing notification noise for people monitoring long-running agent sessions.

slacknotificationshookmonitoring
by takahira Aug 1, 2026 7/10
hook GitHub

stop-guard: Claude Code Stop Hook That Detects Silent Death

A Stop hook that detects when Claude Code's end_turn event silently fails (invoke-leak or empty end_turn) and automatically injects a retry. Addresses a known failure mode where sessions appear to finish but haven't actually completed.

hookreliabilitystop-hookretry
by takahira Aug 1, 2026 8/10
hook GitHub

ratchet: Checks Whether Your Agent Actually Followed the Rules

Your agent reads CLAUDE.md and other rule files — ratchet verifies whether it actually followed them, closing the gap between advisory instructions and enforced behavior.

hookrule-enforcementcompliance
by 0xwilliamortiz Aug 1, 2026 6/10
hook Reddit

Your Formatter Hook Is Costing You a Silent Re-Read on Every Write

A PostToolUse Prettier hook rewrites the file after Claude writes it, so the next edit gets refused as stale and Claude re-reads the whole file — paying for one edit twice in context, not milliseconds. The fix: format at the boundary (one bulk pass plus a pre-push hook) rather than continuously, unless your repo is already fully formatted and diffs stay small.

hookformattercontext-costprettier
by techpotions Aug 1, 2026 8/10
hook GitHub

pane-resume: Restore Your Claude Code Panes After a Mac Restart

After a Mac restart, Warp and Superset reopen panes as idle empty shells — pane-resume resumes the actual Claude Code, Codex, or Gemini conversation each pane had. Opt-in zsh hook, macOS only.

macoszsh-hooksession-resume
by 2solarmax Aug 1, 2026 6/10
hook GitHub

cc-vision-bridge: Give Claude Code Vision Even With Text-Only Models

A hook-based bridge that adds vision capability to Claude Code when running text-only models like DeepSeek, using a permanent cache and an Action Guide. Useful for setups where the coding backend has no native image understanding but the workflow still needs to inspect screenshots or diagrams.

hooksvisiondeepseekmultimodal
by binaricat Jul 31, 2026 7/10
hook GitHub

Aegis: Make Coding Agents Architecture-Aware Across Long Tasks

A tool that keeps AI coding agents grounded in a project's actual architecture over long-running tasks: baseline-first, evidence-verified, and checked for drift, to prevent agents from silently deviating from an established design.

hookarchitecturedrift-detection
by GanyuanRan Jul 31, 2026 6/10
hook GitHub

agentjail: Local Policy Guardrails for Coding Agent Tool Calls

Policy guardrails for Claude Code, Codex, and Cursor that check every tool call locally against a policy before it's allowed to run, rather than relying on the model to self-restrict.

hookguardrailssecurity
by LuD1161 Jul 31, 2026 7/10
hook Reddit

agent-undo: Automatic Rollback When a Tool-Calling Agent Fails Mid-Task

A library that wraps agent tools with undo handlers so that if one step in a chain fails, every already-succeeded step rolls back automatically in reverse order, like a database transaction. Includes adapters for the Vercel AI SDK and Mastra, plus an MCP server so Claude Code can trigger rollbacks through plain tool calls.

hookrollbacktransactionsmcp
by Hour-Bite8746 Jul 31, 2026 7/10
hook GitHub

TmuxCue: Native tmux Status Cues for Codex and Claude Code

Adds native tmux status indicators showing when a Codex or Claude Code session needs approval, is running, or has finished, useful for anyone managing several agent sessions across tmux panes.

hooktmuxstatus
by tianciB Jul 31, 2026 6/10
hook GitHub

stalebrain: Audit CLAUDE.md and Other Agent Memory Files for Decay

Audits CLAUDE.md, AGENTS.md, .cursorrules, GEMINI.md, and 18+ other agent memory files against the live repo, flagging typed claims that no longer hold, citing the commits that broke them, and applying a half-life decay score with a token meter. Fixes are approve-only, and it works with any agent.

hookclaude-mdmemoryaudit
by stalebrainlabs Jul 31, 2026 7/10
hook GitHub

agora: A Trust Plane for MCP Servers and Agent Skills

Verifies where MCP servers and Agent Skills actually come from, observes what they do at runtime, and enforces user-defined policy over both, managed centrally across hosts like OpenCode, Claude Code, and Cursor.

hookmcpsecuritysupply-chain
by IrgenSlj Jul 31, 2026 7/10
hook Reddit

Hook that offloads subagent tasks to other people's idle Claude sessions

A PreToolUse hook on Task that detects self-contained subagent work (research, prose, isolated codegen) and offers to route it to someone else's idle Claude Code session over a network instead of spawning locally. An acceptance judge validates the returned artifact, and any risky or repo-touching work always falls back to running locally. The author reports 2.34M tokens saved across 72 tasks, but notes there aren't yet enough idle 'earner' sessions online to make routing reliable.

hooksubagentstoken-savingsp2pquota
by derfnugget Jul 31, 2026 7/10
hook Reddit

The permission prompt doesn't show what Claude already read before asking

Argues that Claude Code's approval system has a structural gap: it judges one bash command at a time, but the model carries everything it read beforehand — including deploy configs and secret references — and the approval prompt never surfaces that history. Points to Gensee Crate, an open-source project wiring read-history into the approval prompt itself so you see what the agent explored before you approve a command.

securitypermissionshookstransparency
by Nearby_Refuse8172 Jul 31, 2026 7/10
hook GitHub

feishu-session-notify: Feishu Completion Cards for Coding Agents

Sends completion cards to Feishu when a Claude Code, Codex, or other coding-agent session finishes, so you know a long-running task is done without watching the terminal. A narrower, notification-focused entry in the crowded Feishu/Lark integration space.

feishunotificationshook
by AMortalsOdyssey Jul 30, 2026 5/10
hook GitHub

ClaudeCodeSounds: Distinct Audio Alerts for Claude Code Events

Plays a distinct sound the moment Claude Code finishes a task, needs input, hits a usage limit, or fails, so you do not have to keep glancing at the terminal. Works on Windows, Linux, and macOS.

notificationssoundhooks
by azyzex Jul 30, 2026 6/10
hook Reddit

UserPromptSubmit Hook to Force Plain, Literal Language from Claude

A settings.json hook example that injects a writing rule into every turn via UserPromptSubmit, instructing Claude to avoid metaphor and vivid or cryptic phrasing and instead name things by what they literally do. Useful if you find Claude's default response style overly flowery or hard to parse.

hookUserPromptSubmitwriting-style
by miguelgoldie Jul 30, 2026 5/10
hook Reddit

claude-session-namer: Auto-Rename Claude Code Sessions with Haiku

A background hook fires after each Claude reply, using Haiku to read the conversation and generate a clear, short session title, re-checking as the topic evolves. Supports optional project prefixes for bucketing sessions and includes a backfill command to retitle existing sessions; works in both the Claude Code CLI and desktop app.

hookssession-managementhaikuproductivity
by HighestOfSociety Jul 30, 2026 7/10
hook Reddit

A Plugin That Hands Back Your Own Words After /compact Loses Detail

After analyzing Claude Code's own compaction boundary records, this poster built a plugin that recovers dropped detail by returning your own prior turns verbatim (lexical retrieval, not a re-summary) at the compaction boundary for about 700 tokens. It also ships two other hooks: declining re-reads of unchanged files (22.4% of disk reads in their corpus) and redirecting oversized skill loads (one skill cost 325,000 tokens, 75% of a session) to just the relevant section.

compactioncontext-managementtokenshooks
by Upper_Counter_4474 Jul 30, 2026 8/10
hook GitHub

kbd-signal: Turn Your RGB Keyboard Into a Claude Code Status Lamp

Uses raw HID commands on stock firmware to turn a VIA-compatible RGB keyboard's backlight into a status indicator for Claude Code or Codex, showing approval-waiting, done, or error states at a glance. No custom firmware flash required.

hardwarestatus-indicatorhidhook
by Sora-bluesky Jul 30, 2026 6/10
hook GitHub

ecotokens: Token optimizer for Claude Code, Gemini CLI & Qwen Code

A PreToolUse hook that compresses shell command outputs before they hit the model context, reducing token usage across Claude Code, Gemini CLI, and Qwen Code. Includes a TUI dashboard tracking estimated USD savings from the compression.

hooktoken-optimizationtuicost-savings
by hansipie Jul 29, 2026 7/10
hook Reddit

A practical walkthrough of Claude Code PreToolUse and Stop hooks

A writeup on setting up hooks after months of avoiding them, covering PreToolUse (blocks tool calls before they run, with a reason fed back into Claude's context so it can self-correct) and Stop hooks (runs typecheck before allowing session handoff). Includes concrete examples for secret-scanning, destructive-command blocking, package-manager enforcement, and a warning that unconditional Stop-hook blocking loops forever.

hookspretoolusestop-hookguide
by techpotions Jul 29, 2026 7/10
hook GitHub

clowk: intercepts credentials pasted into AI coding agent chats

A dependency-free (stdlib Python) tool that catches credentials pasted into an AI coding agent's chat input before they reach the model, filing them locally and recording their origin. Works with Claude Code, Codex, and Gemini CLI — distinct from tool-call-blocking approaches in that it screens user-pasted chat input rather than commands or file writes.

securitycredentialssecret-scanning
by Aniumbott Jul 29, 2026 6/10
hook GitHub

Axiom-PMO: Governance Control Plane for AI Coding Agents

Keeps AI coding agents inside verified requirements and approved scope, with traceable evidence and human-controlled release gates before anything ships.

hookgovernanceapproval-gates
by witchwasin Jul 29, 2026 6/10
hook GitHub

andon: Deterministic Verification for AI-Generated Analysis

Runs reconciliation, consistency, and Excel-integrity checks on AI-generated analysis, stopping the line when the numbers don't add up rather than trusting the model's own claims.

hookverificationexcel
by gulmezeren2-byte Jul 29, 2026 6/10
hook GitHub

unbluff: Self-Verification Hooks That Keep Claude Code Honest

Self-verification hooks plus a reasoning skill that check the agent's own claims against your prompts, your tests, parked work, and memory. Fail-silent, stdlib-only, no network calls.

hookverificationstdlib-only
by AmmarBibi Jul 29, 2026 7/10
hook GitHub

VibeTags: Java Annotation Guardrails for AI Code Generation

A Java annotation processor that acts as AI guardrails for code-generation tools like Cursor, Claude, Gemini, and Codex CLI, letting developers protect critical code and steer AI implementations through simple annotations.

hookjavaguardrails
by PIsberg Jul 29, 2026 6/10
hook GitHub

berndeutsch-for-ai: Make Any LLM Write Real Bernese German

A tool-agnostic rulebook that makes any LLM write real Bärndütsch (Bernese German), plus a Claude Code hook that injects it automatically when your prompt is written in the dialect.

hooklocalizationswiss-german
by sapn95 Jul 29, 2026 5/10
hook GitHub

DashClaw: Governance Runtime That Intercepts, Approves, and Audits Agent Actions

A governance runtime for AI agents that intercepts actions before they execute, enforces configurable guard policies, requires approvals for risky operations, and produces audit-ready decision trails. Structured oversight for teams that need a paper trail on what an autonomous agent actually did.

hookgovernanceauditapprovalssafety
by ucsandman Jul 29, 2026 8/10
hook GitHub

ballast: Hardening and Context-Survival Hooks for Claude Code

Hooks that block destructive commands, keep secrets out of the context window, and carry session state across a compaction event, so a long session doesn't lose track of what it was doing when Claude Code compacts its context.

hooksafetycompactionsecrets
by Bakr-1 Jul 29, 2026 7/10
hook GitHub

context-guardian: detects context-loss in Claude Code sessions

A tool that detects when a Claude Code session is losing context and nudges Claude to delegate or compact, rather than just displaying a passive dashboard. Addresses a common pain point of long sessions degrading in quality.

context-managementhooksession-health
by yash161004 Jul 28, 2026 7/10
hook Reddit

CommitLore: Git-native decision memory so Claude Code sees past rejections

CommitLore stores structured decision records (rejected alternatives, limits, warnings, unverified assumptions) in Git commit trailers and refs/notes, then surfaces them via an MCP tool or PreToolUse hook before Claude edits a path. MIT-licensed, keeps Git as the sole source of truth, and the author transparently walked back an unproven agent-behavior benchmark claim rather than overstating results.

hookmcpgitdecision-memory
by Monglong_korea Jul 28, 2026 8/10
hook Reddit

An open-sourced behavior layer for consistent Claude Code sessions

A .claude/ configuration layer with 18 skills, 4 agents, and 8 hooks designed to keep Claude Code's behavior consistent across sessions, on the premise that hooks enforce rules while written instructions merely drift. Hooks block risky commands like rm and git clean, fence each agent to its own directory, keep the main checkout unwritable so code only lands in worktrees, and provide a file-based ask/answer bus between blocked sessions.

hookconfigurationworkflowsafety
by Different-Sir7406 Jul 28, 2026 7/10
hook GitHub

agent-watch-approve: remote approval system for AI coding agents

Pushes approval-request cards to your phone, watch, or PC via Feishu when Claude Code, Cursor, Codex, or other agents (9 supported) want to take risky actions. Lets you review and approve or deny agent actions remotely instead of staying at your desk.

approval-workflowremote-notificationspermissions
by yushimohuang Jul 28, 2026 6/10
hook GitHub

cc-safe-setup: Safety Hooks for Claude Code That Block Destructive Operations

A collection of Claude Code hooks that intercept and block destructive tool calls at the tool boundary before they can cause harm. Also surfaces silent failures that Claude Code would otherwise ignore. Addresses the problem of agentic coding accidentally deleting or overwriting important files.

safetyhooksdestructive-opsguardrails
by yurukusa Jul 27, 2026 8/10
hook Reddit

Probity: TDD Enforcement Hook for Claude Code and Other Coding Agents

A successor to TDD Guard (2k stars, 300k downloads) that enforces Test-Driven Development and other rules across multiple coding agents. Hooks into the agent workflow to enforce step-by-step TDD rather than letting Claude skip the red-green-refactor cycle. Open source, with video walkthrough by Emily Bache.

TDDtestingenforcementhooksworkflow
by nizos-dev Jul 27, 2026 8/10
hook GitHub

squeez: Hook-Based Token Compressor for Claude Code and Other AI CLI Hosts

A hook-based token compressor that intercepts bash command output across 5 AI CLI hosts: Claude Code, Copilot CLI, OpenCode, Gemini CLI, and Codex CLI. Achieves up to 95% compression on bash output with signature mode for code file reads, cross-call deduplication, and a self-teaching protocol. No runtime dependencies.

tokenscompressionhooksefficiencybash
by claudioemmanuel Jul 27, 2026 8/10
hook Reddit

Memory System for Claude Code With Ebbinghaus Decay and Cued Recall

Drop-in memory layer wired via Claude Code hooks (PostToolUse, UserPromptSubmit, SessionStart/End) that applies the Ebbinghaus forgetting curve: unused memories fade, recalled ones reinforce, and weak matches surface separately with hedging language. Uses ChromaDB + sentence-transformers locally; no external API calls for memory itself.

memoryhooksdecayrecallchromadb
by Vegetable-Water6007 Jul 27, 2026 8/10
hook GitHub

claude-forge: Suite of Domain-Agnostic Claude Code Plugins Sharing Hook Infrastructure

A curated suite of Claude Code plugins covering session continuity, DevOps/AWS/Terraform, AI/LLM patterns, frontend and UI, and code review. All plugins share a common hook infrastructure via symlinks, so installing multiple plugins avoids duplicate hook wiring. MIT licensed.

hookplugindevopssessioncode-review
by ArieGoldkin Jul 26, 2026 8/10
hook Reddit

ThumbGate: Pre-Action Gate Hook for Claude Code Tool Calls

ThumbGate is a PreToolUse hook that evaluates the exact arguments of every tool call before execution — not the model summary. Returns allow, block, or require-approval. Gates high-consequence actions like force-pushes, destructive DB ops, credential output, and production deploys. Open-source and MIT licensed.

hooksecuritypre-tool-usegateautomation
by eazyigz123 Jul 26, 2026 7/10
hook GitHub

Intent Alignment Guard: PreToolUse Hook with 5-Question Protocol and Tiered Action Gates

Adds a 5-question task-start protocol and tiered action gate via a PreToolUse hook in Claude Code. Claude must answer intent-alignment questions before running any tool, and destructive actions are blocked outright before execution. Directly addresses the core safety problem of agents acting before fully understanding the task.

hookpreToolUsesafetydestructive-actionsintent-alignment
by bb25see-hash Jul 26, 2026 8/10
hook GitHub

Agent Wormhole: Defense Against Self-Replicating Prompt Injection in Agent Config Files

Security tool that detects and stops prompt injection payloads that attempt to write themselves into AI agent config files such as CLAUDE.md or .mcp.json. Targets the persistence class of attack where malicious content survives across sessions by hijacking the agent's own configuration. Essential for anyone running Claude Code against untrusted codebases or external data sources.

securityprompt-injectionhookconfigpersistencedefense
by runningoffcode Jul 26, 2026 7/10
hook Reddit

quota-guard: Hook that warns before hitting Claude Code rate limits mid-task

A UserPromptSubmit hook that reads Claude Code's local rate_limits data, tracks your token burn rate over the last 45 minutes, and warns or blocks before you start a task you can't finish. Configurable thresholds (warn at 75%, block at 92%), zero dependencies, fully local. Prevents the frustrating scenario of a big refactor dying mid-run due to a rate limit hit.

hookrate-limitquotaUserPromptSubmit
by Educational-Funny-97 Jul 26, 2026 8/10
hook GitHub

cacp: Cache-Aware Context Protocol — deterministic context guard hook

A single-file install hook providing a deterministic context guard, cache-stable startup packets, durable Obsidian memory integration, and real provider usage measurement. Targets cache efficiency and context stability across sessions.

hookcachecontextmemoryobsidian
by renf0x Jul 26, 2026 8/10
hook Reddit

claude-budget: Track AI coding costs as git trailers per commit

A Go tool that reads Claude Code local session transcripts, attributes them to the current branch, and appends a Claude-Cost git trailer to every commit. Enables cost-per-feature analysis with standard git log commands. Single static binary, no telemetry, handles rebase/squash/amend correctly.

githookscost-trackingtrailers
by mgyk1024 Jul 26, 2026 8/10
hook Reddit

Preventing structural code decay from AI agents with context hooks

Analysis of three failure modes from AI-generated code — invisible duplication, complexity accumulation in hotspot files, and missing co-changes — with concrete mitigations. Key technique: inject a code health map via SessionStart hooks naming hotspot files, coverage gaps, and duplication clusters before the agent writes anything.

hookscode-qualitySessionStartPostToolUsestructural-decay
by Obvious_Gap_5768 Jul 26, 2026 8/10
hook Reddit

How do you do session handoffs in claude code?

My current process is a session wrap hook that summarizes the chat. But I am looking to optimizing my flow? submitted by /u/Unable_Breath_1966 [link] [comments]

hook
by Unable_Breath_1966 Jul 25, 2026 8/10
hook Reddit

Power users give me the Juice!

Anthropic’s #1 hater here - I come in peace! My beloved OpenAI has stabbed us in the back with their epic 5.6 usage rug-pull. Opus 5 looked super solid as a work horse so decided to move one of my ...

hooktestingreview
by ShamanJohnny Jul 25, 2026 7/10
hook Reddit

Day 3 of AI agents maintaining OmniDesk on their own

https://preview.redd.it/sycx7n6305fh1.png?width=1567&format=png&auto=webp&s=64ebf0cde5bc0bb208abd3fee82fa148713ae6a3 Today they did something new: planned and shipped a whole feature end to end. 🚀 ...

hookgitreview
by carloluisito Jul 24, 2026 6/10
hook GitHub

Paranoid: Block Agent Completion Until Real-App Check Passes

A safety gate that blocks an AI coding agent from finishing a task until the project's own real-app verification passes. Distinguishes passing tests from a feature actually running—bridging the gap between unit test success and observable behavior. Lightweight hook that enforces an evidence-based done criterion.

safetyverificationhookstestinggate
by egehazar Jul 21, 2026 8/10
hook GitHub

Longline: Bash Command Security Policy Hook for Claude Code

A safety hook that parses every Bash command Claude Code wants to run and enforces configurable security policies before execution. Lets you block or require approval for dangerous patterns (rm -rf, curl | bash, etc.) without disabling Bash entirely. Configurable policy file makes it adaptable to different project risk levels.

securityhooksbashsafetypolicy
by devinbarry Jul 21, 2026 8/10
hook Reddit

Filtering Secrets from Claude Code with a Post-ToolUse Hook

A blog post demonstrating how to use a Claude Code post-tool-use hook to prevent the agent from ever reading environment variables. By intercepting env var access before the model processes the output, the hook closes a potential exfiltration vector where the agent could learn and leak credentials. Practical security hardening with minimal setup.

securityhookssecretsenv-varssafety
by andy_p_w Jul 21, 2026 8/10
hook GitHub

Getff: Compile Team Conventions into Native Toolchain Gates

Compiles your team's coding conventions into native toolchain enforcement—ESLint rules, Clippy lints—so they run deterministically in CI with no LLM cost. The project's own AGENTS.md is executable, making it self-documenting. Bridges the gap between agent-readable conventions and machine-enforceable rules.

conventionseslintcihooksdeterministic
by artyhoo Jul 21, 2026 7/10
hook GitHub

redstamp: Offline Firewall for AI Agent Tool Calls With Risk Tiers and Audit Trail

Deterministic, offline security layer that classifies AI agent tool calls into green/yellow/red/black risk tiers and blocks secret exfiltration and prompt injection. Runs as a Claude Code hook or MCP proxy. Includes a tamper-evident audit log and an open benchmark (arena) for comparing agent firewalls.

securityfirewallhookmcp-proxyprompt-injectionaudit
by askalf Jul 21, 2026 8/10
hook GitHub

fencepost: Configurable Permission Gate for Every Claude Code Tool Call

Sits between Claude Code and its tools, evaluating each tool call against configurable permission rules before allowing it to proceed. Lets you define fine-grained policies over which tools can be called and under what conditions, adding a human-auditable layer of control without disabling tools entirely.

hookpermissionssecuritygatetool-callspolicy
by ch4nn0n Jul 20, 2026 8/10
hook GitHub

devguard: Hook-Based Memory and Self-Correction for Claude Code

devguard adds a lightweight memory and self-correction layer to Claude Code via hooks. It records decisions made per feature and uses hook callbacks to nudge the agent back on track when it begins looping or contradicting past choices. Local-only, zero external dependencies, no configuration required.

hookmemoryself-correctionloop-preventionautomation
by Saksiper Jul 19, 2026 8/10
hook GitHub

commitgate: Fail-Closed Commit Gate — Builder Claude + Reviewer Codex

A dual-agent commit gate where Claude builds and Codex reviews; no commit passes without review, approval, and documented evidence. Prevents unreviewed AI-generated code from merging. Complements standard git hooks with cross-agent verification.

hookcode-reviewcodexquality-gate
by sol5288 Jul 19, 2026 7/10
hook GitHub

git-fence: Chesterton's Fence Guard for AI Coding Agents

Warns an AI coding agent before it edits code that exists specifically to fix a bug. Implements the Chesterton's Fence principle: don't remove something until you understand why it's there. Prevents agents from silently undoing intentional bug-fix patterns.

hooksafetygitbug-prevention
by mythren Jul 19, 2026 8/10
hook GitHub

claude-code-ship-gate: Pre-Push Quality Gate That Runs Above Git

A shipping gate for Claude Code that runs tests, code review, security checks, and secret scanning before any push to a protected branch — and unlike git hooks, it cannot be bypassed with --no-verify. Triggered by saying 'ship it'. Forces all quality checks to pass before pushing.

hookquality-gatesecuritypre-push
by aksheyw Jul 19, 2026 8/10
hook GitHub

design-qa: Pre-Ship Design QA Gate for UI Screens

A pre-merge quality gate for UI screens that checks contrast ratios, touch target sizes, keyboard navigation paths, and responsive breakpoints. Runs as part of the Claude Code workflow before any UI screen is merged. Part of the humbleteam design skill collection.

hookdesignqaaccessibilityresponsive
by humbleteam Jul 19, 2026 7/10
hook GitHub

claude-glow: Smart Bulb Status Light for Claude Code Sessions

Wires Claude Code hooks to a Tuya/Halonix smart bulb: amber when a tool runs, red pulse when approval is needed, green when idle. Control path is a hook firing a Python script over local LAN — no cloud required. The red pulse makes long-running sessions self-announcing.

hookiotsmart-homeautomationphysical-feedback
by reshadat Jul 19, 2026 7/10
hook Reddit

File Modification and Deletion Protection for Claude Code on macOS

A practical setup using macOS immutable flags to lock critical files (CLAUDE.md, .zshrc, SSH config) so Claude Code cannot accidentally modify them, combined with a trash alias that intercepts rm commands. Includes a flock script for toggling protection and CLAUDE.md instructions to use trash instead of rm.

hooksafetymacosfile-protection
by jftuga Jul 19, 2026 7/10
hook Reddit

Use Deterministic PreToolUse Hooks Instead of CLAUDE.md Rules

Open-sourced governance setup using PreToolUse hooks that exit 2 when a rule is broken, preventing the tool call from running and feeding stderr back to the model as correction. Includes a SessionStart hook that loads relevant rules by index, a UserPromptSubmit intent hook, and a Stop hook write-back gate to prevent ending sessions without updating trackers.

hookpretoolusegovernancedeterministicsettings
by Sea_Life493 Jul 18, 2026 8/10
hook GitHub

aimhooman: Teach Coding Agents Git Etiquette

Teaches coding agents to keep agent memory, internal instructions, temporary artifacts, and unwanted attribution out of human-owned repositories. Addresses the common problem of AI agents polluting git history with their own scaffolding and internal state files.

gitetiquettehookagent-hygienecleanup
by rmyndharis Jul 18, 2026 7/10
hook GitHub

visual-feedback: Browser Extension to Send UI Feedback to Claude Code

MV3 browser extension that lets you mark elements on any page and send structured feedback (selector, computed CSS, screenshot) directly to your Claude Code agent via a local inbox. Bridges the gap between visual UI review and the agent that needs to fix the code.

browser-extensionfeedbackuiscreenshotmcp
by Yodaisgaming Jul 18, 2026 7/10
hook GitHub

tracewall: Flight Recorder and Firewall for AI Agent Tool Calls

A flight recorder and firewall for AI agents that records every tool call, tracks lethal-trifecta taint (prompt injection paths) across a session, and blocks the prompt-injection exfiltration path. Zero dependencies and cross-harness. Essential security layer for agentic setups handling sensitive data.

hooksecurityprompt-injectionfirewallloggingAI-agents
by VinayJogani14 Jul 18, 2026 8/10
hook GitHub

failproofai: Runtime Failure Resolution and Safety Gate for Coding Agents

Runtime failure resolution for coding agents — hooks into Claude Code, Codex, and popular harnesses to catch infinite loops, dangerous actions, and secret leaks before they become incidents. Zero latency because it runs locally. Provides a safety net for unattended agent sessions.

hooksafetysecurityclaude-codecodexruntime
by FailproofAI Jul 18, 2026 8/10
hook GitHub

bash-guard: Fail-Closed Bash Safety Gate for Claude Code and Codex

A fail-closed Bash safety gate that intercepts and validates shell commands before Claude Code or Codex can execute them. Blocks dangerous commands while allowing safe ones through with no configuration needed for common cases. Provides a hard safety boundary for unattended agent sessions.

hooksafetybashclaude-codecodexsecurity
by lloydzhou Jul 18, 2026 8/10
hook GitHub

drift-detector: Detects Behavioral Drift From Your Claude Output Contract

Detects behavioral drift from your Claude output contract and steers the model back — deterministic, dependency-free, with 100% accuracy on a 170-session test corpus. Useful for production workflows where Claude output needs to stay within a defined format or behavior envelope over many turns.

hookdrift-detectionoutputbehaviorclaude-codequality
by 88plug Jul 18, 2026 7/10
hook Reddit

Agent Hooks Tell You What Was Asked — Not What Actually Happened

Thoughtful analysis of the gap between hook-level permission grants and the actual session-level impact of combined agent actions. Covers CLAUDE.md write-back risks, config drift, and the difference between blocking one tool call and auditing an entire 400-action session. Recommends per-session user account isolation and keeping secrets out of agent-readable paths.

hookssecurityobservabilitypermissions
by Nearby_Refuse8172 Jul 17, 2026 7/10
hook Reddit

Claude Code Hooks Part 3: Skill Activation, Vector Search, and Honest Benchmark Results

An extensive practical writeup overhauling a Claude Code hook setup: AI-powered UserPromptSubmit hook for skill activation, a guard hook that enforces skill usage, vector search for auto-injecting dev docs, and a setup wizard that verifies its own work. Includes honest benchmark results — 93% precision on authored prompts, 27% on real session history — with a detailed analysis of why intent matching is hard.

hooksskill-activationbenchmarkvector-searchUserPromptSubmit
by JokeGold5455 Jul 16, 2026 8/10
hook GitHub

claude-discord-router: Route Claude Code Sessions to Per-Project Discord Channels

A hook-based integration that routes multiple Claude Code sessions to separate Discord channels, automatically creating categories and channels named after the project directory. Mirrors the conversation bidirectionally so you can respond from Discord and have input fed back to the agent. Useful for monitoring parallel sessions across projects from a phone or secondary screen.

hookdiscordmonitoringbidirectionalmulti-sessionintegration
by Andyyyy64 Jul 16, 2026 8/10
hook Reddit

Update VSCode Tab Titles Live With Claude Code State via Hooks

A Claude Code hook setup that keeps VSCode tab titles updated with the agent's current state (investigating/fixing/verifying/blocked/done). Uses CLAUDE_CODE_DISABLE_TERMINAL_TITLE, a closed list of states in a config file, and a Stop hook that re-asserts the title after every turn.

hooksvscodetab-titlesproductivitystate
by FortuneWeird1121 Jul 16, 2026 7/10
hook GitHub

nunchi: Compile CLAUDE.md Rules Into Trigger-Bound Claude Code Hooks

Takes CLAUDE.md rules and compiles them into hooks that fire at the exact moment each rule is relevant. Instead of injecting all rules into every session, each rule activates only on the trigger that makes it meaningful.

hooksclaude-coderulesCLAUDE.mdautomation
by seob717 Jul 16, 2026 8/10
hook GitHub

Archie: Architecture Rules AI Coding Agents Cannot Break

Generates AGENTS.md, per-folder CLAUDE.md files, and Claude Code hooks from your codebase to enforce architecture rules. Agents cannot deviate from the rules because the rules are wired into their hooks and context files at the folder level.

architecturehooksAGENTS.mdCLAUDE.mdrulesclaude-code
by BitRaptors Jul 16, 2026 8/10
hook Reddit

Using Claude Code Hooks as a Pre-Agent File Security Gate

Explores using Claude Code hooks to intercept files containing secrets before they reach the agent context. A hook catches a fake API key in a submitted file and blocks the handoff, acting as an additional guard layer alongside permissions and ignore rules.

hookssecuritysecretspre-processing
by Sad_Cover9067 Jul 16, 2026 6/10
hook GitHub

orgai-platform: Cross-Tool AI Compliance Enforcement with Git Hooks

Enforces a single policy across Claude Code, Cursor, Copilot, and any MCP agent using git-hook and CI gates, with an append-only audit trail. Self-hosted compliance for teams that need consistent AI governance across their entire toolchain.

compliancegovernancegit-hookciaudit
by MrKuros Jul 16, 2026 7/10
hook Reddit

sheepdog: Hooks That Force Claude Code to Read Skills Before Editing

sheepdog is a PreToolUse hook that blocks Edit/Write on governed paths unless the matching skill was invoked in the preceding minutes. Configured via a project-level config.json mapping paths to skills — if Claude tries to touch a governed file without reading the skill first, it gets an error. Plain bash + jq, no build step required.

hooksskillspre-tool-useenforcementbashjq
by EstablishmentFirm203 Jul 16, 2026 9/10
hook GitHub

casper: Hooks That Make Claude Code Prove Its Claims

Casper is a git hook system for Claude Code that attaches evidence requirements to the agent's claims of completion. When the agent says "done," Casper requires a claim-evidence pair before proceeding — logged in a verdict ledger. A lightweight accountability layer for unattended AI coding sessions.

hooksgitverificationclaimsaccountabilityledger
by ronniepinnell Jul 16, 2026 8/10
hook Reddit

Data-Driven Analysis: Token-Saving Hooks Touch Less Than 0.2% of Full Task Tokens

An empirical study across 140 Codex CLI runs (901.6M tokens) found that return payloads eligible for token-saving hooks represent only 0.16% of complete-task tokens, yielding at most ~1% modeled cost savings even with perfect 90% compression. A matched comparison showed no clear plugin effect, with within-arm cost variance of 30-52%. The author recommends measuring trajectory-level cost, cache behavior, and task quality before installing hooks.

hooktoken-optimizationbenchmarkscost-analysisresearch
by SGM_Finance Jul 16, 2026 8/10
hook GitHub

jig: Claude Code Hooks That Scan Package Installs Before They Run

A Claude Code toolkit focused on security: its guard hooks intercept agent-driven package install commands and scan them before execution. Prevents Claude Code from silently installing malicious or unintended packages during autonomous sessions. A practical security layer for running Claude Code with broader permissions.

securityhookspackage-managementsupply-chainguard
by tanrendev Jul 15, 2026 7/10
hook GitHub

notify-hub: Self-Hosted Notification Gateway with Claude Code Hook

A self-hosted multi-channel notification gateway (Docker + Redis) that fans one message out to ntfy, Telegram, email, Slack, Discord, and WhatsApp via a token-auth API. Ships a Claude Code hook that notifies your phone when Claude finishes a task. The hook integration makes it easy to stay aware of long-running sessions without watching the terminal.

notificationhookself-hosteddockermobile-alert
by richardfcampos Jul 15, 2026 7/10
hook GitHub

Heal-Suite: Self-Maintaining Repo Immune System for Claude Code

14 auditing healers that detect drift, fix mechanical issues, and prevent recurrence in Claude Code repositories. Acts as a running immune system that keeps the repo healthy without manual intervention.

hooksauditingcode-qualityautomationrepo-maintenance
by durchnull Jul 15, 2026 7/10
hook Reddit

Deterministic Test Quality Checker for AI-Written Code

Validates AI-written tests by gutting each changed function and rerunning only its covering tests — hollow tests that still pass are flagged with exact file/line locations, forcing the agent to fix them before claiming done. Supports JS/TS, Python, and Kotlin. Memoizes repeat checks for speed.

testingquality-gatestddautomationhooks
by justusualcmdr Jul 15, 2026 9/10
hook GitHub

Vibeguard: Guards and Rules to Prevent Claude Code Hallucinations

Native rules, hooks, and guards that prevent Claude Code and Codex from hallucinating code, duplicating files, or shipping unverified changes. A set of guardrails for adding discipline to agentic coding sessions.

guardrailshookshallucination-preventioncode-qualitysafety
by majiayu000 Jul 15, 2026 8/10
hook GitHub

Claude Plugins: Hooks, Skills, and Git Workflow Automation

A collection of reusable Claude Code plugins, hooks, skills, and compatibility distributions focused on Git workflows, safe automation, and developer productivity. Pre-packaged for common developer scenarios. A practical starting point for teams that want to extend Claude Code without building from scratch.

hookspluginsskillsgitautomation
by ZaunEkko Jul 15, 2026 7/10
hook Reddit

claude-rewarm-guard: Hook That Blocks Accidental Cache Re-Writes on Long Sessions

A Claude Code hooks setup that warns when you are about to trigger a cache re-write after the 1-hour cache expiration, blocking the message until you resend it with a WARMOK keyword. Addresses accidental usage spikes from returning to long-running sessions. Install via npx claude-rewarm-guard install.

hookscachetoken-usagecost-control
by themightychris Jul 15, 2026 8/10
hook GitHub

Agentic Tech Debt: Record Agent Shortcuts in Real Time

Automatically saves technical shortcuts taken by coding agents to your repo as they happen. Creates a living debt log you can review and address on your schedule — no more invisible debt accumulating silently during agentic sessions.

tech-debthookstrackingautomationcode-quality
by bcanfield Jul 14, 2026 7/10
hook Reddit

Teaching Claude to Detect Off-Thread Messages Before Acting

Describes a hook/workflow where Claude checks "was that message meant for this thread?" when running many parallel sessions. Catches misdirected messages (e.g., a voice transcription intended for another project) before the agent runs off with the wrong intent.

hooksmulti-agentsessionsafety
by reddit Jul 14, 2026 6/10
hook GitHub

agent-guardrails-kit: PreToolUse Hooks That Block Destructive Agent Commands

A collection of Claude Code PreToolUse hooks that block destructive shell commands, secrets exposure, and PII in tool calls, and protect source-of-truth files from accidental modification. Drop-in safety net for any Claude Code project.

hooksecuritypretoolusesafetysecretspii
by xaversebastian Jul 13, 2026 8/10
hook GitHub

Kermit: Claude-Written Commit Messages

A simple hook that lets Claude write your git commit messages, saving time on routine commits. Minimal setup with direct integration into the commit workflow.

gitcommit-messageshookautomation
by ndisisnd Jul 13, 2026 5/10
hook GitHub

Doover: Undo for AI Agent Shell Commands

Snapshots files before Claude Code runs destructive bash commands (rm -rf, git reset, rsync), making agent mistakes reversible even for files git never tracked. An essential safety net for autonomous agent sessions.

undosafetysnapshotsdestructive-commandshook
by CaydenChik Jul 13, 2026 9/10
hook Reddit

Crest: Claude Code Approval Prompts on the MacBook Notch

A Mac notch app that intercepts Claude Code's PreToolUse hooks and displays approval prompts on the MacBook notch. Tap Allow/Deny without switching to the terminal — with heartbeat failsafe so a crashed notch never stalls a run.

hookmacosapprovalnotchpretooluse
by zack40xx Jul 13, 2026 7/10
hook GitHub

Dotnet Agent Harness: Architecture Rules as Build Errors

dotnet new templates that enforce AI agent architectural rules by turning violations into build errors. Uses Roslyn analyzers, NetArchTest fixtures, and git/Claude hooks, all wired at error severity.

dotnetarchitectureroslynbuild-errorshookconstraints
by ryan75195 Jul 13, 2026 7/10
hook GitHub

Smartcompact: Human-in-the-Loop Context Compaction

Human-in-the-loop context compaction for Claude Code — you pick which conversation turns survive, and a SessionStart hook re-injects them after every compact or resume. Gives precise control over what context Claude remembers.

context-compactionmemoryhuman-in-the-loophooksessions
by codeprakhar25 Jul 13, 2026 8/10
hook GitHub

SecretGate: Local Secrets Firewall for Coding Agents

A local secrets firewall that redacts credentials in prompts, file reads, and tool output before they reach the LLM (Claude Code, Codex, OpenCode). No proxy, no npm, deterministic hooks.

securitysecretscredentialsredactionhookfirewall
by maxgfr Jul 13, 2026 9/10
hook GitHub

Geobuke-code: Plan→Implement→Verify Gate with PreToolUse Hooks

A structured workflow enforcer for Claude Code that blocks implementation if a plan is missing via PreToolUse hooks. After each response it evaluates scope impact and blast radius, then runs a gbc verify step to compare implementation against declared evidence. A disciplined approach to preventing unplanned AI-driven code changes.

hookpreToolUseworkflowplanningverification
by cubha Jul 13, 2026 7/10
hook GitHub

TheColliery: Phoenix-13 Hooks + Quantum-11 Doctrine for AI Coding Agents

A quality-tooling suite for AI coding agents built around the Phoenix-13 hook set and Quantum-11 shared doctrine. Provides a one-step DLC installer to deploy the full suite and includes benchmarks comparing agent behavior with and without the tooling. Acts as the landing page for the broader TheColliery ecosystem of AI coding guardrails.

hooksdoctrinequalityinstallerbenchmarks
by TheColliery Jul 13, 2026 6/10
hook GitHub

aethelhook: Phone Approval Gateway for Dangerous Agent Tool Calls

An AI agent permission gateway that intercepts dangerous tool calls from Claude Code, Codex, or Antigravity and routes them to your phone for approval before execution. Adds a human-in-the-loop safety layer for destructive operations.

hooksafetyapprovalphonepermissionhuman-in-loop
by aethelst8 Jul 12, 2026 7/10
hook Reddit

unslop-ci: GitHub Action That Gates PRs for AI Vibe-Coding Tells

A CI gate that scans only lines added by a diff and flags vibe-coded artifacts: leftover chat text, placeholder stubs, swallowed errors, em dashes, AI prose patterns, and unstyled shadcn defaults. Routed by file type (code/text/UI). Drop into any repo without cleanup required.

cigithub-actioncode-qualityvibe-codinghooklinting
by Prize-Supermarket-33 Jul 12, 2026 8/10
hook Reddit

Sidecrab: Desktop Pet That Reacts to Claude Code Sessions via Hooks

A pixel crab that sits on your desktop and mirrors your Claude Code session state in real-time — typing animation during tool use, thought bubble while thinking, and "!?" claws on permission prompts. It hooks into PreToolUse/PostToolUse/Notification/Stop events by writing a state file the app watches. Install via Homebrew on macOS.

hooksmacostaurirustdesktopvisualization
by zvoque_ Jul 11, 2026 8/10
hook Reddit

Claude Fable vs Sol + Terrra +Luna

BUG: Fable usage is horrific. FIX IT. Tell GPT SOL to build a PRD and down grade its model to LUNA to generate the scaffolding and Terra to revise based on the PRD and have SOL Correct any advanced...

hook
by SoCalKonig Jul 10, 2026 7/10
hook Reddit

Claude Code Has 23 Hooks vs Codex CLI's 3 — Comparison

A quick comparison showing Claude Code's hook ecosystem (23 hooks) vs Codex CLI's limited 3-hook support. Illustrates the breadth of lifecycle automation available in Claude Code for custom tooling and integrations.

hookscomparisonCodexlifecycle
by shanraisshan Jul 8, 2026 5/10
hook Reddit

Use Hooks and Skills for Repeatable Processes Instead of Prompting

Practical explanation of using Claude Code hooks (lifecycle event listeners) and SKILL.md together to encode standards and workflows. Before: every session starts from scratch. After: hooks inject context automatically, skills define reusable patterns.

hooksskillsworkflowstandards
by Head-Engineering-893 Jul 8, 2026 6/10
hook Reddit

Architecture Review Hook Gate: Force Design Review Before Any Edit

A hook-based gate that forces an architecture review before any file edit proceeds. A UserPromptSubmit hook delegates to an architect agent; a PreToolUse hook blocks edits unless a valid session marker exists. Documents architectural decisions automatically.

hooksarchitecturereview-gatePreToolUse
by tompahoward Jul 8, 2026 7/10
hook GitHub

Event-Driven Policy and Governance for Claude Code via Hooks

A framework encoding how your team does things as prescriptive rules triggered by context, not requested by intent. Ways (workflows) fire automatically based on what Claude is doing — ensuring standards are enforced without relying on Claude remembering to follow them.

governancehookspolicyworkflow
by aaronsb Jul 8, 2026 7/10
hook Reddit

macOS Notification Hook for Claude Code Task Completion

A Claude Code Stop hook that triggers a native macOS notification with a sound (Glass tone) when Claude finishes a task. Added via the hooks system in user settings. Simple one-liner using osascript so you can step away and get notified when Claude is ready for input.

hookmacosnotificationstop-hookosascript
by goetz_lmaa Mar 19, 2026 7/10
hook GitHub

shelldone: Terminal Notifications with AI CLI Hooks for Claude Code and Other Agents

A pure-bash, zero-dependency tool that sends desktop alerts, sounds, Slack, Discord, Telegram, Email, and WhatsApp notifications when long-running terminal commands complete. Includes AI CLI hooks specifically for Claude Code, Codex, Gemini CLI, Copilot, and Cursor. No dependencies to install.

hooknotificationsbashproductivity
by nareshnavinash Mar 19, 2026 7/10
hook GitHub

Claude Code Tips: Ready-to-Use Plugins, Hooks, and Commands Collection

A GitHub repo of ready-to-use plugins, hooks, and commands for Claude Code, focused on data mining, automation, and integration tools. Aims to provide copy-paste-ready session enhancements without needing to write them from scratch.

pluginshookscommandscollection
by habibbedawi Mar 19, 2026 6/10
hook Reddit

Claude Code Hooks: All 23 Hooks Explained and Implemented

A project that implements all 23 Claude Code hooks with explanations and a companion video covering each hook's use case. Hooks are one of the key features differentiating Claude Code from other CLI agents like Codex. The repo serves as both a reference implementation and a learning resource.

hooksreferencetutorialautomation
by shanraisshan Mar 19, 2026 8/10
hook GitHub

Production-Grade Claude Code Config: 16 Deterministic Hooks, 9 Agents, 311 Tests

A battle-hardened production Claude Code configuration featuring an Evidence Policy, 16 deterministic hooks (CircuitBreaker, InputGuard, PII redaction), 9 specialized agents, Confidence Scoring, 311 tests, and 71% coverage with mypy strict mode. One of the most comprehensive open-source Claude Code configurations available.

hooksproductiontestingagentssecurity
by sergeeey Mar 19, 2026 9/10
hook GitHub

Symbi Claude Code: Zero-Trust AI Governance with Policy Enforcement and Audit Trails

Integrates Symbiont's zero-trust AI governance framework into Claude Code. Enforces security policies, verifies tool calls, and tracks audits within development workflows. Useful for compliance-conscious teams that need a verifiable audit trail of AI actions.

securitygovernanceauditzero-trust
by yabu7788 Mar 19, 2026 7/10
hook Reddit

Are Companies with coding agents playing a different game

I swear this whole coding-agent wave feels like a manic marketing funnel designed to do one thing: get us dependent . Look, I use Claude Code / Copilot / whatever — they speed up boring stuff, no d...

hookworkflow
by DryZookeepergame8644 Mar 19, 2026 9/10
hook Reddit

Plugin That Steers Claude Code Based on Previous Sessions

A plugin that reads previous Claude Code session markdown files and automatically steers current sessions based on established patterns. Uses semantic extraction so Claude stops ignoring your markdown files.

hooksmemorysessionsplugincontext
by flip-phone427 Mar 19, 2026 7/10
hook GitHub

oh-my-harness: Generate Claude Code Guardrails from Natural Language

Generate enforced guardrails — CLAUDE.md rules, hooks, and settings — from a single natural language description. Tame AI coding agents by describing your constraints in plain English instead of hand-crafting config files.

hooksguardrailsclaude.mdsettingsenforcement
by kyu1204 Mar 19, 2026 8/10
hook Reddit

Building a Global Vibe-Coding Leaderboard with Claude Code Hooks

A developer used Claude Code hooks to build a real-time global leaderboard tracking coding activity across agents. Demonstrates practical use of Claude Code hooks for cross-session event tracking and competitive stats.

hookleaderboardtrackingstatsclaude-code
by PedroMassango Mar 17, 2026 7/10
hook Reddit

V1R4: 3D Avatar That Speaks Claude Code Responses Aloud via Hooks

V1R4 is a 3D avatar overlay that plugs into Claude Code via hooks and reads responses out loud using local TTS. It extracts a hidden tag from Claude output to trigger speech with different personalities selectable.

hookttsavataruiaccessibility
by Klaa_w2as Mar 17, 2026 7/10
hook Reddit

Hook to Enforce Test Assertion Quality: Stop Claude from Weakening Tests

A Claude Code hook that prevents the agent from weakening test assertions when fixing failing tests. Detects patterns like removing assertions or converting strict checks to weak ones, and blocks the commit with an explanation.

hooktestingassertionsqualityenforcement
by Healthy-Oil-7291 Mar 17, 2026 7/10
hook Reddit

Smart Bash Hook: Prevent Compound Command Permission Bypasses in Claude Code

A PreToolUse hook that closes a real security gap: compound bash commands (using &&, ||, ;, |, subshells) can bypass allow/deny patterns because Claude Code matches the full command string. This Python script decomposes each compound command into sub-commands and checks each one individually — deny wins, and auto-approve only fires when every sub-command passes. Zero dependencies, reads your existing settings.json permissions.

hooksecuritybashpermissionsPreToolUsesafety
by Hefty_Professor_4170 Mar 16, 2026 9/10
hook GitHub

VibeFlow: Enforce Docs-First Discipline in Claude Code with Checkpoint Gates

VibeFlow provides Claude Code skills and hooks that enforce a documentation-before-code discipline in AI-assisted development. A full workflow with checkpoint gates prevents jumping straight to implementation, and branch-locked enforcement keeps agents in scope. Ideal for teams wanting to maintain structured development practices even when using AI coding tools.

hookskillworkflowdocumentationdiscipline
by hardness1020 Mar 15, 2026 8/10
hook Reddit

Built my personal intelligence center

Extracts data from 26 sources. Some need to hook up with API. Optional LLM layer generates trade ideas based on the narrative plus communicates via Telegram/Discord. Open to suggestions, feature im...

hookapigit
by ElkMysterious2181 Mar 15, 2026 5/10
hook Reddit

Opus4.6(1M) yay or nah.

Been using it all day yesterday, did I expect opus to handle 1m context, no. Did I expect it to handle more context, yes. I pushed this yesterday, it was the first time in a long time I saw opus st...

hook
by Input-X Mar 15, 2026 6/10
hook Reddit

Claude On The Go

This future will either amazing or horrible. Finally got around to hooking up my phone to my desktop. tmux made it a breeze. I assume this will be downvoted to oblivion, for obvious reasons. I’m ok...

hook
by ryan_the_dev Mar 15, 2026 6/10
hook Reddit

How I optimize my limits

So with the release of the 1 million context model with no extra usage I kinda changed my workflow drastically. I used to use parallel sub agents to do exploration and have the context fed back to ...

hookworkflowreview
by Cool-Instruction-435 Mar 15, 2026 6/10
hook Reddit

Worth paying for?

I've been using claude AI for maybe a week and a half now. And I'm hooked. I won't lie, I use it for RP and bouncing ideas around from time to time. It's great! However the daily limit kinda sucks ...

hook
by Money-Pineapple8152 Mar 15, 2026 6/10
hook Reddit

Claude Roasts Fishermen

Claude AI on guys and their for fishing section of their portfolios: LMAOOOO 💀😂 The absolute AUDACITY of the pride!! "Look what I caught!!" Sir you drove a boat to where the fish LIVE. You put food...

hook
by homelessSanFernando Mar 15, 2026 6/10
hook Reddit

How can I test these 2 new hooks?

i have all 22 hooks configured in this repo , but i cant find any use case to test these 2 new hooks. submitted by /u/shanraisshan [link] [comments]

hookconfig
by shanraisshan Mar 15, 2026 6/10
hook GitHub

session-recorder-skill: Claude Code Plugin That Records Full AI Session Lifecycle

A Claude Code plugin that silently records the complete session lifecycle, automatically fetches proven solutions from the community for reuse, and compiles structured reports — so every collaboration builds on past sessions.

hooksession-recordinglifecyclesolutionscommunityreporting
by AI-flower Mar 15, 2026 6/10
hook GitHub

ContextWeave: Hook Kit for Persisting Agent Traces and Context into Beads

ContextWeave is a hook kit for Claude Code and Gemini CLI that persists agent traces and working context into Beads — a structured format enabling deterministic rehydration of context across sessions.

hookcontextpersistencetracesrehydrationgemini
by kangraemin Mar 15, 2026 6/10
hook GitHub

claude-code-prompt-improver: Enhance Vague Prompts Using UserPromptSubmit Hook

A Claude Code hook that intercepts submitted prompts via the UserPromptSubmit event and asks targeted clarifying questions before Claude executes — reducing wasted iterations from underspecified prompts. Works entirely within Claude Code with no external dependencies.

hookpromptclarificationuser-prompt-submitquality
by Blugigi Mar 15, 2026 7/10
hook GitHub

privacy-mask: Auto-Redacts Sensitive Data in Screenshots Before Sending to AI Agents

A hook that automatically redacts sensitive information (API keys, passwords, PII) from screenshots before they are sent to AI agents. An essential safety layer for teams using Claude Code in environments with confidential data.

hookprivacysecurityscreenshotsredactionsensitive-datasafety
by fullstackcrew-alpha Mar 15, 2026 8/10
hook X

tokwave: Live Token/s Waveform Visualizer for Claude Code via Hooks

tokwave is a terminal-based tool that captures every tool call via Claude Code hooks and renders it as a live audio waveform showing your real-time token generation speed. Combines a hook, terminal UI, and MCP server — installable with npm install -g tokwave.

hooktokensvisualizationterminalwaveform
by @Gonzih Mar 15, 2026 7/10
hook GitHub

parry-guard: Prompt Injection Scanner for Claude Code in Rust

parry-guard is a security tool for Claude Code that scans for prompt injection attacks using DeBERTa and Llama transformer models, running locally via Candle or ONNX inference in Rust. It acts as a defensive layer to detect and block adversarial instructions embedded in untrusted content before they reach the agent, with no network calls required.

securityprompt-injectionrustonnxtransformerdefensehook
by vaporif Mar 13, 2026 8/10
hook Reddit

Clawd Tank: Physical Pixel-Art Crab that Reacts to Claude Code Hooks

Clawd Tank is a hardware notification device using a $12 ESP32-C6 board with a tiny LCD showing an animated crab that reacts to Claude Code lifecycle hooks in real time. When Claude Code fires a Notification hook, the crab animates, an LED cycles colors, and a card slides in; it falls asleep after 5 minutes of inactivity. Features BLE connection, multi-session support (up to 8 concurrent), macOS menu bar app, and a TCP simulator for testing without hardware.

hookhardwareesp32notificationblemacos
by marciogranzotto Mar 13, 2026 9/10
hook Reddit

Guide: How I set up safety layers for coding with Claude Code

I posted previously about using defense in depth when coding with LLMs and a lot of people asked how to actually set it all up. So I wrote a step-by-step guide that assumes zero prior experience. I...

hookgitpythonclaude.mdreview
by IkePAnderson Mar 13, 2026 10/10
hook Reddit

Locked out for 6 days! Why would there be a policy like that?

I started using Claude last week and quickly got hooked. So far the free plan has worked just fine, whenever I hit the 5hr limit I just take a break, and catch up with real life. Some 5hr windows I...

hook
by Temporary-Pattern927 Mar 13, 2026 6/10
hook GitHub

claude-hooks: Custom Hook Library for Permission Requests and Status Notifications

A hook library that enhances Claude Code workflows with custom command management. Handles permission request notifications and status updates through hooks, making it easier to build automated approval flows and notification systems around Claude Code operations.

hookspermissionsnotificationsautomationworkflow
by ExoGameYT Mar 13, 2026 7/10
hook GitHub

social-hook: Auto-Generate Social Media Content From Git Development Activity

A Claude hook that automatically generates social media content based on your development activity. When you commit or reach development milestones, the hook creates draft posts for social sharing — useful for indie hackers building in public.

social mediaautomationhookdevelopmentbuild in public
by moikas-code Mar 13, 2026 6/10
hook GitHub

shush: AST-Based Bash Command Safety Guard Plugin for Claude Code

A safety guard plugin that uses AST (Abstract Syntax Tree) analysis to classify bash commands by risk level before Claude executes them. Blocks dangerous commands based on their syntactic structure rather than simple string matching, providing more reliable protection.

safetyASTbashsecuritypluginguard
by nicholasgasior Mar 13, 2026 8/10
hook Reddit

A/B Test of oh-my-claudecode Hooks: Nuanced Results, Less Dramatic Than Claimed

A controlled experiment running the same coding task 6 times — 3 with oh-my-claudecode hooks ON, 3 OFF — using Claude Sonnet 4.6. The result was less dramatic than the hype surrounding external hook tools suggests. Repo includes the test methodology and raw results for others to verify.

hooksoh-my-claudecodeA/B testexperimentevaluation
by Dangerous-Formal5641 Mar 13, 2026 6/10
hook GitHub

bitloops: Builds a Semantic Codebase Model From Developer-AI Interactions on Every Commit

bitloops captures every developer-AI interaction and attaches it to git commits, building a queryable semantic model of how your codebase evolved. You can query the history of AI-assisted decisions to understand why code is the way it is. Built for AI-native development workflows.

gitcommithistorysemanticai-nativehook
by Da-glitcher Mar 12, 2026 7/10
hook GitHub

Mother May I (mmi): Automated Permission Management for Claude Code Bash Calls

mmi automates the permission decision process for Claude Code Bash tool calls, reducing the interruptions caused by constant approval prompts. Provides policy-based control over which shell commands Claude can run without human confirmation.

permissionsbashautomationsecurityhook
by dgerlanc Mar 12, 2026 7/10
hook X

Notification Hook: The Most-Downloaded Claude Code Workflow Addition

The most downloaded item on skillsmp.com is a simple notification hook that alerts you when Claude Code finishes a task. Knowing when the agent is done is described as the single most useful workflow addition, enabling truly unattended sessions.

notificationhookworkflowunattendedproductivity
by @dani_avila7 Mar 12, 2026 7/10
hook X

ElevenLabs TTS Hook: Add Voice Feedback to Claude Code for a Pair-Programming Feel

By adding an ElevenLabs text-to-speech script to Claude Code hooks, this developer made it feel like genuine pair programming — Claude reads its responses aloud after each paragraph. A creative use of the hook system to add audio presence to terminal-based coding sessions.

ttselevenlabsvoicehookpair-programmingaudio
by @0xnihilism Mar 12, 2026 7/10
hook X

Skill-Scoped Stop Hook: Resume Claude Code With Lower Resource Constraints on OOM

Claude Code supports skill-scoped stop hooks that can re-invoke Claude with a skill-specific prompt when conditions are met, such as lowering resource constraints and rerunning a workflow after an OOM error. An underdocumented feature with powerful recovery automation potential.

stop-hookoomskill-scopedhookautomationrecovery
by @jasonge27 Mar 12, 2026 7/10
hook GitHub

sensitive-canary: Claude Code Hooks That Guard Secrets and PII Before Reaching Anthropic API

sensitive-canary is a set of Claude Code hooks that intercept outgoing requests and scan for secrets, API keys, and PII before they are sent to the Anthropic API. Implements a canary-style tripwire: if sensitive data is detected in tool inputs or file content, the request is blocked and the user is alerted.

hooksecurityPIIsecretsprivacyPreToolUse
by coo-quack Mar 12, 2026 8/10
hook GitHub

claude-memory-engine: Hook + Markdown Memory System With Zero Dependencies

A memory system for Claude Code built entirely on hooks and markdown files — no external dependencies, no database. PostToolUse hooks capture decisions and key context; a summary hook on session end updates a persistent memory.md. The entire system is under 200 lines and works across any project.

hookmemorymarkdownzero-dependencysession
by HelloRuru Mar 12, 2026 8/10
hook X

5 Advanced Claude Code Tips Including a Self-Improvement Injection Hook

A thread covering five advanced Claude Code techniques: a UserPromptSubmit hook that injects one optimization hint after 8+ tool calls (reusable skill, memory pattern, or refactor), preemptive context hints, CLAUDE.md layering tricks, and two more patterns for power users. Good high-density reference for experienced Claude Code users.

hookUserPromptSubmitoptimizationtipsCLAUDE.md
by @DellAnnaLuca Mar 12, 2026 8/10
hook X

Pre-Write Security Hook That Scans for Hardcoded Secrets Before Files Hit Disk

A PreToolUse hook for Claude Code that intercepts every file write and scans for hardcoded API keys, passwords, and other secrets before they are written to disk. If a secret is detected, the write is blocked and Claude is prompted to use environment variables instead — preventing accidental credential leaks.

hooksecuritysecretsPreToolUsecredentials
by @apex_ramya Mar 12, 2026 8/10
hook X

Hook-Based Workflow for Claude Code Context Window Management

A hook-based system that gives Claude Code better awareness and control of its own context window. Instead of silently approaching the limit, the hooks surface context usage and trigger structured summarization or handoff steps at configurable thresholds. Reduces context-overflow failures in long-running sessions.

hookcontextcontext-windowmemorysession-management
by @sanjitr11 Mar 12, 2026 8/10
hook Reddit

Audio Feedback Hook: Play Mouse Click Sounds During Long Claude Code Tasks

Claude Code hook configuration that plays soothing mouse click sounds during long-running tasks using voice hooks. Demonstrates Commands → Agents → Skill weather orchestration pattern. Repo includes a collection of Claude Code best practice hooks.

hooksaudiofeedbackvoiceuxlong-running
by shanraisshan Mar 11, 2026 6/10
hook GitHub

claude-hooks: Security and Utility Hooks to Prevent Prompt Injection in Claude Code

Collection of Claude Code hooks focused on security hardening — blocks prompt injection attempts, validates tool calls, and adds utility extensions through custom scripts. Provides a defensive layer for unattended or multi-agent sessions.

hookssecurityprompt-injectionvalidationdefense
by oliverquaye23 Mar 11, 2026 8/10
hook GitHub

klaudiush: Claude Code Hook Dispatcher for Git and Code Quality Validation

A validation dispatcher for Claude Code hooks that enforces git workflow standards, commit message conventions, and code quality rules. Centralizes hook logic into a single dispatcher, making it easy to maintain consistent enforcement across different types of Claude Code events.

hookgitvalidationcode-qualitycommit
by smykla-skalski Mar 11, 2026 7/10
hook X

Build Auto-Memory with a Claude Code Stop Hook (Tip from the Claude Code Creator)

Boris Cherny (creator of Claude Code) shares a no-dependency pattern for automatic memory: create an agent stop hook that reads the conversation and documents key memories to CLAUDE.md or a notes file. No MCP server required — just a hook and a markdown file.

hookmemorystop-hookCLAUDE.mdautomation
by @bcherny Mar 11, 2026 8/10
hook X

Claude Code v2.1.10 Adds Setup Hook for Repository Init and Maintenance Workflows

Claude Code v2.1.10 introduces a Setup hook event triggerable via --init, --init-only, or --maintenance CLI flags. Lets you automate repository setup and maintenance tasks that run on first install or during upkeep. v2.1.11 also fixes excessive MCP connection requests for HTTP/SSE transports.

hooksetupchangeloginitmaintenance
by @oikon48 Mar 11, 2026 6/10
hook GitHub

claude-safe-bypass: Safety Hooks for --dangerously-skip-permissions Mode

A 3-layer safety hook system that intercepts and blocks catastrophic commands even when Claude Code runs with all permissions bypassed. Lets you get the productivity benefits of unrestricted mode without risking irreversible filesystem or system damage. Installable drop-in safety net for power users.

hooksafetypermissionsdangerously-skip-permissionssecurity
by ahmadhasan2k8 Mar 11, 2026 8/10
hook Reddit

AI Coding Policy

Thinking about this for my operation. Thoughts? -------------- # AI Coding Policy In the interest of transparency, here is our philosophy and policy on AI coding agents. ## Philosophy **Iterative D...

hook
by mdizak Mar 11, 2026 6/10
hook GitHub

avakill: Open-Source Safety Firewall for AI Agents

avakill intercepts tool calls before they execute and enforces YAML-based policies to kill dangerous operations in real-time. Works with OpenAI, Anthropic, LangChain, and MCP. Provides a configurable safety layer between AI agents and your system without modifying agent code.

safetyfirewallhookspolicymcpsecurity
by log-bell Mar 11, 2026 8/10
hook Reddit

Vectimus: Pre-Tool-Use Hook System With Cedar Policy Enforcement

Vectimus uses Claude Code's pre-tool-use hooks to intercept Bash, Write, Edit, MCP, and WebFetch calls and evaluate them against 78 Cedar policies (368 rules) in ~3ms. If an action is dangerous, it blocks it and suggests a safer alternative. Runs entirely local.

hookspre-tool-usecedarpolicysafetysecurity
by xavier_j Mar 11, 2026 8/10
hook GitHub

agentcrumbs: Structured Debug Tracing for AI Agents

agentcrumbs adds a debug mode to any AI agent by injecting structured trace breadcrumbs inline. These traces are automatically stripped before git merge, giving full observability into agent decisions during development without polluting production code. From the Trigger.dev team.

debuggingtracingobservabilityhooksagents
by triggerdotdev Mar 11, 2026 7/10
hook Reddit

Viberails: PostToolUse Hook That Enforces Codebase Conventions

Viberails is a CLI that uses Claude Code's PostToolUse hook to catch convention violations in real-time as Claude edits files. It auto-detects your existing conventions (file naming, test coverage, package boundaries), then enforces them without any configuration. MIT-licensed, works with JS/TS repos.

hookspost-tool-useconventionslintingjavascripttypescript
by Aeonizing Mar 11, 2026 8/10
hook GitHub

hallucination-detector: Zero-Dependency Claude Code Plugin to Catch AI Speculation

A Claude Code plugin that intercepts speculation, invented causality, and fake citations before they pollute your context. Zero dependencies, works offline, no API keys. Install in one command. Prevents hallucinated information from compounding errors in agentic sessions.

hallucinationsafetypluginofflinequality
by bitflight-devops Mar 10, 2026 8/10
hook GitHub

claude-bouncer: Safety Guardrails Hook for Claude Code Tool Use

Enforces safety guardrails on Claude Code tool calls by blocking risky or harmful commands before execution. Acts as a hook layer that inspects and filters tool use to protect your workflow from unintended destructive actions.

hooksafetyguardrailstool-useprotection
by aniketadamane2004 Mar 10, 2026 7/10
hook X

Use a Hook to reconfirm spec context after Claude Code context compaction

A developer shares that spec-workflow-mcp with SDD (Specification-Driven Development) templates yields more predictable Claude Code behavior than Plan mode alone. They suggest adding a Hook triggered after context compaction to reconfirm the active spec, maintaining coherent behavior in long sessions. A practical tip for teams using structured development workflows.

hookworkflowspeccompactionclaude-codesdd
by @mj3880 Mar 10, 2026 6/10
hook Reddit

BRAIN.md Pattern for Persistent Context Across Sessions

A pattern for Claude Desktop using a BRAIN.md file read at session start and updated at session end via hooks. The post also clarifies a common misconception: the User Preferences field is not a startup script — it is injected on first message. Proposes a true SessionStart hook as a Claude Desktop feature.

hookpersistent-contextbrain.mdclaude-desktopsession
by Euphoric-Tank-6791 Mar 10, 2026 5/10
hook GitHub

claude-toolkit: Statusline, Tmux Bar, Keychain & Notifications for Claude Code

A collection of tools, hooks, and shell utilities that enhance the Claude Code terminal experience. Includes a statusline integration, a tmux usage bar, a keychain CLI for credential management, and system notification hooks. Improves visibility into Claude Code activity during development.

hooktmuxstatuslinenotificationskeychaincli
by RomanDenysov Mar 10, 2026 7/10
hook Reddit

worktree-plus: Fix claude -w to Branch From HEAD Instead of origin/main

A Claude Code plugin that fixes the default worktree behavior so that claude -w branches from HEAD instead of origin/main. Adds real branch resolution, worktree.guessRemote support, custom branch prefixes, and a .worktreelink file for symlinking heavy directories instead of copying them.

hookworktreesgitpluginfix
by AdPast8543 Mar 10, 2026 8/10
hook Reddit

Voxlert — In-Character Voice Notifications for Claude Code Sessions via Hooks

A Claude Code hook system that converts session events into spoken in-character notifications (Adjutant, SHODAN, GLaDOS, HEV Suit). Each session gets a distinct voice so you know which one is talking without looking. Uses OpenRouter LLM + local TTS.

hooksnotificationsvoicettscreativesession-events
by /u/settinghead0 Mar 10, 2026 7/10
hook GitHub

SCARGate — Principle-Based AI Action Blocking Guard

A gatekeeper layer that intercepts and blocks AI agent actions based on configurable principles rather than fixed rules. Provides a principled safety net between agent intentions and real-world effects without requiring per-action allowlists.

safetygatingaction-blockingprinciplesguardrailshooks
Mar 10, 2026 8/10
hook GitHub

ai-engineering: Governed AI workspace with quality gates via git hooks

Turns any repo into a governed AI workspace with quality gates, security scanning, and risk management enforced locally via git hooks. Works with Claude Code, GitHub Copilot, Cursor, Gemini, and Codex — a universal governance layer for AI-assisted development.

git-hooksgovernancesecurityquality-gatesmulti-agent
by arcasilesgroup Mar 9, 2026 7/10
hook GitHub

patrol: Two-tier enforcement and read/edit tracking for Claude Code

Development discipline tool with a status line for Claude Code featuring two-tier enforcement, real-time read/edit tracking, and an investigation gate. Designed to keep Claude Code disciplined and transparent about what files it's touching.

hooksenforcementtrackingclaude-codediscipline
by cukas Mar 9, 2026 7/10
hook Reddit

Four Claude Code hooks that enforce voice and tone on AI-written copy

A hook system using UserPromptSubmit and PreToolUse hooks to enforce brand voice consistency across AI-written copy. A reviewer agent is injected before any copy file edit, and hooks block writes to .tsx/.md files unless voice review is complete. Prevents copy drift in AI-generated content.

hooksvoicetonecopyUserPromptSubmitPreToolUseagent
by tompahoward Mar 9, 2026 8/10
hook GitHub

swiz: Cross-agent hook manager for Claude Code, Cursor, and Gemini

Installs and orchestrates lifecycle hooks across Claude Code, Cursor, and Gemini from a single manifest file. Manage hooks once and deploy them to all your AI coding assistants simultaneously — a unified hook management layer for multi-agent workflows.

hookscross-agentcursorgeminiclaude-codemanifest
by mherod Mar 9, 2026 8/10
hook Reddit

PreToolUse hook that forces Claude to use MCP tools instead of built-in Read/Grep/Glob

A PreToolUse hook pattern that intercepts Claude's default tool choices and redirects it toward MCP tools when better alternatives are available. Solves the common problem where CLAUDE.md instructions drift after a few turns and Claude reverts to built-in tools. The hook enforces the preference at the infrastructure level rather than relying on prompt compliance.

hookpre-tool-usemcpautomation
by Objective_Law2034 Mar 9, 2026 9/10
hook GitHub

bash-gates: AST-based permission gates for Claude Code shell commands

Uses tree-sitter AST parsing to gate Claude Code's bash command execution at a syntax level rather than simple string matching. Provides fine-grained, semantically-aware control over what shell operations Claude can run. More robust than keyword blocklists — Claude can't bypass it by rephrasing the command.

hooksecuritybashpermissionstree-sitter
by camjac251 Mar 9, 2026 7/10
hook Reddit

Rupert: Claude + Gemini + OpenCode Agent with Notification Hooks

A personal agent setup called Rupert that combines Claude, Gemini, and OpenCode with hooks that notify you of what each agent is doing in real time. Includes a memory-agent component for reducing token usage across sessions.

hookmemorymulti-modelnotificationstoken-reduction
by winwinwinguyen Mar 9, 2026 6/10
hook GitHub

Sentinel-AI: Real-Time Safety Guardrails with Claude Code Hooks

A real-time safety scanning layer for LLM applications with 10 scanners covering prompt injection, PII detection, harmful content, code vulnerabilities, and obfuscation. Offers sub-millisecond latency, Python and TypeScript SDKs, an MCP proxy, and native Claude Code hooks integration for pre/post-tool safety checks.

safetyhooksMCPguardrailsprompt-injectionPIIscanner
by MaxwellCalkin Mar 9, 2026 8/10