بنقرة واحدة
session-end
Use when the user says "end session", "wrap up", "let's stop here", or invokes /session-end
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when the user says "end session", "wrap up", "let's stop here", or invokes /session-end
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when Claude completes a spec or code implementation and needs independent review, or when the user invokes /peer-review. Triggers automatically after spec writing or code completion for production projects. Only bypass when user explicitly opts out.
Use when setting up a new project with the full opinionated workflow — session memory, commit hooks, copyright headers, ROADMAP, and CLAUDE.md. Invoke with "bootstrap project", "setup project", "new project setup", or /bootstrap-project
Use when the user says "init memory", "set up memory", "scaffold memory", "init project memory", or invokes /init-project-memory — creates the .claude/ session memory system in a new project
Use when the user says "start session", "new session", "begin session", or invokes /session-start
Use when the user says "update session", "log progress", "checkpoint session", or invokes /session-update — especially before /clear or handoff
| name | session-end |
| description | Use when the user says "end session", "wrap up", "let's stop here", or invokes /session-end |
| allowed-tools | ["Bash","Read","Edit","Grep","Glob"] |
You are finalizing a work session to preserve context for future sessions. Follow these steps.
Override note: This is the generic global version. If this project has a project-level session-end skill (in .claude/skills/session-end/), that version runs instead of this one and may include project-specific app shutdown logic.
Run:
git log --since="6am" --oneline --all
git diff --stat
Cross-reference commits against this Claude session's own work. Flag any commits that THIS session didn't make (other agents, manual commits, or earlier context-cleared sub-sessions). For unfamiliar commits, briefly read the changed files so you can describe them accurately.
Read the top of .claude/SESSION_LOG.md.
If the top entry's date matches today's date (stub from session-start, or an already-finalized entry being appended to):
If no entry exists for today (user worked informally without running session-start):
Check today's entry for a <!-- last-update: <hash> --> marker. Its presence signals that session-update has been run during the day and the entry already has substantive content — in that case, session-end is a lightweight finalization. Its absence means you're reconstructing from scratch against git history.
Most content is already captured. Focus on:
[In Progress])### Files Modified and ### What Was Accomplished. Anything missing? Ask the user briefly.<!-- last-update: ... --> marker — the session is being finalized, marker no longer needed.Full reconstruction. Prompt the user:
[In Progress])Tip for future sessions: if this felt like reconstruction, suggest running
/session-updatebefore/clearnext time — it captures decisions and WIP while the working Claude still has context.
Expand the entry to the full format. Dates use MM-DD-YYYY format (e.g., 04-13-2026):
## MM-DD-YYYY - Session NNN: [Descriptive Title]
**Focus:** [One-line description of session focus]
### What Was Accomplished
1. **[Feature/Fix Name]** — [Description of what was done]
2. **[Feature/Fix Name]** — [Description]
### Key Decisions
- [Decision] — [Why this approach was chosen]
### Files Modified
| File | Changes |
|------|---------|
| `path/to/file.py` | [Brief description] |
### Notes for Next Session
- [Anything the next session needs to know]
---
Count the full entries (not one-line summaries) in .claude/SESSION_LOG.md.
If there are more than 10 full entries:
.claude/SESSION_ARCHIVE.md..claude/SESSION_LOG.md, replace the full entry with a one-line summary (MM-DD-YYYY format):
## MM-DD-YYYY - Session NNN: [Title]
Note: older archived entries may use YYYY-MM-DD; treat them as equivalent for matching, but always write new summaries in MM-DD-YYYY.
This keeps SESSION_LOG.md scannable while preserving full history in the archive.
Check if any of these apply:
COMPLETED_FEATURES.mdSkip if no meaningful changes.
If architectural decisions were made this session, add to .claude/DECISIONS.md:
Determine if a formal ADR is warranted.
If something didn't work as expected, add to .claude/MISTAKES.md:
Run git status to show any uncommitted documentation changes. Ask the user if they want to commit:
git add .claude/ ROADMAP.md
git commit -m "[session] Session NNN wrap-up"
If the application is running (dev servers, Docker containers, etc.), ask the user:
"Shut down the application, or leave it running?"
If CLAUDE.md documents shutdown commands, follow those. Otherwise, skip this step.
| Priority | File | When |
|---|---|---|
| 1 | .claude/SESSION_LOG.md | Every session-end |
| 1 | Prune → SESSION_ARCHIVE.md | When >10 full entries |
| 2 | ROADMAP.md | When milestones / metrics / priorities change |
| 3 | .claude/DECISIONS.md | When architectural decisions made |
| 3 | .claude/MISTAKES.md | When something failed |
| — | Application shutdown | Ask if app is running; defer to CLAUDE.md for commands |
Key change from older versions: Session-end no longer creates entries from scratch — that's session-start's job. Session-end finalizes / appends to today's existing entry, or (on request) creates one retroactively. When session-update has been run during the day, finalization is quick — just title, focus, gap-check.