Three Claude Code skills that let a long coding session end and a fresh one begin without losing the thread, and that measure how well the handover actually worked so the next one is better.
Long agent sessions rot. The context window fills with files that were read once and never mattered, and the useful part gets summarised away. The usual fix is to start again and spend the first twenty minutes re-explaining the work. These skills replace that with a written handover, a resumption that knows it is a resumption, and a log that turns the whole thing into evidence.
Produces one copy-pastable markdown block to open the next session with.
The block is an index, not an archive. It behaves like a CLAUDE.md: lean
and pointer-heavy, with long-form detail spilled into .claude/handoffs/*.md
files that the next session reads only if it needs them.
The load-bearing section is "Files OUT of scope", and it is the whole reason the skill exists. Listing what the next session must not re-read is worth more than listing what it should, because the failure mode of a fresh agent is not ignorance. It is enthusiastically re-deriving what you already knew.
Fires automatically when the first message of a session contains a
<!-- handoff:<id> --> marker, which the handoff block carries.
It does two things and neither of them interrupts the work. On arrival it records that the handoff was actually used. On wrap-up it audits itself against its own tool-call history: which out-of-scope files did it read anyway, which in-scope files did it never touch, how many times did it re-derive something the handoff should have provided, and which of the planned next steps got done.
There is deliberately no user questionnaire. The person who wrote the handoff was not watching the session and cannot answer accuracy questions about it, so asking produces noise rather than signal. The agent grades its own paper by reading what it actually did.
It also carries a pacing rule: when the handoff describes a numbered roadmap, complete one step and stop. Momentum and small-looking next steps are not reasons to continue, because batching is exactly the context-rot failure the skill exists to prevent.
Reads the accumulated .claude/handoffs/_log.jsonl across sessions, finds the
patterns, and proposes targeted edits to the /session-handoff skill itself.
Which paths keep getting classified out of scope and read anyway. Which sections of the handoff format are never consulted. How often sessions rediscover things they were told. It does not apply the edits; it argues for them.
/session-handoff → writes the block, logs "created"
↓ (paste into a new session)
/resume-session → logs "resumed", then "audited" with its own self-assessment
↓ (weeks of these accumulate)
/improve-session-handoff → reads the log, proposes edits to /session-handoff
That closing edge is the point. The prompt that produces the handovers is revised from measurements of how the handovers performed, rather than from anyone's impression of how they went.
One JSONL file per project at .claude/handoffs/_log.jsonl, three event types:
Gitignore it. It is instrumentation, not source:
.claude/handoffs/_log*.jsonl
git clone https://github.com/IDSTUK/session-handoff.git /tmp/session-handoff
cp -r /tmp/session-handoff/skills/* ~/.claude/skills/Then say "hand this off" or run /session-handoff when a session gets long.
/resume-session needs no invocation: pasting the block triggers it.
- The three skills are usable separately, but the log only becomes worth reading
when handoff and resume are both installed, and
/improve-session-handoffhas nothing to work with until a handful of sessions have completed the trio. - Nothing here talks to a network or leaves the repository it runs in.
- The audit never invents data. If it cannot tell whether a file was re-read, it leaves it out, because a log that flatters the format is worse than no log.
MIT. See LICENSE.
{"event":"created", "session_id":"93f0fa80", "slug":"...", "in_scope":[...], "out_of_scope":[...], "next_steps":[...]} {"event":"resumed", "session_id":"93f0fa80"} {"event":"audited", "session_id":"93f0fa80", "out_of_scope_read":[...], // listed as out of scope, read anyway "in_scope_unused":[...], // listed as in scope, never touched "rediscovery_events":2, // times something in the handoff got re-derived "next_steps_done":[...], "next_steps_untouched":[...], "unplanned":[...], "narrative":"..."} // 2-4 sentences, the only free text