Back to Hooks

change-tracker

DevelopmentยทPostToolUse

Track file changes in a simple log

Matcher: Edit|MultiEdit

Configuration

Add to your .claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "hooks": [
          {
            "type": "command",
            "command": ".claude/hooks/change-tracker.sh"
          }
        ],
        "matcher": "Edit|MultiEdit"
      }
    ]
  }
}

This hook includes a script file. Download the ZIP bundle for complete installation with script and instructions.

Hook Details


change-tracker


Track file changes in a simple log


Event Configuration


  • **Event Type**: `PostToolUse`
  • **Tool Matcher**: `Edit|MultiEdit`
  • **Category**: development

  • Environment Variables


    None required


    Requirements


    None


    Script


    ```bash

    file_path=$(jq -r '.tool_input.file_path // empty')

    log_file=".claude/changes.log"

    mkdir -p "$(dirname "$log_file")"

    echo "[$(date '+%Y-%m-%d %H:%M:%S')] Modified: $file_path" >> "$log_file"

    ```

    About PostToolUse Hooks

    PostToolUse hooks run after a tool completes execution. They can modify the result or trigger additional actions.