MyNixOS website logo

Custom hooks for Claude Code. The attribute name becomes the hook filename, and the value is the hook script content. Hooks are stored in .claude/hooks/ directory.

Declarations
Type
attribute set of strings concatenated with "\n"
Default
{ }
Example
{
  post-commit = ''
    #!/usr/bin/env bash
    echo "Committed with message: $1"
  '';
  pre-edit = ''
    #!/usr/bin/env bash
    echo "About to edit file: $1"
  '';
}