src.nth.io/

summaryrefslogtreecommitdiff
path: root/claude-code-hook-example.json
blob: 3e4c1a00b0a93a7e52322bb750dca577911b0bc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "description": "Example Claude Code hook configuration for Emacs context integration",
  "note": "Add the 'hooks' section below to your ~/.claude/settings.json file",
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "CONTEXT_FILE=\"$HOME/.emacs.d/claude-context.txt\"; if [ -f \"$CONTEXT_FILE\" ]; then echo \"\\n---\\n## Emacs Context\\n\"; cat \"$CONTEXT_FILE\"; echo \"\\n---\"; fi"
          }
        ]
      }
    ]
  }
}