Automate end-of-session workflow: update SESSION.md, create git checkpoint, and prepare for context clear.
Automates end-of-session workflow: updates SESSION.md, creates git checkpoint, and prepares for context clear.
/plugin marketplace add evolv3-ai/vibe-skills/plugin install evolv3-ai-vibe-skills@evolv3-ai/vibe-skillsAutomate end-of-session workflow: update SESSION.md, create git checkpoint, and prepare for context clear.
Follow these steps to wrap up the current session and prepare for a clean handoff.
Use the Task tool with description "Analyze session state for wrap-up" to gather:
git status to see uncommitted changesgit log -1 --oneline to see last commitgit diff --stat to see what changedIf SESSION.md doesn't exist:
Update the following sections:
a) Current Stage
b) Progress Section
[x]c) Known Issues
d) Next Action
e) Last Checkpoint
f) If Phase Complete
Analyze what changed this session using git diff output.
Ask user about updating these docs (only if relevant changes detected):
If phase completed:
If architecture changed (new patterns, major refactoring):
If API endpoints added/modified:
If database schema changed:
If README needs updates (new features, changed usage):
For each "yes":
Note: Don't ask about docs that don't exist or aren't relevant to changes.
Analyze the session for correction patterns:
Look for instances in this session where:
If rule candidates found, ask:
Correction patterns detected this session:
1. [Pattern]: [Wrong β Right]
- Would apply to: [file patterns]
Create project rule(s)? (y/n)
If yes:
Create directory if needed:
mkdir -p .claude/rules
For each rule, determine appropriate file paths (globs)
Generate rule file:
---
paths: "[patterns]"
---
# [Rule Name]
[Context for why this rule exists]
| If Claude suggests... | Use instead... |
|----------------------|----------------|
| `[wrong]` | `[correct]` |
Create .claude/rules/[name].md
Optionally ask: "Also update skill for all future projects? (y/n)"
~/.claude/skills/[skill]/rules/[name].mdIf no rule candidates found: Skip this step silently.
a) Stage all changes:
git add .
b) Check if there are changes to commit:
git status --short
If no changes:
c) Determine checkpoint status:
d) Get phase info from SESSION.md:
e) Create structured commit message:
git commit -m "$(cat <<'EOF'
checkpoint: Phase [N] [Status] - [Brief Description]
Phase: [N] - [Phase Name]
Status: [Complete/In Progress/Paused]
Session: [1-2 sentence summary of what was accomplished]
Files Changed:
- path/to/file.ts ([what changed])
- path/to/file2.ts ([what changed])
[... list all significant files]
Next: [Concrete next action from SESSION.md]
π€ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
f) Get commit hash:
git log -1 --format="%h"
g) Update SESSION.md "Last Checkpoint" with new hash
Display a formatted summary:
βββββββββββββββββββββββββββββββββββββββββββββββ
SESSION WRAP-UP COMPLETE
βββββββββββββββββββββββββββββββββββββββββββββββ
π Phase: [N] - [Phase Name] ([Status emoji])
π Stage: [Implementation/Verification/Debugging]
β
Completed This Session:
β’ [accomplishment 1]
β’ [accomplishment 2]
β’ [accomplishment 3]
π― Next Action:
[Concrete next action from SESSION.md]
πΎ Checkpoint: [hash] ([date])
π Docs Updated:
β’ SESSION.md
β’ [CHANGELOG.md] (if updated)
β’ [.claude/rules/[name].md] (if created)
β’ [other docs] (if updated)
βββββββββββββββββββββββββββββββββββββββββββββββ
Ask user: "Push checkpoint to remote? (y/n)"
If yes:
git push
If push succeeds:
If push fails:
git push manually when ready."Output:
β¨ Session wrapped successfully!
Ready to clear context or continue working.
To resume: Run `/continue-session` in your next session.
SESSION.md doesn't exist:
No IMPLEMENTATION_PHASES.md:
Git commit fails:
Git push fails:
git push manually later."Docs update fails:
β SESSION.md updated with current progress β Git checkpoint created with structured message β Relevant docs updated (if needed) β Project rules created for correction patterns (if any) β Clear "Next Action" for resuming β User knows exactly what to do next