cd /news/ai-agents/wrapup-claude-code-session-end-skill… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-162052] src=gist.github.com β†— pub= topic=ai-agents verified=true sentiment=↑ positive

wrapup: Claude Code session-end skill (SKILL.md)

A developer published a Claude Code session-end skill, "wrapup," defined in a SKILL.md file that runs a single-pass end-of-session checklist. The skill silently gathers git status, recent commits, worktrees and workstream files, then drafts a report covering state, learnings, commits, test coverage and open items, asking the user only one round-trip question to confirm or amend before finishing.

by read5 min views1 publishedNov 1, 2026
name wrapup
description Session-end checklist β€” verify state saved, learnings captured, everything committed; then report
allowed-tools

| Read | Write | Edit | Bash | Grep | Glob |

Run a single-pass wrap-up. Gather everything silently, propose a draft report with your best judgment, then let the user override or add in one round-trip. Don't walk through questions one at a time.

  • ls ~/.claude/workstreams/*.json β€” list workstreams; read any that look relevant to this session's work
  • For each git repo touched this session (infer from conversation β€” typical candidates: cwd, ~/.claude , other project repos):
    • git status --short β€” uncommitted changes
    • git log --oneline -5 β€” recent commits (so the report can list this session's commits)
    • git worktree list β€” note unmerged worktrees

Don't ask the user anything yet.

For each section of the report, decide based on context β€” don't ask:

  • State β€” Is there a workstream that matches what we did? If so, propose updating it (and do it inline if obvious). If the session was a one-off (printing, lookups, ad-hoc fixes), sayn/a .
  • Learnings β€” You propose these. Look back at the session for: corrections you received, unusual choices the user validated, non-obvious preferences, gotchas you hit, patterns worth repeating, or things to avoid next time. Draft the memory file(s) yourself based on what actually happened. If a learning is borderline (you're not sure it's worth keeping, or you're not sure how to phrase theWhy: /How to apply: ), include it in the report and flag it for the user to confirm/edit/drop in the override step. If nothing meaningful surfaced, saynone . Don't invent learnings that aren't grounded in this session, but DO surface ones the user didn't explicitly call out β€” that's the whole point.
  • Commits β€” List commits made this session.
  • Test coverage check β€” If this session added new functionality or non-trivial code (not just docs, lookups, config tweaks, prints), verify tests were created for it. Specifically:
    • List the test files added/modified this session (git diff --stat $MERGE_BASE..HEAD -- '*test*' '*spec*' '*.feature' ).
    • If the project uses BDD (look for tests/features/*.feature orbdd_conftest.py ), confirm at least one BDD scenario was added β€” BDD coverage is easy to skip and worth a specific callout.
    • If new code shipped without tests, flag this in the report so the user can decide whether to backfill.
  • List the test files added/modified this session (
  • Open items β€” Uncommitted changes, unmerged worktrees, branches that need pushing, PRs that need opening.

Memory destinations (per CLAUDE.md auto memory rules):

  • user_*.md β€” about who they are / how to collaborate
  • feedback_*.md β€” corrections or validated approaches (includeWhy: andHow to apply: lines)
  • project_*.md β€” current initiatives, deadlines, decisions
  • reference_*.md β€” pointers to external systems or files

All under ~/.claude/projects/<project>/memory/ (or the project-specific memory dir from the running CLAUDE.md). Add a one-line index entry to MEMORY.md.

Don't save things derivable from code, git history, or existing CLAUDE.md content.

Print the report (format below). Then add ONE short question:

Anything to add, change, or commit? Otherwise we're done.

That's the only question. The user can:

  • Add a learning you missed β†’ save it
  • Authorize a commit you flagged as uncommitted β†’ make it
  • Tell you to update a workstream β†’ do it
  • Say "done" β†’ stop

Don't loop unless the user explicitly asks for more iterations.

Render as plain Markdown (h2 + bold inline labels), NOT inside a fenced code block β€” the user reads this in the terminal and code blocks make it less readable. Example:

## Session wrap-up β€” <date>

**State:** <workstream(s) updated, or "n/a">.

**Learnings captured:**
- *<learning name>* β€” <file path or one-line summary>
- (or "none")

**Commits this session:**
- `<repo>`: `<sha>` <one-line message>
- (or "none")

**Tests added:**
- <test file(s) + brief description>
- BDD: <feature file + scenarios, or "none" if BDD applies but wasn't added β€” flag this>
- (or "n/a β€” no new code this session")

**Open items:**
- <unmerged worktree path(s)>
- <uncommitted work>
- <PRs to open / branches to push>
- (or "none")

(That fenced block above is just to show the layout β€” when you actually print the report, do NOT wrap it in fences.)

Keep it under ~30 lines.

  • One round-trip, not four. Gather, decide, report, offer override.
  • Never auto-commit or auto-push without the user saying yes in the override step.
  • Propose learnings from session observation, not just from what the user said out loud. Borderline ones get flagged in the report for confirmation; obvious ones get saved. The bar is "grounded in something that happened this session," not "user explicitly told me to remember this."
  • If the session was trivial (one-off lookup, simple print job), it's fine for every section to be n/a /none . Say so and stop.
  • Unlike save-state 's handoffs (one new file per save, by design), wrapup's writes are already in-place and don't proliferate on repeat/back-to-back runs: a workstream update mutates existing fields (no new file), and a learning is only saved if it's genuinely new β€” check the project'sMEMORY.md /existing memory files first and update one in place rather than writing a near-duplicate when the same lesson resurfaces. So back-to-back/close //wrapup calls in one session are safe as-is; nothing here needs the same "is this small and recent" gatingsave-state has.
── more in #ai-agents 4 stories Β· sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/wrapup-claude-code-s…] indexed:0 read:5min 2026-11-01 Β· β€”