From the-ai-brain
End-of-session ritual - writes session log, updates memory, flags carryovers. Use when the user says "debrief", "end session", "wrap up", "save session", "closing time", "done for now", "shutting down", or is about to end a session.
How this skill is triggered — by the user, by Claude, or both
Slash command
/the-ai-brain:brain-debriefclaude-haiku-4-5-20251001The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Review the entire current conversation and identify:
Create a new file at Machine/Session-Logs/{YYYY-MM-DD-HHmm}.md using the current timestamp.
Structure:
---
date: YYYY-MM-DD
tags: [session-log]
type: session-log
duration: ~{estimate}
---
# Session Log: {YYYY-MM-DD HH:MM}
## Summary
{2-5 sentences describing what happened in this session}
## Accomplishments
- {what was completed}
## Decisions Made
- **{decision title}:** {what was decided} -- {rationale}
## Files Changed
- `{path}` -- {what changed}
## Corrections Received
- {correction description} (or "None")
## Open Items
- [ ] {task or question to carry forward}
## Next Session
{suggested starting point for the next session}
Rewrite Machine/Memory/context-cache.md to reflect the post-session state:
Keep the file under 40 lines. Remove stale information.
If any new entities were mentioned or existing entities gained new information during the session, update Machine/Memory/entities.md following the schema in core/memory-schema.md.
If significant decisions were made, append them to Machine/Memory/decisions.md following the schema in core/memory-schema.md.
Verify that any corrections received during the session are logged in Machine/Memory/corrections.md. Corrections should have been logged in real-time, but confirm completeness.
Update .brain/state.json with:
{
"last_session": "YYYY-MM-DDTHH:MM",
"sessions_count": {increment},
"last_session_log": "Machine/Session-Logs/{filename}.md",
"open_items_count": {count of open items},
"active_projects": ["project1", "project2"]
}
Create the .brain/ directory and state.json if they do not exist.
Append a session summary to Human/Daily/{today}.md under a ## Sessions section:
## Sessions
### {HH:MM} Session
- {1-2 line summary}
- Key: {most important outcome}
- Open: {most important open item}
If the daily note does not exist, create it first with standard frontmatter.
Present a brief debrief summary:
Session wrapped up. Here is what was saved:
Session log: Machine/Session-Logs/{filename}.md
Duration: ~{estimate}
Accomplished:
- {key accomplishments}
Carrying forward:
- {open items for next session}
Memory updated: context-cache, {entities if updated}, {decisions if updated}
See you next time!
- Always write the session log, even for short sessions. The only exception is if truly nothing happened.
- Context cache must be rewritten (not appended to) -- it reflects current state only.
- Session logs are append-only. Never modify a previous session log.
- Open items must use checkbox format (`- [ ]`) so they can be tracked.
- If `.brain/state.json` does not exist, create it with initial values.
- Use `[[wikilinks]]` in session logs and daily notes.
- Keep the user-facing summary brief. The detailed record is in the log file.
- If corrections were received, confirm they are recorded and mention any pending rule proposals.
<success_criteria>
Machine/Session-Logs/ with complete structureMachine/Memory/context-cache.md reflects current state.brain/state.json updated with session metadatanpx claudepluginhub cfircoo/the-ai-brain --plugin the-ai-brainGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.