Skip to main content
Back to Features
developer tools
Completed
v1.1.0
medium priority

Hooks System

Shell hooks that execute in response to Claude Code events like tool calls, file changes, and task completion.

Released: September 20, 2025

Tagline

Automate everything.

Value Proposition

Hooks make development faster and more consistent

Who Uses This

Developers
DevOps
Build teams

Overview

Hooks are shell scripts that execute automatically in response to Claude Code events. Use them to automate formatting, testing, type generation, and more.

Hook Types

Tool Call Hooks

Execute when specific Claude Code tools are called.

File Write Hooks

Execute when files are written.

Task Hooks

Execute on task events.

Available Hooks

  • bash - After bash command
  • read - After reading file
  • write - After writing file
  • edit - After editing file
  • glob - After globbing files
  • grep - After grepping
  • todo - Load current cycle context
  • done - Mark cycle complete
  • submit - When user submits prompt
  • error - When operation fails

Configuration

Hooks are discovered in .claude/hooks/ directory. Name files after the event.

Make executable with chmod +x .claude/hooks/*

Ontology Alignment

How this feature maps to the 6-dimension ontology

things

Hooks are automation things

events

Hooks execute on events like tool_called, file_written

Capabilities

Tool Call Hooks

Execute code when specific tools are called

completed

File Change Hooks

Trigger on file write/edit events

completed

Task Hooks

Execute on task completion, error, etc.

completed

Environment Variables

Access context via env vars

completed

Hook Chaining

Hooks can trigger other hooks

in_development

Use Cases

Auto-format on Save
Developer

Format code when files are edited

Run Tests on Commit
Developer

Execute tests before committing code

Generate Types
Developer

Auto-generate TypeScript types from schema

Technical Specifications

Complexity

moderate

Estimated Hours

24h

Technologies
Bash
Shell
Node.js

Quality Metrics

Test Coverage

88%

Performance

99/100

The Book

Lessons from Ants at Work

© 2026 Ants at Work.

Built withfor emergent intelligence.