Session wrap
Skill TomasB2BC/claude-code-toolkit/project-management/session-wrap
Generate a rich session summary with accomplishments, decisions, learnings, and optional git hygiene. Triggers on '/wrap', 'wrap up', 'let's close', 'end session'.From its SKILL.md
npx -y skills add TomasB2BC/claude-code-toolkit --skill session-wrapAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.7 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Session Wrap-Up
You are generating a graceful session closure. Your job: summarize what happened, capture decisions and learnings, commit outstanding work, and leave a clean trail for the next session.
Step 1: Read Session Context
Gather what happened this session from available sources:
- Git history: Run
git log --oneline --since="<session_start>"for commits during this session - Modified files: Run
git diff --name-onlyandgit diff --cached --name-onlyfor uncommitted work - Your conversation memory: What tasks were worked on, what decisions were made, what was discussed
If git history is unavailable, generate the summary from your in-session memory instead.
Continuation Detection
Before proceeding, check if this session was already wrapped:
- Check if a wrap digest already exists for the current session in the daily log file
- If found: print
>> Continuing wrap (prior wrap at {time}). New work will be appended.and only summarize work done SINCE the prior wrap. - If not found: proceed normally.
Step 2: Generate Summary
Using your full session context (not just file names), produce:
- Accomplishments -- Narrative summaries of what was achieved (not just "Modified 5 files" but what the modifications accomplished and why they matter)
- Decisions -- Key decisions made during this session and WHY they were made. Include tradeoffs considered.
- Learnings -- Anything discovered, confirmed, or changed understanding. Include technical findings and process observations.
- Blockers -- Any blockers encountered, whether resolved or still open.
Step 3: Client/Project Allocation (Optional)
If you track time across clients or projects:
- Analyze the session work to build an allocation estimate
- If single client/project at 100% with no ambiguity, just print it and move on
- If multiple clients/projects or unclear split, ask for correction:
Client allocation: [project-a: 60%, project-b: 40%] Correct? (Press Enter to confirm, or provide corrections)
If you don't use multi-client tracking, skip this step.
Step 4: Memory Extraction
Review the session for memory candidates -- observations that should persist across sessions. Only extract entries that qualify under at least one criterion:
- (a) Changes behavior (how you work, communicate, or make decisions)
- (b) Documents a commitment (promises made, agreements reached)
- (c) Records decision rationale (why you chose X over Y)
- (d) Is a stable recurring fact (confirmed more than once)
- (e) Was explicitly requested by the user
For qualifying entries:
- Suggest adding to persistent memory: "From this session, I suggest noting: [entry]"
- For observations about the user: ALWAYS ask before storing. Never auto-promote.
Step 5: Write the Digest
Write the session summary to a daily log file. Choose the format that fits your project:
Option A: JSONL (machine-readable, recommended)
Append to docs/daily-logs/sessions/YYYY-MM-DD-digests.jsonl:
{
"session_id": "<unique-id>",
"date": "YYYY-MM-DD",
"started_at": "<ISO timestamp>",
"ended_at": "<ISO timestamp>",
"duration_minutes": 45,
"end_reason": "graceful_wrap",
"accomplishments": ["Narrative accomplishment 1", "Narrative accomplishment 2"],
"decisions": ["Decision and rationale"],
"learnings": ["Learning 1"],
"blockers": [],
"files_changed": ["path/to/file1.py", "path/to/file2.md"],
"commits": [{"hash": "abc1234", "message": "commit message"}]
}
Always use append mode (open('a')) -- never read-all-write-all, as parallel sessions may write to this file concurrently.
Option B: Markdown (human-readable)
Append to docs/daily-logs/sessions/YYYY-MM-DD.md:
---
_Session wrapped: TIMESTAMP (duration: Xh Ym)_
**Accomplishments:**
- Narrative accomplishment 1
- Narrative accomplishment 2
**Decisions:**
- Decision + rationale
**Learnings:**
- Learning
**Files changed:** N files
**Commits:**
- hash: message
You can use both formats (JSONL for programmatic access, markdown for human scanning).
Step 6: Git Hygiene -- Auto-Commit Session Work
Commit this session's outstanding work automatically. This step runs AFTER digest writing so that digest files are included.
- Gather the accomplishments list from Step 2.
- Run
git statusto see what's uncommitted. - Stage and commit with a descriptive message derived from the accomplishments.
- Edge case handling (only these pause):
- If files that may contain secrets are detected (.env, credentials, tokens): ask the user "These files may contain secrets: {list}. Commit, skip, or add to .gitignore?"
- If commits fail (pre-commit hook rejection): report the failure and continue. Do NOT retry with --no-verify.
- If no uncommitted changes: skip this step silently.
Auto-commit is the default. Do not ask for confirmation unless sensitive files are detected.
Step 7: Report
Print the final summary:
>> Session wrapped
Duration: Xh Ym
Accomplishments:
- accomplishment 1
- accomplishment 2
Decisions: N
Learnings: N
Commits: N (this session)
Files changed: N
Log: docs/daily-logs/sessions/YYYY-MM-DD.md
Important Constraints
- Keep the total output concise. The narrative value of /wrap is in quality, not quantity.
- Do NOT modify session tracking files that other hooks may depend on.
- If session data is unavailable, generate from in-session memory. Never block on missing data.
- No emojis in any output. Use
[OK],[!],>>for indicators.
What ships with it: 1 file
3.2 KB alongside SKILL.md
- README.md3.2 KB