Handoff

From phatblat/dotfiles · View interactive version

Handoff is an AI agent skill from the GitHub repository phatblat/dotfiles. Use only when explicitly invoked as `$handoff` or when the user explicitly requests a handoff. Commits a durable document giving a fresh agent context to continue the work.

How to use this skill

Skill file

handoff

Create a durable, committed handoff document for a fresh agent to resume the

current work in a new session. Treat it as a replacement for conversation

compaction: the document must let the next agent begin without access to this

chat.

Rules

in the handoff document under Open Questions. The next agent asks them

only when they block progress.

assumptions and recommendations.

output.

commit pre-existing user changes.

Workflow

  1. Inspect the current context in one command where possible:

```bash

git rev-parse --show-toplevel && git branch --show-current && \

git status --short --branch && echo "---DIFF---" && \

git diff --stat && echo "---CACHED---" && git diff --cached --stat && \

echo "---RECENT---" && git log --oneline -5

```

Also inspect the relevant files, issue/PR/ticket context, commands run, and

test results already established in this session. If the current directory

is not a Git repository, write the document but report that it could not be

committed.

  1. Derive a concise lowercase-kebab-case topic from the work being handed off.

Create docs/handoffs/YYYY-MM-DD-<topic>.md. If the topic is unclear, use

docs/handoffs/YYYY-MM-DD-session-handoff.md; do not ask.

  1. Write the document using the template below. Be specific: cite repository

paths, branch names, commit SHAs, commands, and observed outcomes. Include

only sections that have relevant content, except Open Questions,

Confidence, and Start Here, which are always required.

```markdown

# Handoff: <topic>

Created: <ISO 8601 timestamp>

Repository: <absolute repository root>

Branch: <branch>

Base / HEAD: <base if known> / <HEAD SHA>

Status: <clean or exact modified/untracked files>

## Goal

<The requested outcome and success criteria.>

## Start Here

> You are continuing the work described in this handoff. First run the

> verification commands in Current State, read the listed context files,

> then execute Recommended Next Steps. Preserve the recorded decisions;

> revisit them only if new evidence invalidates an assumption. Ask the human

> only the blocking questions in Open Questions.

## Current State

```bash

<safe commands to confirm branch, status, and relevant tests>

```

## Decisions Made

| Decision | Rationale | Do not pursue |

| --- | --- | --- |

| <chosen direction> | <evidence or constraint> | <rejected paths and why> |

## Relevant Context

## Recommended Next Steps

1. <small, ordered, independently verifiable action>

2. <next action, including tests and commit boundaries where applicable>

## Open Questions

impact if unanswered.>

## Confidence

Plan completeness: <high | medium | low> (<0–100>%).

<What is known, what remains uncertain, and what evidence would increase

confidence.>

## Estimate

## Suggested Agent Structure

<Use one agent when the work is sequential or small. For parallelizable work,

name each role, its bounded responsibility, dependencies, and integration

order. State "Not warranted" when a team would add coordination overhead.>

```

  1. Review the document for completeness, factual accuracy, sensitive data, and

actionable next steps. Replace empty template fields with Not applicable

or a concrete open question; do not leave placeholders.

  1. Commit the document without touching other changes:

```bash

git add -- "docs/handoffs/YYYY-MM-DD-<topic>.md"

git commit -m "docs: Add <topic> handoff"

```

If the commit fails because of a hook or repository state, keep the document

written, report the failure and exact remediation, and do not alter unrelated

changes.

  1. Report the document path, commit SHA, confidence level, the first next step,

and every unresolved question.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.