/plugin marketplace add thepushkarp/handoff/plugin install thepushkarp-handoff-plugins-handoff@thepushkarp/handoffDefined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Context is about to be compacted, which may lose important session details. Check if there is significant work in progress (active todos, recent code changes, ongoing tasks, or important decisions made). If so, ask the user: 'Context is about to be compacted. Would you like me to create a handoff first to preserve important context? (yes/no)'. If they say yes, run the /handoff:create workflow. If they say no or if there's nothing significant to preserve, allow compaction to proceed.",
"timeout": 60
}
],
"matcher": "*"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": false
},
"typeStats": {
"prompt": 1
},
"eventStats": {
"PreCompact": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}