Skip to content

Commit b8f709e

Browse files
committed
add claude features
1 parent 5c8bbed commit b8f709e

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

.claude/hooks/block-manglings.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
FILE_PATH=$(jq -r '.tool_input.file_path' < /dev/stdin)
4+
5+
case "$FILE_PATH" in
6+
*/Resources/manglings*)
7+
echo "BLOCKED: test resource file" >&2
8+
exit 2
9+
;;
10+
esac
11+
12+
exit 0

.claude/settings.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@
33
"PostToolUse": [
44
{
55
"matcher": "Edit|Write",
6-
"command": "swift build 2>&1 | tail -20"
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "swift build 2>&1 | tail -20"
10+
}
11+
]
712
}
813
],
914
"PreToolUse": [
1015
{
1116
"matcher": "Edit|Write",
12-
"command": "case \"$CLAUDE_FILE_PATH\" in */Resources/manglings*) echo 'BLOCKED: test resource file'; exit 1;; esac"
17+
"hooks": [
18+
{
19+
"type": "command",
20+
"command": ".claude/hooks/block-manglings.sh"
21+
}
22+
]
1323
}
1424
]
1525
}

0 commit comments

Comments
 (0)