mirror of
https://github.com/anthropics/claude-code.git
synced 2026-05-07 15:23:03 +00:00
Add plan-auto-show plugin to display plan after updates
When in plan mode, users couldn't see the plan without typing /plan, but they also couldn't type /plan while being asked follow-up questions. This plugin adds a SessionStart hook that instructs Claude to automatically display the plan content after updating the plan file, showing it before any follow-up questions. Fixes the UX issue where users need to answer questions about a plan they can't see.
This commit is contained in:
15
plugins/plan-auto-show/hooks/session-start.sh
Executable file
15
plugins/plan-auto-show/hooks/session-start.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Auto-show plan content after updates in plan mode
|
||||
# This hook adds instructions to automatically display the plan when updated
|
||||
|
||||
cat << 'EOF'
|
||||
{
|
||||
"hookSpecificOutput": {
|
||||
"hookEventName": "SessionStart",
|
||||
"additionalContext": "## Plan Mode Auto-Display\n\nWhen you are in plan mode and you update the plan file:\n\n1. After writing or editing the plan file, ALWAYS display the full plan content in a markdown code block in your response\n2. Use the format:\n ```markdown\n ## Current Plan\n [full plan content here]\n ```\n3. This ensures the user can see the plan without needing to run `/plan`, which is especially important when you're asking follow-up questions\n4. Show the plan BEFORE asking any clarifying questions, so the user has context for their answers\n\nThis improves the user experience by making the plan visible immediately after updates, without requiring separate commands."
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user