agentleFS
dazuckdazuck/operator-skills/skills/handoff/SKILL.md

handoff

Skill17 starsChanged 9 months agoMITView on GitHub

Session wrap-up and handoff to next agent. Verifies work, updates docs, creates handoff message, runs pre-mortem.

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

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. 0 are common, 14 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 172 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when wrapping up a work session to ensure continuity for the next session/agent.

    line 8
  2. Distinctive:

    Before context gets too long

    line 13
  3. Distinctive:

    When switching to a different task/project

    line 14
  4. Very specific:

    If there are uncommitted changes and verification passed, use the /commit skill:

    line 32
  5. Very specific:

    Update .claude/project-diary.md (create if missing).

    line 45
  6. Distinctive:

    Decisions: - Add rows to the Decisions Log table:

    line 49
  7. Distinctive:

    Learnings: - Add entries for insights worth preserving:

    line 56
  8. Distinctive:

    Open Questions: - Update the checklist with new/resolved items

    line 67
  9. Distinctive:

    Every minor decision (only significant choices between alternatives)

    line 74
  10. Very specific:

    Update .claude/build-status.md (if exists):

    line 80
  11. Distinctive:

    Create a message using prompting best practices that the user can copy to start a new conversation.

    line 89
  12. Distinctive:

    Keep it short - the next agent has access to all the docs

    line 124
  13. Very specific:

    If you used /commit in Step 1.5, learnings were already captured during that skill's reflection phase.

    line 130
  14. Distinctive:

    Repo-specific learnings: should have been routed to project docs (AGENT.md, CLAUDE.md, etc.)

    line 132
  15. Very specific:

    Cross-cutting learnings: should have been appended to AGENT-LEARNINGS.md at the repo root

    line 133
  16. Very specific:

    If you did NOT use /commit (e.g., no code changes this session), briefly self-reflect:

    line 135
  17. Very specific:

    If yes, append to AGENT-LEARNINGS.md using the format defined there.

    line 140
  18. Distinctive:

    Consider if any of these should be updated:

    line 155
  19. Distinctive:

    If the session involved:

    line 167
  20. Distinctive:

    Keep this section short. Skip entirely if nothing notable.

    line 204
  21. Distinctive:

    Put the handoff message in a code block at the very end.

    line 208

“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

Session Handoff Skill

Use this skill when wrapping up a work session to ensure continuity for the next session/agent.

When to Use

  • End of a significant work session
  • Before context gets too long
  • When switching to a different task/project
  • User says "let's wrap up" or "create a handoff"

Handoff Protocol

Execute these steps in order:

1. Verify Work

- Run tests: `pnpm test` (if tests exist)
- Run build: `pnpm build`
- Run lint: `pnpm lint` (if configured)
- Note any failures for handoff

1.5. Commit Changes

If there are uncommitted changes and verification passed, use the /commit skill:

- Run `/commit` — this handles staging, conventional commit format, AND post-commit reflection
- The commit skill will also surface any learnings from the session
- Note the commit SHA for diary entries
- Do NOT push unless user explicitly requests

This ensures work is preserved and learnings are captured before handoff.

2. Update Project Diary

Update .claude/project-diary.md (create if missing). The diary captures what git cannot.

DO add:

  1. Decisions - Add rows to the Decisions Log table:

    | Timestamp | Decision | Choice | Rationale | Revisit If | Commit |
    | 2024-12-25 14:30 | [title] | [choice] | [why] | [trigger] | abc1234 |
  2. Learnings - Add entries for insights worth preserving:

    ### 2024-12-25 14:30 - [Title]
    [What happened and the insight. 1-3 sentences.]
    
    Optional: Suggested action, relevant commits, links.
    
    ---
  3. Open Questions - Update the checklist with new/resolved items

DO NOT add:

  • Lists of files created/modified (git has this)
  • Quality gate checklists (put in commit message)
  • Session play-by-play (git log has this)
  • Every minor decision (only significant choices between alternatives)

Include timestamps (date + HH:MM) on all entries for correlation with git history.

3. Update Build Status

Update .claude/build-status.md (if exists):

  • Mark completed tasks
  • Update phase status
  • Adjust "Next Actions"
  • Update "Recent Completions"

4. Generate Handoff Message

Create a message using prompting best practices that the user can copy to start a new conversation. The handoff message should treat the receiving agent as a capable leader, not just a task executor.

Prompting Best Practices to Apply:

  1. Define the agent's role and identity - Give them a clear persona (e.g., "project lead", "orchestrator", "senior engineer")
  2. Set behavioral expectations - What does good leadership look like in this context?
  3. Establish non-negotiables - What protocols MUST be followed? (TDD, quality gates, etc.)
  4. Provide clear structure - Numbered priorities, ordered reading list, explicit first actions
  5. Include mindset/philosophy - Why does this work matter? What's the human context?
  6. Define success criteria - What does "done" look like?
  7. Use imperative, direct language - "Start now", "Do this first", not "You might want to..."

Handoff Message Template (streamlined):

You are [ROLE] for [PROJECT] at [PATH].

CONTEXT:
- Current state: [phase, what's working, what's not]
- Recent work: [1-2 sentence summary]
- Key files: [list 2-3 files to read first]

NEXT ACTIONS:
1. [First thing to do]
2. [Second thing]
3. [Third thing]

WATCH OUT FOR:
- [Gotcha or risk from pre-mortem]

Start by reading [specific file].

Key Principles:

  • Keep it short - the next agent has access to all the docs
  • Frontload what's different or non-obvious
  • End with a clear first action

5. Surface Team Learnings

If you used /commit in Step 1.5, learnings were already captured during that skill's reflection phase. Review what was produced:

  • Repo-specific learnings should have been routed to project docs (AGENT.md, CLAUDE.md, etc.)
  • Cross-cutting learnings should have been appended to AGENT-LEARNINGS.md at the repo root

If you did NOT use /commit (e.g., no code changes this session), briefly self-reflect:

  • Any non-obvious insights about the codebase, APIs, or tools?
  • Any gotchas or dead-ends worth documenting?

If yes, append to AGENT-LEARNINGS.md using the format defined there. If no learnings, skip this step.

6. Pre-Mortem Analysis

Ask yourself:

  • What could go wrong when the next agent picks this up?
  • What context might they be missing?
  • Are there any "landmines" in the code?
  • Is any documentation stale or misleading?

Report findings and suggest mitigations.

7. System Improvement Suggestions

Consider if any of these should be updated:

  • Project CLAUDE.md
  • Global ~/.claude/CLAUDE.md
  • Skills
  • Guides in ~/.claude/guides/
  • This handoff skill itself

Propose specific changes if warranted.

8. Consider Documentation for Publication

If the session involved:

  • Significant building or learning
  • Insights worth sharing externally
  • Artifacts that could be shown (code, configs, processes)
  • Decisions or approaches others might benefit from

Suggest running /writeup before closing:

"This session had some learnings that might be worth documenting for your audience. Want to run /writeup before closing?"

The /writeup skill will assess the work and recommend an appropriate format (tweet, thread, week notes, or full blog post).

Output Format

Output should be terminal-friendly (minimal markdown, plain text where possible).

Present in this order:

Part 1: Session Summary (brief)

Work done:

  • What was accomplished (2-3 bullets max)

Handoff housekeeping:

  • Verification results (one line: "Tests: ✓ | Build: ✓ | Lint: N/A")
  • Commits made (SHA + one-line summary)
  • Docs updated (list file names only)

Part 2: Risks & Improvements (if any)

  • Pre-mortem: What could trip up the next agent? (bullets)
  • System improvements: Anything worth changing in CLAUDE.md, skills, etc.?
  • Writeup suggestion: If session had shareable learnings, mention /writeup

Keep this section short. Skip entirely if nothing notable.

Part 3: Go-Forward Prompt (last, easy to copy)

Put the handoff message in a code block at the very end. User should be able to scroll up slightly and copy it cleanly.

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.