agentleFS
ArcanEdge-AIArcanEdge-AI/coding-agent-playbook-claude-code/skills/handoff/SKILL.md

handoff

Skill0 starsChanged 4 months agoMITView on GitHub

Use when the user asks for a handoff, a fresh continuation session, a clean start that keeps the context, or to carry "everything we have worked on, researched, explored, validated, or verified" into a new Claude Code session. Assembles a complete, evidence-labelled context package, delivers it as a self-contained seed prompt (with a durable file when warranted), and names only session actions Claude Code actually supports for starting the new session. Authorizes preparing the continuation, not continuing the work.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use decision-mapping, setup-ts-deep-modules 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.
  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 8 projects that use this

  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 42 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 93 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 87 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 51 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 54 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 172 edited versions we read keep these.

  • 5

    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. Distinctive:

    Treat the conversation, the repository, connected services, memory, and the user's statements as separate evidence sources.

    line 18
  2. Distinctive:

    Keep verified-current, user-reported, historical, and unverified facts distinct.

    line 20
  3. Very specific:

    Read references/context-contract.md, packaged with this skill, before assembling the package.

    line 23
  4. Distinctive:

    When it has changed files in that worktree, it commits them without asking and pushes the branch when a remote exists, unless the task, …

    line 72
  5. Distinctive:

    Do not claim success because text was written.

    line 80
  6. Distinctive:

    Leave the source session alone: do not archive, delete, or rename it unless the user asks.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 172 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

Handoff

Move the current work into a fresh Claude Code session without losing decisions, evidence, failures, workspace state, or the real next gate.

The new session starts with no memory of this one. Everything it needs to continue correctly has to be in the package, and everything in the package has to say how it is known.

A handoff request authorizes gathering and packaging the context, titling the continuation, and telling the user how to start it — and starting it yourself only when the user asks you to, through a supported action. It does not authorize code changes, commits, merges, deployment, publication, cloud or external mutation, destructive cleanup, or continuing the underlying work.

1. Establish current truth

Before composing anything:

  1. Treat the conversation, the repository, connected services, memory, and the user's statements as separate evidence sources.
  2. Recheck the cheap, drift-prone facts that matter to the next session: repository path, branch or ref, commit, upstream and ahead or behind, dirty state, pull-request, check, and review status, deployment state, active worktree, and relevant external access state.
  3. Keep verified-current, user-reported, historical, and unverified facts distinct. Never upgrade a source change, a merge, or an old test result into deployed acceptance.
  4. Preserve unrelated local work. Record dirty or user-owned paths; do not clean, reset, move, stage, or overwrite them.

Read references/context-contract.md, packaged with this skill, before assembling the package. It holds the evidence labels, the material-context inventory, the repository rules, a seed-prompt skeleton, and the completeness check.

2. Build the context package

Include all the material context the next session needs to continue correctly — not a transcript:

  • the objective and the current verdict
  • work completed, with its exact artifacts
  • research, experiments, alternatives, and causal findings
  • validations run, exact outcomes, warnings, and what they do and do not prove
  • user decisions, approvals, rejected approaches, and non-negotiable invariants
  • repository, worktree, branch, pull-request, release, and external-system anchors
  • the state the playbook's other workflows carry: the plan or task graph with its ready, blocked, and invalidated items and open approval gates; task-created worktrees and their dispositions; branch roles and promotion state; ownership agreed with other sessions
  • failures, dead ends, pre-existing defects, and why they were classified that way
  • unresolved risks, missing evidence, and the precise next gate
  • authorization boundaries — including who handles git — and the actions the next session must not infer

Use exact paths, identifiers, commits, pull requests, run IDs, test counts, and evidence locators wherever they prevent rediscovery or mistakes. Cut repetition and conversational noise. Never include credentials, tokens, private keys, session cookies, sign-in links, device codes, secret values, customer prose, or sensitive payloads the next session does not need.

3. Deliver it

The deliverable is always one self-contained seed prompt: a reader with no access to this conversation can act on it correctly. It ends with the instruction in the context contract — acknowledge the inherited state, refresh drift-prone facts, state the exact next gate, and start nothing consequential without the user's authority.

Write a durable copy as well when the user asks for one, when the package is too long to paste reliably, or when the next session will start somewhere this output is not visible. Use a path the user names; otherwise .claude/handoff/<short-slug>.md in the repository the next session will use. Check whether that path is ignored, and if it is not, tell the user the file is untracked. Never commit it.

Give the continuation a short, unambiguous title, then tell the user exactly how to start it. These are the supported ways to start a fresh session — one that begins with no history but the seed prompt:

WhereHowNotes
A terminal, in the checkout the package namesclaude -n "<title>", then paste the prompt — or pass it as the first prompt: claude -n "<title>" "<prompt>"The default. The session runs in that checkout, so it sees uncommitted work. Pasting avoids quoting trouble with a long prompt.
The current terminal/clear, then paste the promptStarts a new conversation with an empty context. This one stays saved and resumable with /resume.
The desktop appStart a new session in the same project folder, then paste the promptLeave the worktree option off unless the package names a worktree.
A background session, started for the userclaude --bg --name "<title>" "<prompt>" from the repositoryOnly under the conditions below.

These session actions are not a fresh continuation, so never offer them as the handoff:

  • claude --continue, claude --resume, and /resume reopen an existing conversation with its full history.
  • /branch, --fork-session, and /fork copy the existing history into another session.
  • claude -p runs headless and exits. It would start the work with nobody watching.
  • Cross-session messaging reaches a session that already exists; it does not create a fresh one.

The user performs the terminal, /clear, and desktop steps. Claude Code documents no tool for the model to open a new interactive session, so your part is the exact steps — or, under the conditions below, running the CLI.

A background session, only when the user asks for one

Start the continuation yourself only when the user asks you to start it, not merely to prepare it. It runs a model on the user's account and leaves a session they must manage, and agent view, which manages background sessions, is a research preview. Know what a background session does:

  • It begins working on its prompt immediately, in the permission mode a new claude session in that directory would start in.
  • It reads the current checkout, but before it edits anything it moves into its own git worktree under .claude/worktrees/ — unless the repository sets worktree.bgIsolation to "none". That worktree branches from the repository's default branch, or from the current local HEAD when worktree.baseRef is "head". Uncommitted work never comes along.
  • When it has changed files in that worktree, it commits them without asking and pushes the branch when a remote exists, unless the task, CLAUDE.md, or memory says the user handles git.

So use it only when everything the continuation needs is committed where its worktree will start — or the continuation only reads — and the seed prompt states the git authority explicitly. Its worktree belongs to that session, not to this task's worktree budget.

Run it from the checkout the package names; a background session starts in the directory it is launched from. It prints the session ID. Then verify: claude agents --json lists it among the active sessions, and claude logs <id> shows that it acknowledged the inherited state without starting anything else. Give the user claude attach <id> to open it.

4. Verify the handoff

Do not claim success because text was written.

  • Reread the prompt, or the file, against the completeness check in the context contract.
  • Confirm that the workspace, branch, and artifact paths it names exist as it describes them.
  • Confirm it tells the next session to recheck live state before acting.
  • Confirm that nothing — a merge, deployment, publication, cloud mutation, destructive action, or the underlying work — started as a side effect.
  • Leave the source session alone: do not archive, delete, or rename it unless the user asks.

Finish with a short confirmation: the handoff title, the file path if one was written, how to start the new session, and — only if you started one — its session ID. When no session was created, say so plainly.

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.