agentleFS
stephen-tataristephen-tatari/claude-skills/create-handoff/SKILL.md

create-handoff

Skill0 starsChanged 10 months agoMITView on GitHub

Create session handoff documents in ai_docs/handoffs/ for continuity between coding sessions. Captures current state, recent changes, learnings, and next steps. Use at stopping points or when handing off work.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a structured handoff document for session continuity.

    line 17
  2. Distinctive:

    Before context limits are reached

    line 22
  3. Distinctive:

    When handing off to a different session or environment

    line 23
  4. Distinctive:

    After completion, output the following — substituting the actual absolute path and filename:

    line 134
  5. Very specific:

    IMPORTANT: Use the full absolute path (e.g.

    line 146
  6. Very specific:

    Avoid excessive code snippets: - Prefer /path/to/file.ext:line references

    line 152
  7. Distinctive:

    Handoffs are gitignored by default: - Commit when context is worth preserving

    line 153
  8. Very specific:

    Run /rename <descriptive-name> before ending

    line 159
  9. Distinctive:

    Use full handoff documents for:

    line 162

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

Create Handoff Document

Adapted from humanlayer handoff pattern

Create a structured handoff document for session continuity. The goal is to compact and summarize context without losing key details.

When to Use

  • At natural stopping points in work
  • Before context limits are reached
  • When handing off to a different session or environment
  • End of day or extended break

Process

Step 1: Initialize Directory Structure

First, invoke the init-ai-docs skill to ensure the directory structure exists:

/init-ai-docs

Step 2: Detect Repository and Output Path

# Always use current repo location (works in both worktree and main repo)
FULL_PATH="$(pwd)"
HANDOFF_DIR="ai_docs/handoffs"

Note: Handoffs are gitignored by default. They are ephemeral session context, not permanent documentation.

Step 3: Generate Filename

TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
# description should be brief kebab-case
FILENAME="$HANDOFF_DIR/${TIMESTAMP}_<description>.md"

Example: ai_docs/handoffs/2026-02-02_14-30-45_oauth2-phase2.md

Step 4: Gather Git Metadata

BRANCH=$(git branch --show-current)
COMMIT=$(git rev-parse --short HEAD)
REPO=$(basename $(git rev-parse --show-toplevel))

Step 5: Write the Handoff Document

<!-- Keep in sync: templates also appear in init-ai-docs, init-central-docs, and create-*/SKILL.md -->
---
schema_version: 1
date: [ISO datetime with timezone, e.g., 2026-02-02T14:30:45-08:00]
type: handoff
status: active
topic: "[Feature/Task Name] Implementation"

# Accountability
author: [git-user]              # Human owner (run: git config user.name)
ai_assisted: true
ai_model:                                # optional: which model

# Git context
git_commit: [short hash]
branch: [branch name]
repository: [repo name]

# Classification
tags: [implementation, relevant-components]
---

# Handoff: [Very Concise Description]

## Task(s)

[Task descriptions with status: completed, in progress, planned.
If working from a plan, call out current phase.
Reference plan/research docs with @ai_docs/ prefix.]

## Critical References

[2-3 most important file paths - specs, designs, decisions.
Leave blank if none.]

## Recent Changes

[Recent codebase changes in file:line syntax]

## Learnings

[Important discoveries - patterns, bug root causes, key info.
Include explicit file paths.]

## Artifacts

[Exhaustive list of files produced/updated as paths or file:line refs]

## Action Items & Next Steps

[Prioritized list for next session to accomplish]

## Other Notes

[Additional context - relevant codebase sections, docs, etc.]

Step 6: Create Directory and Save

mkdir -p "$HANDOFF_DIR"
# Write document to $HANDOFF_DIR/${TIMESTAMP}_description.md

Response

After completion, output the following — substituting the actual absolute path and filename:

Handoff created at: /absolute/path/to/ai_docs/handoffs/<filename>.md

Handoffs are gitignored by default. To preserve beyond this session:
git add -f ai_docs/handoffs/<filename>.md && git commit -m "docs: add handoff for <description>"

Resume in a new session with:
/resume-handoff /absolute/path/to/ai_docs/handoffs/<filename>.md

IMPORTANT: Use the full absolute path (e.g. /Users/sprice/code/work/project/ai_docs/handoffs/...). Construct it from $FULL_PATH captured in Step 2.

Key Principles

  • More information, not less - The template is a minimum; add more as needed
  • Be thorough and precise - Include both top-level objectives and lower-level details
  • Avoid excessive code snippets - Prefer /path/to/file.ext:line references
  • Handoffs are gitignored by default - Commit when context is worth preserving

Alternatives

For short breaks (same day), consider named sessions instead:

  • Run /rename <descriptive-name> before ending
  • Resume with claude --resume <name>

Use full handoff documents for:

  • Multi-day breaks
  • Handing to different environments
  • Complex multi-phase work requiring artifact references

Cross-Referencing

Reference other decision records depending on mode:

Local mode — use @ai_docs/ prefix:

Working on Phase 2 of @ai_docs/plans/2026-01-15-oauth2-impl.md
Based on decisions in @ai_docs/research/2026-01-10-auth-options.md

Central mode — use relative sibling paths:

Working on Phase 2 of ../<ai-docs-repo>/plans/2026-01-15-oauth2-impl.md
Based on decisions in ../<ai-docs-repo>/research/2026-01-10-auth-options.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.