fix(hooks): use Python JSON generation for reliable context injection
- Replace bash escape_json + printf with Python json.dump for reliable handling of Unicode and special characters in SKILL.md - Output follows superpowers pattern: hookSpecificOutput.additionalContext - 55KB context, 1230 lines, 8 mandatory skills injected at session start - Tested: JSON valid, content complete
This commit is contained in:
+6
-3
@@ -3,15 +3,18 @@
|
||||
"SessionStart": [{
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
|
||||
"timeout": 10
|
||||
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/detect-project.sh\"",
|
||||
"shell": "bash",
|
||||
"timeout": 10,
|
||||
"async": false
|
||||
}]
|
||||
}],
|
||||
"PreToolUse": [{
|
||||
"matcher": "Write|Edit",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
|
||||
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
|
||||
"shell": "bash",
|
||||
"timeout": 10
|
||||
}]
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user