Automate repetitive tasks with hooks, scripts and custom commands.

Claude Code hooks, skills, and rules: PreToolUse guards, custom slash commands, path-scoped rules. Code examples and comparison table.

Learn how to use PreToolUse hooks in Claude Code to automate formatting and enforce standards.