Synthèse
Hooks are just TypeScript files that run at specific lifecycle events: typescript// ~/.claude/hooks/session-start/my-custom-hook.ts export default async function() { // Your automation here // Runs automatically at session start }123456 Examples of custom hooks you might build: Load project-specific context based on current directoryAuto-commit code changes at session endSend Slack notifications when agents completeUpdate project dashboards with session metricsBackup important files before
Hooks are just TypeScript files that run at specific lifecycle events: typescript// ~/. claude/hooks/session-start/my-custom-hook. ts export default async function() { // Your automation here // Runs automatically at session start }123456 Examples of custom hooks you might build: Load project-specific context based on current directoryAuto-commit code changes at session endSend Slack notifications when agents completeUpdate project dashboards with session metricsBackup important files before risky operations Hooks transform Claude Code from reactive to proactive.
Building Your Own Hooks
· 26 juil.
Real Examples
· 26 juil.