agentleFS
aaronartistzhang-afkaaronartistzhang-afk/DailyWork/skills/session-handoff/SKILL.md

session-handoff

Skill1 starsChanged 3 months agoMITView on GitHub

Use when work must be handed from this AI coding session to another session on the same machine, or to a later session of the same person. Session handoff / context handoff: produce a fixed three-line header (state / what you do next / what you decide) plus a six-section HANDOFF.md so the receiver sees 'fixed or not fixed?' at a glance. 触发词:「另一个 session」「转给那个 session」「你把这个发给 XX session」「交接」“收工交接”“写个交接”「HANDOFF」。English triggers: “hand this off to the other session”, “write a handoff”, “end-of-shift handoff”, “continue this in my next session”. 不适用:派子代理/并行任务(parallel-agent dispatch)、给人发消息(audience-tailored message)、会话超时/重连(不是交接)。

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

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write to the scratchpad directory by default.

    line 27
  2. Distinctive:

    When there's something in the worktree/repo you didn't change: note it, put it under "Not my turf," name it in the handoff — then stop.

    line 74
  3. Distinctive:

    Only with all three do I send.

    line 89

“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 — passing work between sessions on one machine

Hand the work in this session's hands to another session, or to this same person's next session.

Core principle: the receiver must see "fixed or not fixed?" at first glance. A handoff is not a work log — it's a status note that lets someone decide the next step within three lines.

When to use

  • You need to pass live work to another running session, or write it for your own next session.
  • You're wrapping up and want to leave a "here's where I got to."

Not for:

  • Dispatching subagents / parallel tasks → that's a parallel-agent dispatch skill. Handoff ≠ dispatch: a handoff moves existing context to a session that already exists; dispatch constructs the context a new agent needs.
  • Sending a message to a person (teammate, boss, engineer) → use an audience-tailored message skill.
  • Session timeout / reconnect — that's a connection problem, not a handoff.

Output 1: HANDOFF.md

Write to the scratchpad directory by default; --out <path> for elsewhere. Six sections — a missing section is worse than a wrong one:

SectionWhat goes in
What changedPer file: absolute path + what changed + why
UnfinishedWhich step is missing, what the next step concretely is (not "look into it more")
LandminesTraps you hit, paths not to retread, inputs known to blow up
git snapshotSee section 2 — all four items, with a timestamp
Not my turfThings in this worktree/repo that I did not change, and whose they are
Evidence strengthTag only the key calls, four levels: measured / read the code / inferred / unverified

Don't tag evidence strength line by line — tagging every line is the same as tagging none; it just drowns the receiver. Tag only the calls where "if this is wrong, the receiver walks a wasted mile."

2. git snapshot (four steps, run each — don't write from memory)

date '+%Y-%m-%d %H:%M:%S %z'
git branch --show-current                      # (1) re-read on the spot, not the one you memorized minutes ago
git status --porcelain                         # (2) working tree: uncommitted / untracked
git rev-parse --abbrev-ref '@{u}' 2>/dev/null  # (3) upstream; if none, say "no upstream" explicitly
git rev-list --left-right --count '@{u}...HEAD' 2>/dev/null   # (4) only if there's an upstream: behind<TAB>ahead
  • (1) must be re-read on the spot. In a shared worktree another session can switch HEAD out from under you — the branch you created minutes ago may not be current now. Writing the branch name from memory sends the receiver to the wrong branch.
  • (3) when there's no upstream, say "no upstream" explicitly — don't omit the line; omission reads as "already pushed."
  • (4) run only once (3) yields an upstream; report it in words as ahead N / behind M, don't paste the two raw numbers.

Uncommitted / un-pushed git state must go inside the three-line header, not hidden in HANDOFF.md's fourth section. Real-world quote:

"Did you commit your changes to the retriever engine? The other session says you didn't."

— two sessions disagreeing on the commit state of the same code is the most expensive handoff failure: the receiver keeps working on a false premise.

3. Output 2: paste-ready note (fixed three-line header)

State: <one line — fixed or not fixed, and committed/pushed or not>
Do this: <one line — one concrete action>
Decide this: <one line; if nothing, write "none, just do the above">

Details come after the three-line header. Order and line count are fixed — no merging, no extra line. These three lines exist because of this:

"I don't get it — so is it fixed or not?"

— that's the receiving session's opening line. The three-line header exists so that sentence never has to be said.

4. Finding someone else's changes: diagnose only, don't touch

When there's something in the worktree/repo you didn't change: note it, put it under "Not my turf," name it in the handoff — then stop. Don't revert, don't stash, don't "tidy up while I'm here," don't switch branches.

"Check first, don't change anything — the other session is still working right now."

— another session may be working on those files this very moment. Your "while I'm here" is its data loss.

5. Delivery

Default: draft only. The draft goes to the human; the human passes it on.

To have me deliver straight to the target session, three conditions must all hold:

  1. The human named the target session;
  2. It's visible in the session list;
  3. I show a preview first, and the human says go after seeing it.

Only with all three do I send. A "send it over" before the preview is not authorization.


Guardrails (from real usage)

  • git state always reported — inside the three-line header, not buried.
  • Someone else's turf: diagnose, don't touch — another session may be live on those files.
  • The three-line header exists so "is it fixed or not?" never has to be asked.

Related

  • A parallel-agent dispatch skill: spins up a new agent for new work; this skill moves existing context — two different things.
  • An audience-tailored message skill: use it when the recipient is a person.

Template

handoff-template.md (same directory).

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.