src.nth.io/

summaryrefslogtreecommitdiff
path: root/claude-code-hook-example.json
diff options
context:
space:
mode:
Diffstat (limited to 'claude-code-hook-example.json')
-rw-r--r--claude-code-hook-example.json16
1 files changed, 16 insertions, 0 deletions
diff --git a/claude-code-hook-example.json b/claude-code-hook-example.json
new file mode 100644
index 0000000..3e4c1a0
--- /dev/null
+++ b/claude-code-hook-example.json
@@ -0,0 +1,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"
+ }
+ ]
+ }
+ ]
+ }
+}