agentleFS
mthinesmthines/agent-skills/skills/authoring/handoff/SKILL.md

handoff

Skill20 starsChanged 13 days agoMITView on GitHub

Distills the current session's goal, state, remaining plan, key files, and gotchas into a copy-pasteable markdown handoff for a fresh agent or teammate, written to `.agent/{branch}/handoff.md` and the clipboard. Invoke with /handoff [focus phrase] [--brief].

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

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 172 edited versions we read keep these.

  • 0

    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:

    Resolve the output path: Run git rev-parse --abbrev-ref HEAD for the branch.

    line 51

“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

Distill everything a fresh agent or LLM needs to continue this work — and nothing it doesn't — into a single self-contained markdown document, written to .agent/{branch}/handoff.md and copied to the clipboard.

The reader has zero conversation history. Write for that reader: an LLM picking this up cold, with no access to this chat, these tool results, or your scratch reasoning. Front-load the goal, name every file and command explicitly, and resolve every pronoun.

Workflow

  1. Parse the invocation. A free-text focus phrase (e.g. /handoff the auth refactor) scopes the handoff to one thread of work — include only material on that thread. --brief produces a condensed version: Goal + Next steps + top 3 files only. Default is the full document. State the chosen scope in one line before writing.
  2. Gather the material from this session into the five section buckets below (Goal, Current state, Plan, Key files, Decisions & gotchas). Pull from what actually happened — files edited, commands run and their results, decisions made — not from what was merely discussed.
  3. Curate. Apply the Include / Exclude table. When unsure whether a detail earns its place, ask: would the next agent make a wrong move without it? If no, cut it.
  4. Resolve the output path. Run git rev-parse --abbrev-ref HEAD for the branch. Write to .agent/{branch}/handoff.md (create the directory). If the cwd is not a git repo, fall back to .agent/handoff.md, and if .agent/ is not writable, fall back to the scratchpad directory — report which path was used.
  5. Write the file from templates/handoff.template.md, filling every section. Omit a section entirely (heading and all) only if it is genuinely empty — never leave a placeholder or a "TODO" in the output.
  6. Copy to clipboard. Pipe the file to pbcopy (pbcopy < <path>). If pbcopy is absent (non-macOS or not on PATH), skip it and say so in the report — the file is the primary artifact; the clipboard is a convenience.
  7. Report. Print the resolved path, whether the clipboard copy succeeded, and the section count. Do not dump the whole document back into the chat — a one-line pointer plus the path is enough.

What goes in each section

SectionInclude
GoalThe one-line objective and what "done" means (the acceptance criteria).
Current stateWhat is finished and verified, what is in progress, what is blocked. Mark claims verified vs assumed.
Plan / next stepsThe remaining work, ordered, actionable — each step something the reader can start.
Key filesEvery file the work touches, with its role and what changed. Repo-relative paths.
Decisions & gotchasDecisions and their rationale (and rejected alternatives), plus constraints, non-obvious dependencies, and traps.

Include / Exclude

IncludeExclude
The goal and acceptance criteriaChit-chat, restated requirements, meta-commentary about the conversation
Decisions and their rationaleVerbose reasoning chains that led to a settled decision
Files, functions, and exact commandsFull tool-call transcripts and raw command dumps
Dead ends only if instructive ("X doesn't work because Y")Every abandoned attempt
How to build / test / runAnything the reader can discover trivially from the repo
Constraints and gotchasSecrets, tokens, credentials, API keys — never write these to the file

Examples

Good — a next step the reader can act on

## Plan / next steps
1. Add a `--brief` branch to `src/cli.ts:parseArgs` — mirror the existing
   `--json` flag handling at line 42. Covered by `tests/cli.test.ts`.
2. Run `pnpm test` and confirm the 3 new brief-mode assertions pass.

Bad — vague, assumes shared context

## Plan / next steps
1. Finish the thing we discussed.
2. Fix the other bit and make sure it works.

Anti-patterns (one-liners)

  • Dumping the raw conversation instead of curating it.
  • Pronouns with no antecedent ("it", "that", "the thing we changed").
  • Writing secrets, tokens, or credentials into the file.
  • Leaving TODO / placeholder text in a section instead of omitting it.
  • Echoing the full handoff back into the chat instead of pointing to the file.

Definition of done

  • Scope stated (full / focused / --brief) before writing.
  • Output path resolved from the git branch, directory created, path reported.
  • Every non-empty section filled from what actually happened this session.
  • No secrets, no placeholders, no raw tool transcripts in the file.
  • Clipboard copy attempted; success or graceful skip reported.
  • One-line pointer (not the whole document) returned to the user.

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.