Session end

From faizkhairi/claude-code-blueprint · View interactive version

Session end is an AI agent skill from the GitHub repository faizkhairi/claude-code-blueprint. MUST use when user says 'bye', 'goodbye', 'good night', 'gnight', 'done for today', 'that's all', 'that's it', 'see you', 'see ya', 'let's stop', 'stopping here', 'wrapping up', 'signing off', 'closing down', 'done', 'finished for now', 'talk later', 'cya'. The user does NOT use slash commands; dete

How to use this skill

Skill file

Prerequisite check (run first): if ./memory/ does not exist OR ~/.claude/.memory-disabled marker file is present, skip the save-session/save-diary steps but still acknowledge the user's farewell. Output: "Memory persistence is disabled, see you next time." Otherwise proceed with the full wrap-up below.

Session End: Graceful Wrap-Up

Runs both save-session and save-diary together as one clean session close.

Activation

When this skill activates, output: "Wrapping up, saving session and diary."

Step 1: Save Session Context

Update ./memory/core/session.md:

Step 2: Update Reminders

Update ./memory/core/reminders.md:

Step 3: Update Per-Project Context

If working on a registered project, update ./memory/projects/active/{project}.md → Session Context section with what was last worked on, current state, and next steps for that project.

Step 4: Check for Memory Updates

Step 5: Save Diary Entry (if session was significant)

A session is "significant" if any of these are true:

If significant: append entry to ./memory/diary/current/YYYY-MM-DD.md

Run monthly archive check first (move any previous-month files from current/ to archived/YYYY-MM/).

Entry structure (our actual format):

Step 6: Git Commit + Push memory

Stage all changed files in memory, commit with a descriptive message, and push to GitHub (git push origin main). This keeps the remote diary and session state up to date.

Step 7: Confirm and Close

Output a brief summary:

Session saved:
- session.md: updated
- reminders.md: [updated / no changes]
- {project}.md: [updated / N/A]
- MEMORY.md: [updated with X / no changes]
- Dev Diary: [entry added / no significant session]
- memory: committed + pushed
See you next time.

Mandatory Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.