← Back to context

Comment by RAMJAC

3 days ago

If you are using claude, in your project's `.claude/settings.json` you can add something like:

```

  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "mix format ${file} 2>/dev/null || true"
          }
        ]
      }
    ],
    "TaskCompleted": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "prompt",
            "prompt": "reminder: run mix test if implementation is complete"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "prompt",
            "prompt": "Check if all tasks are complete. If not, respond with {\"ok\": false, \"reason\": \"what remains to be done\"}."
          }
        ]
      }
    ]
  },

```

Just update it to iterate over your file. It should be a little easier to manage than git hooks and can hammer in testing.