agentleFS
NicegarrryNicegarrry/claude-skills/session-handoff/SKILL.md

session-handoff

Skill0 starsChanged 5 months agoMITView on GitHub

Use when wrapping up a Claude Code session so the next session resumes cleanly — write a handoff before clearing/ending. Triggers include "/wrap", "wrap up", "wrap the session", "write a handoff", "hand this off", "I'm about to /clear", "save context before clearing", or any request to checkpoint what was done + what's next before the conversation is reset. Pairs with SessionStart/SessionEnd hooks that auto-recall the handoff next session and auto-write one if you forget to /wrap.

139 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ascii-diagram, research-fleet and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • SethGammonSkill

    research-fleet

    Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.

    Also in 3 projects that use this

  • vicoa-aiSkill

    live-preview

    Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.

    Also in 4 projects that use this

  • botlearn-aiSkill

    doc-gen

    Also in 4 projects that use this

  • flyingobsidianSkill

    terminology

    Read a codebase, find terminology, create/update definitions into a markdown document.

    Also in 3 projects that use this

  • Dizzy-TenSkill

    bug-diagnosis

    Diagnose bugs and product issues without modifying code. Use when the user explicitly invokes $bug-diagnosis or asks for diagnosis, root-cause analysis, issue classification, or fix strategy for code bugs, failing tests, configuration/dependency problems, deployment issues, performance regressions, data anomalies, or frontend/user-experience problems described through screenshots, annotations, logs, errors, or natural-language reports. Prioritize analysis and recommendations only; do not edit files.

    Also in 3 projects that use this

  • +1 more from SethGammon

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do all of the following, then stop:

    line 19
  2. Distinctive:

    Write for your future self with zero memory of this conversation.

    line 40
  3. Distinctive:

    Don't restate things already obvious from the code or git history.

    line 42
  4. Distinctive:

    Run (pipe the body via a quoted heredoc so nothing expands):

    line 52
  5. Very specific:

    Intra-repo mirror (opt-in): If the project has a docs/memory/ directory, every write (wrap or auto-fallback) also copies the handoff into …

    line 83
  6. Distinctive:

    Create that directory to opt a repo in.

    line 88
  7. Very specific:

    Setup / reinstall: run ~/.claude/skills/session-handoff/install.sh (idempotent).

    line 97

“Common” is measured: kept by at least 6 in 10 of the 117 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Session Handoff (/wrap)

What this does

Writes a handoff memory for the current project capturing what was done, what's next, and any gotchas — so the next session in this folder resumes with full context. A SessionStart hook injects the newest handoff automatically; this skill is the high-quality, deliberate write path (you, the live agent, with full context).

This is the path to use instead of just /clear when you want a clean resume.

When invoked

Do all of the following, then stop:

1. Compose the handoff body

Reflect on THIS session and write terse, information-dense markdown with exactly these sections (skip a section only if genuinely empty):

## Summary
<what was accomplished this session — decisions, what changed, current state>

## Next steps
<concrete next actions, in order; name the first thing to do>

## Gotchas / open questions
<anything non-obvious: blockers, things tried that failed, decisions pending>

## Key files & commands
<paths touched, how to run/test, branch names, URLs — what the next session needs>

Write for your future self with zero memory of this conversation. Prefer specifics (file paths, command lines, function names, branch, PR/issue numbers) over generalities. Don't restate things already obvious from the code or git history.

2. Pick a topic + one-line hook

  • topic: a short kebab-case slug for the work (e.g. auth-refactor, climatepulse-rss-dedup).
  • hook: a single sentence (≤120 chars) that will become the pointer line in MEMORY.md — the thing that tells the next session whether this is the thread to resume.

3. Write it via the helper

Run (pipe the body via a quoted heredoc so nothing expands):

/opt/homebrew/bin/python3 ~/.claude/skills/session-handoff/handoff.py write \
  --source wrap --cwd "$PWD" \
  --topic "<topic-slug>" \
  --hook "<one-line hook>" <<'HANDOFF'
## Summary
...
## Next steps
...
## Gotchas / open questions
...
## Key files & commands
...
HANDOFF

The helper stamps the timestamp, names the file uniquely, writes it to <project-memory>/handoffs/, refreshes the single rolling pointer block in MEMORY.md (kept to the last 5, newest first), prunes to the last 40 handoffs, and records a dedup marker so the automatic fallback won't double-write.

4. Report and hand back

Tell the user the saved path and that it's safe to /clear now. Do not try to run /clear yourself — a skill can't; the user runs it. On the next session in this folder, the handoff is injected automatically.

Notes

  • Intra-repo mirror (opt-in). If the project has a docs/memory/ directory, every write (wrap or auto-fallback) also copies the handoff into docs/memory/handoffs/ and refreshes only the handoff pointer block in docs/memory/MEMORY.md (the rest of that file is the repo's own — it is never overwritten with the canonical ~/.claude index), so the trail is git-tracked. Create that directory to opt a repo in; commit the mirror along with normal doc changes. The mirror is never pruned — git history is the point.
  • This is project-scoped. Each folder has its own handoffs; clearing windows in different folders never interfere. Multiple windows in the same folder are safe too (locked writes, unique filenames) — recall shows the newest + lists the others so you can pick which thread to resume.
  • Forgot to /wrap and just hit /clear? A SessionEnd hook spawns a headless summariser as a best-effort fallback (lower quality, a small background cost). Disable it by creating ~/.claude/skills/session-handoff/FALLBACK_DISABLED.
  • Setup / reinstall: run ~/.claude/skills/session-handoff/install.sh (idempotent).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.