hooks
30 articles about hooks in AI news
Stop Relying on CLAUDE.md for Guarantees: Build Deterministic Hooks Instead
Claude Code hooks in settings.json let you run deterministic shell commands on SessionStart, PreToolUse, PostToolUse, and other events—replacing unreliable CLAUDE.md instructions for critical behaviors like blocking dangerous commands or injecting context.
How to Build Safer DevOps Workflows with Claude Code, MCP, Hooks, and Memory
Claude Code hooks, MCP servers, and memory create self-regulating DevOps workflows. Use Bash hooks to block dangerous commands and memory to persist safety rules.
Two Bash Hooks Cut an Anthropic Bill From $312 to $156
A developer halved their Anthropic bill from $312 to $156 by adding two Bash hooks to Claude Code that intercept retry spirals and block dangerous deploys.
Stop Writing Rules in CLAUDE.md—Use PreToolUse Hooks for Guaranteed Enforcement
Replace CLAUDE.md rules with PreToolUse hooks in Claude Code for guaranteed enforcement. Hooks run as shell code, blocking dangerous commands like deploys or migrations outside the model's control.
Build a Self-Improving Memory Layer for Claude Code with Hooks and RAG
Implement automatic hooks to capture Claude Code's work into a ChromaDB vector store and a CLAUDE.md file, creating a persistent, searchable memory for your project.
Stop Writing More Rules: Use Hooks to Enforce Your CLAUDE.md
Critical CLAUDE.md rules fail because Claude prioritizes helpfulness. The solution is to use session hooks to automate enforcement, making rules impossible to skip.
Claude Code Hooks: How to Auto-Format, Lint, and Test on Every Save
Configure hooks in .claude/settings.json to run prettier, eslint, and tests automatically, ensuring clean code without manual intervention.
How to Build a Custom AI Agent with Claude Code's Skills, SubAgents, and Hooks
A developer's deep dive into customizing Claude Code with 7 skills, 5 subagents, and quality-check hooks—showing how to move beyond basic prompting to create a truly autonomous coding assistant.
How to Auto-Approve Safe WebFetches While Blocking Suspicious URLs with Hooks
Use Claude Code's PreToolUse hooks to automatically allow clean documentation URLs while forcing manual review for any URL containing query parameters, eliminating repetitive prompts without sacrificing security.
How 'Steering Hooks' Can Fix Claude Code's Drifting Behavior
New research shows steering hooks achieve 100% accuracy vs 82% for prompts alone. Apply this to your CLAUDE.md to stop unpredictable outputs.
7 Production-Ready Agent Hooks You Can Copy Into Your CLAUDE.md Today
Agent hooks in CLAUDE.md automate context management, testing, and deployment, turning Claude Code from a chat tool into a proactive development partner.
Why Claude Code's 'Tool Calls' Aren't Hooks — And How to Design for Its
Understanding Claude's 8-step tool pipeline—from edge routing to result injection—is critical for structuring error handling, timeouts, and debugging in production applications.
Claude Code's Architecture Explained
Master Claude Code's 6-layer architecture—harness, context window, subagents, MCP, skills, hooks, CLAUDE.md—to optimize token usage, parallelism, and agent reliability. First sentence: Claude Code's 6 layers (harness, context window, subagents, MCP, skills, hooks, CLAUDE.md) determine your setup's success.
Graft: Replace MCP Tool Calls with a Semantic Code Map That Cuts Agent
Install Graft via npm, run `graft init`, and Claude Code gets a persistent semantic map via hooks — cutting exploration tool calls and boosting SWE-bench Verified to 66%.
7 CLAUDE.md Mistakes That Were Silently Taxing My Sessions (And the Exact Fixes)
Fix your CLAUDE.md workflow: move hard rules to PreToolUse hooks, target reads with grep, and delegate exploration to subagents to reclaim context. First sentence: The fix is moving hard rules to PreToolUse hooks and CLAUDE.md for preferences.
Token-Saving Tools Overpromise: Real Benchmark Shows 6–32% Savings, Not 60–90%
Token-saving tools deliver 6–32% savings, not 60–90%. In Claude Code, lazy MCP loading means tools often go unused—enable them with hooks and measure full sessions.
Does Claude Code Get Better With Use? Here's What Actually Improves (Hint
Claude Code's model doesn't learn from corrections, but CLAUDE.md, hooks, and skills compound your setup, making future sessions smarter. Invest in configuration to see real gains.
Claude Agentic Framework Uses 20 Specialized Agents to Enforce a 3-Stage
The Claude Agentic Framework enforces a Spec → Build → Review pipeline with 20 specialized agents and PowerShell hooks, preventing Claude Code from coding too early or finishing incomplete.
Claude Code Digest — Jul 13–Jul 16
Claude Code is no longer being treated like a chat assistant: the winning pattern this week is deterministic hooks, policy gates, and verification layers wrapped around an agent that can now hit 80.8% SWE-Bench.
Build a Self-Sustaining Claude Code Environment: The Complete 14-Part System
Build a self-sustaining Claude Code environment with 14 components: memory, skills, autonomy, guardrails, and monitoring. Connect them into a feedback loop where measurements flow back into memory. Use CLAUDE.md and hooks.
Claude Code Digest — Jul 10–Jul 13
Claude Code is crossing the line from “assistant” to “agent runtime”: the winning teams are the ones adding verification, hooks, and policy gates instead of trusting the model.
3 CLAUDE.md Patterns That Cut Claude Code Configuration Time by 50%
CLAUDE.md with decision matrices, Bash hooks, and agentic workflow blocks reduces configuration time 50% and retry costs 30%.
JetBrains IDE Now Supports Codex Agent and MCP Server Management — Here's
JetBrains adds Codex agent, MCP server management, and approval controls. Claude Code users should compare MCP management UX and consider hooks for CLI workflows.
Muxer: Open-Source Model Multiplexer Slashes Claude Code Costs by Routing
Muxer reduces Claude Code costs by multiplexing models per subtask via agent frontmatter and session hooks. Keep Fable/Opus for planning; route boilerplate to Haiku.
Claude Code Digest — Jun 28–Jul 01
Claude Code’s biggest shift this week: teams are replacing “let the model figure it out” with hard guardrails, and one pair of Bash hooks cut an Anthropic bill from $312 to $156.
5 Harness Internals That Changed How I Use Claude Code Daily
Rebuilding Claude Code's harness reveals that CLAUDE.md layers on a hidden base prompt, hooks can block tool calls, and subagents need abort trees—5 actionable takeaways for daily use.
Claude Code Digest — Jun 07–Jun 10
The biggest shift this week: teams are stripping 60% of prescriptive skill text, then using hooks + MCP + Temporal to make Claude Code more reliable than prompt-only workflows.
Stop Telling Claude to 'Be Careful' — 3 Hook Tools That Fix What Prompts Can't
Throughline, Caveat, and Spotter are three npm tools that use Claude Code hooks to fix context bloat, past-trap memory, and missed tool calls — problems CLAUDE.md instructions can't solve.
Pylon: Self-Host Your Own AI Agent Pipeline That Fixes Sentry Errors via
Pylon is a self-hosted daemon that triggers sandboxed Claude Code agents from webhooks (Sentry, cron, chat) and reports results with human approval — no data leaves your machine.
Claude Code Routines: Automate Code Reviews
Automate Claude Code tasks like scheduled code reviews or deployment hooks using the new Routines feature, which runs on Anthropic's infrastructure.