Skip to content
BENIBIX Learn

ConfigChange Hook

AI⌨️ Claude CodeConfiguration

Also known as ConfigChange

The event when a settings or skill file changes.

Think of it like

It is like an alarm on a cupboard. It tells you when someone opens it.

Example

Jack's team wants a log of every settings change. Their ConfigChange hook writes what changed to an audit file.

Why it matters

Settings decide what Claude may do. A quiet change there is worth knowing about.

Definition

ConfigChange is the hook event that fires when a settings file or a skill file changes in a session. The matcher names where the change came from, such as user_settings, project_settings or skills. A hook can block the change with exit code 2, but not a change to policy settings. It is used to log changes or stop risky ones.

Example code

json
{
  "hooks": {
    "ConfigChange": [
      { "matcher": "project_settings|local_settings", "hooks": [{ "type": "command", "command": "./audit-config.sh" }] }
    ]
  }
}
Audit changes to the project's settings.

Common mistake

Expecting it to catch a rule you saved from a prompt in this session. That change skips the hook here.

Key takeaways

  1. 1
    When settings change. Or skills.
  2. 2
    Can block. Not policy.
  3. 3
    Some changes skip it. Saved answers.