CommencerCommencer gratuitement

Understanding Hooks

This hook is configured in .claude/settings.json for the Music Analytics API project. It uses a PostToolUse trigger with a matcher and runs a shell command when the condition is met.

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "echo 'file modified' >> hook.log"
          }
        ]
      }
    ]
  }
}

Given this hook configuration, what will trigger it?

Cet exercice fait partie du cours

Software Development with Claude Code

Afficher le cours

Exercice interactif pratique

Passez de la théorie à la pratique avec l’un de nos exercices interactifs

Commencer l’exercice