-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude-code-settings.example.json
More file actions
31 lines (29 loc) · 1.13 KB
/
Copy pathclaude-code-settings.example.json
File metadata and controls
31 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"// note": "Illustrative Claude Code hooks wiring sugarfree in. Merge the pieces you want into your .claude/settings.json. Adjust the absolute path to the sugarfree binary (or the strip-clipboard.sh wrapper).",
"hooks": {
"// Stop": "After Claude finishes a turn, clean any rich text left on the clipboard so the next paste is plain.",
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "/usr/local/bin/sugarfree --clipboard --all || true"
}
]
}
],
"// UserPromptSubmit": "Strip emphasis markers out of a submitted prompt before Claude sees it. Reads the hook JSON on stdin, rewrites the 'prompt' field through sugarfree, and prints it back.",
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import sys,json,subprocess; d=json.load(sys.stdin); p=d.get('prompt',''); out=subprocess.run(['/usr/local/bin/sugarfree','--all'],input=p,capture_output=True,text=True).stdout; print(out)\""
}
]
}
]
}
}