agentleFS
renzrollonrenzrollon/shippable-skills/skills/productivity/session-handoff/SKILL.md

session-handoff

Skill7 starsChanged 24 days agoMITView on GitHub

Save where this session stands to a handoff file before a context reset, so the next session or agent resumes without re-deriving decisions. Lists stranded work, redacts secrets, and proposes reusable rules for your instruction file.

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

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 8

    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:

    Write the state of the current session to a handoff file, so a fresh session can pick up from it.

    line 11
  2. Distinctive:

    Never block on I/O: Every read, list, and write here is best-effort.

    line 19
  3. Distinctive:

    Before writing, check what would be lost, and put the findings under

    line 58
  4. Distinctive:

    Run each command on its own, not chained.

    line 67
  5. Very specific:

    When the user's path is not one of the three defaults, the next session's session-primer will not find the file unless the instruction file …

    line 105
  6. Distinctive:

    Write the redacted text from step 3.

    line 110
  7. Distinctive:

    Attempt the create and the write once: If the host denies either, do not retry, do not try another location, and print the whole redacted …

    line 112
  8. Distinctive:

    Look for rules this session learned that would apply again in this project, for example "run the formatter before the type check, the CI …

    line 118
  9. Distinctive:

    Do not edit the instruction file, source, or any other file.

    line 140

“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

Write the state of the current session to a handoff file, so a fresh session can pick up from it. Run it before clearing context, switching tools, or passing work to another agent.

This skill is host-neutral. It runs on Cursor, Copilot, Codex, Claude Code, and any other Agent Skills host. It reads this conversation and a few git facts; it never reads an on-disk transcript.

Never block on I/O. Every read, list, and write here is best-effort. If a call is denied or fails, treat it as unavailable, do not retry, and do not guess another path. If the file cannot be written, the handoff goes in the chat reply.


Output contract (non-negotiable)

You are running session-handoff right now. These instructions are in your context because the skill was invoked, so write the handoff in this reply.

  1. The file's first line is the resume stamp, exactly this shape: <!-- resume: <slug> | branch <branch> | head <short-sha> | <YYYY-MM-DD HH:MM> --> Outside a git repository use branch none | head none.
  2. The file has these nine sections, in this order, as ## headings: Progress, Decisions Made, Rejected Alternatives, Files Touched, Verified vs Assumed, Do Not Redo, Issues / Blockers, Next Steps, Skills To Invoke. A section with nothing to say reads None.; never omit one.
  3. The reply prints the file path and, on its own line, the resume phrase verbatim: Read <path> and continue from its Next Steps. with the real path. Then the constraint proposal (step 5), if any.
  4. Never write a token, key, password, or connection string. Replace the value with a placeholder naming its kind, such as <api-token>.

Input

ArgumentMeaning
<slug>Short kebab-case name for the work. Default: derived from the branch or the main task.
--handoff-dir <path>Directory to write to (see step 4)

Steps

1. Stranded-work preflight

Before writing, check what would be lost, and put the findings under Issues / Blockers:

  • Uncommitted files: git status --porcelain. List up to ten, then a count.
  • Unpushed commits: git rev-list --count @{upstream}..HEAD. If the branch is ahead, state the count and the branch name. If there is no upstream, say so.
  • Running background agents or jobs, only when the host exposes them. If the host has no such listing, skip this check without comment.

Run each command on its own, not chained. Outside a git repository, skip the git checks and say the state is not under version control.

2. Gather the session

From the conversation you already hold, collect: what was done and what remains, the decisions with the reason for each, the alternatives that were rejected and why, files changed, what was verified (a test passed, a command was run) versus only assumed, work that must not be repeated, and the next concrete steps.

Pointer, not copy. Refer to specs, plans, briefs, and commits by path or short SHA. Do not paste their contents. A handoff longer than about 150 lines usually copied something it should have pointed at.

3. Compose and redact

Fill the nine sections from references/handoff-template.md.

Then, before anything is written, scan what you are about to save for secrets: API tokens, keys, passwords, bearer strings, connection strings with credentials, private key blocks. Replace each with a placeholder naming its kind. The write in step 4 and the inline fallback both use this redacted text, so a secret is never on disk, even briefly.

4. Resolve the directory and write the file

Restated from the collection's shared conventions:

  • Instruction file: the first existing of AGENTS.md, CLAUDE.md, .github/copilot-instructions.md. A line shippable-handoff-dir: <path> in it (relative to the repo root) overrides the handoff directory. Ignore a value that is absolute or contains .., and say so.
  • Handoff directory: a path the user passed or named in the request, else the instruction-file override, else the first existing of .claude/handoff/, .agents/handoff/, docs/handoff/. When none exists, create .agents/handoff/ and suggest a gitignore line for it.
  • File name: handoff-<slug>-<YYYYMMDD-HHMMSS>.md.

When the user's path is not one of the three defaults, the next session's session-primer will not find the file unless the instruction file names the directory. Offer the exact line shippable-handoff-dir: <path> with the constraint proposal in step 5, and write it only on a yes.

Write the redacted text from step 3.

Attempt the create and the write once. If the host denies either, do not retry, do not try another location, and print the whole redacted handoff in the reply instead, after a one-line note that the write was denied.

5. Propose reusable constraints

Look for rules this session learned that would apply again in this project, for example "run the formatter before the type check, the CI order depends on it". Propose at most three. Drop any candidate that names a single file, commit, or incident instead of a rule that holds next time.

Show each as the exact line you would add to the instruction file. Write nothing to the instruction file without a yes. Wait for it in the reply; an edit to that file is not part of the handoff. If nothing generalises, say so and offer no edit.

6. Reply

Print the file path, the resume phrase, a two-line summary of the Next Steps, and the constraint proposal. Nothing else.


Rules

  • User-invoked only. Never start on your own because a session got long.
  • The file is the product. The reply is short.
  • Pointers over copies. Secrets never.
  • Do not edit the instruction file, source, or any other file. The handoff and the proposal are the whole job.
  • A denied write is printed inline once and not retried.
  • In Skills To Invoke, list skills by name for the next session to call with the host's skill tool. Never tell it to run a user-invoked skill on the user's behalf.

Related

  • Section guide and example: references/handoff-template.md

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.