From handoff
Session handoff for AI continuity. Auto-detects git state, plan files, and environment context, then generates or consumes a HANDOFF.md file so any AI agent can continue the work. Supports three modes: create (full), quick (minimal), and resume (continue from existing handoff).
npx claudepluginhub unctad-eregistrations/plugin-marketplace --plugin handoffThis skill is limited to using the following tools:
Capture session state so any AI agent can continue your work.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Capture session state so any AI agent can continue your work.
This skill operates in three modes, selected by the invoking command:
ls HANDOFF.md 2>/dev/null
If it exists, ask the user: "HANDOFF.md already exists. Overwrite?"
/handoff:resume to continue from the existing handoff, or remove it manually."Gather the following in parallel:
git branch --show-current
git rev-parse HEAD
git status --short
git log --oneline -10
Also check for plan/spec files:
ls docs/superpowers/specs/*.md 2>/dev/null
ls docs/superpowers/plans/*.md 2>/dev/null
If spec or plan files exist, read them to extract:
Check for environment context:
ls CLAUDE.md README.md .env.example 2>/dev/null
If CLAUDE.md or README.md exist, scan them for setup instructions (env vars, dependencies, build commands).
Present the auto-detected state to the user as a summary, then ask each question one at a time. Skip questions where auto-detection already provided the answer.
Compose the handoff document at the repo root. Use this exact structure — omit sections that have no content:
# Handoff: [Title]
> Commit this file to persist it across sessions, or leave it untracked for ephemeral use.
**Generated**: [YYYY-MM-DD HH:MM from `date "+%Y-%m-%d %H:%M"`]
**Branch**: [from git branch]
**Commit**: [short hash from git rev-parse --short HEAD]
**Status**: [from user response]
## Goal
[From spec/plan or user response — one paragraph]
## Completed
- [x] [Items from plan progress or user input]
## Not Yet Done
- [ ] [Items from plan progress or user input]
## Failed Approaches (Don't Repeat These)
[From user response — narrative with error messages and file:line refs]
## Key Decisions
| Decision | Rationale |
|----------|-----------|
| [From user response] | [From user response] |
## Current State
**Working**: [What functions correctly]
**Broken**: [What's failing, with errors and locations]
## Code Context
[From user response — code blocks only]
## Resume Instructions
[Numbered steps with expected outcomes and verification]
## Setup Required
[From README/CLAUDE.md auto-detection + user additions]
## Warnings
[From user response]
Write the file to HANDOFF.md at the repo root.
Tell the user: "Handoff saved to HANDOFF.md. The next agent can pick up with /handoff:resume or by reading the file directly."
Same as create mode — check and prompt for overwrite.
The user's arguments are the goal description. If no arguments provided, ask: "What's the one-liner goal?"
Same git commands as create mode. Also check for plan files to extract completed/remaining items.
Write HANDOFF.md with only these sections:
# Handoff: [Goal summary or branch name]
> Commit this file to persist it across sessions, or leave it untracked for ephemeral use.
**Generated**: [YYYY-MM-DD HH:MM from `date "+%Y-%m-%d %H:%M"`]
**Branch**: [from git branch]
**Commit**: [short hash from git rev-parse --short HEAD]
**Status**: In Progress
## Goal
[From user arguments]
## Completed
- [x] [From plan progress or recent commits]
## Not Yet Done
- [ ] [From plan progress or uncommitted work]
## Resume Instructions
1. [Inferred from git state and plan progress]
No conversational prompts. No failed approaches, decisions, code context, or warnings sections.
Tell the user: "Quick handoff saved to HANDOFF.md."
Use the Read tool to read HANDOFF.md from the repo root.
If the file does not exist, stop with: "No HANDOFF.md found in this directory. Create one with /handoff:create or /handoff:quick."
Compare the handoff metadata against current state:
git branch --show-current
git rev-parse --short HEAD
git rev-list <handoff-commit>..HEAD --count
Where <handoff-commit> is the Commit hash from the HANDOFF.md header.
Check for drift:
feature/auth but current branch is mainIf drift detected, warn the user:
"Drift detected since this handoff was created:
- Branch: [handoff branch] → [current branch]
- Commits: [N] new commits since handoff
The handoff may be outdated. Proceed anyway?"
Wait for confirmation.
Summarize the handoff for the user:
Ask: "Ready to continue?"
Follow the resume instructions one step at a time. After each step:
Do NOT auto-execute all steps. The user controls the pace.