diff options
Diffstat (limited to 'hooks')
| -rwxr-xr-x | hooks/session-start.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hooks/session-start.sh b/hooks/session-start.sh index 8c029af..0eba96b 100755 --- a/hooks/session-start.sh +++ b/hooks/session-start.sh @@ -32,13 +32,18 @@ escape_for_json() { using_superpowers_escaped=$(escape_for_json "$using_superpowers_content") warning_escaped=$(escape_for_json "$warning_message") +session_context="<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n\n${warning_escaped}\n</EXTREMELY_IMPORTANT>" -# Output context injection as JSON +# Output context injection as JSON. +# Keep both shapes for compatibility: +# - Cursor hooks expect additional_context. +# - Claude hooks expect hookSpecificOutput.additionalContext. cat <<EOF { + "additional_context": "${session_context}", "hookSpecificOutput": { "hookEventName": "SessionStart", - "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n\n${warning_escaped}\n</EXTREMELY_IMPORTANT>" + "additionalContext": "${session_context}" } } EOF |
