Generates self-contained handoff prompt for AI agents with git context, session summary, and optional focus, saving to ~/.handoffs/.md file.
npx claudepluginhub 0xbigboss/claude-codeoptional focus area or additional notes# Generate Teammate Handoff Prompt Generate a prompt for handing off work to another AI agent (Codex, Claude Code). The receiving agent has no context from this session, so the prompt must be self-contained and actionable. ## Git Context **Working Directory**: !`pwd` **Repository**: !`git rev-parse --show-toplevel 2>/dev/null || echo "Not a git repository"` **Branch**: !`git branch --show-current 2>/dev/null || echo "N/A"` **Uncommitted changes**: !`git diff --stat 2>/dev/null || echo "N/A"` **Staged changes**: !`git diff --cached --stat 2>/dev/null || echo "N/A"` **Recent commits (...
/handoffGenerates a structured markdown handoff document summarizing git status, commits, uncommitted changes, session learnings, progress, and next steps. Saves to ~/.pro-workflow/handoffs/. Supports --full and --compact modes.
/handoffEnds swarm session: summarizes work/blockers, persists state via hivemind_store and git, cleans agents/tasks/reservations, updates hive, generates handoff note.
/handoffGenerates a developer handoff package for the specified screen, feature, or component, including visual specs, interaction specs, QA checklist, assets, and notes.
/handoffSaves session state snapshot as structured JSON to docs/tasks/<branch>/session_logs/<timestamp>_handoff.json, capturing git status, progress summary, tasks, and context for resume.
/handoffCreates a detailed handoff plan summarizing conversation, technical details, code, decisions, and next steps for continuing work in a new session.
/handoffCreates handoff branch from main, scratchpad with analysis/plan/files/testing, PR, roadmap entry, and copy-paste worker prompt for task delegation.
Generate a prompt for handing off work to another AI agent (Codex, Claude Code). The receiving agent has no context from this session, so the prompt must be self-contained and actionable.
Working Directory: !pwd
Repository: !git rev-parse --show-toplevel 2>/dev/null || echo "Not a git repository"
Branch: !git branch --show-current 2>/dev/null || echo "N/A"
Uncommitted changes: !git diff --stat 2>/dev/null || echo "N/A"
Staged changes: !git diff --cached --stat 2>/dev/null || echo "N/A"
Recent commits (last 4 hours): !git log --oneline -5 --since="4 hours ago" 2>/dev/null || echo "N/A"
Review the conversation history from this session to understand:
$ARGUMENTS
Write a handoff prompt to ~/.handoffs/handoff-<repo>-<shortname>-<timestamp>.md where:
<repo> is the repository name (or directory basename if not a git repo)<shortname> is derived from the branch name, or use main if not in a git repo<timestamp> is the current date/time as YYYYMMDD-HHMM (e.g., 20260303-1430)Examples: handoff-myapp-sen-69-20260303-1430.md, handoff-api-fix-auth-20260303-0915.md
The prompt must be standalone and actionable for an agent with zero prior context.
Describe what the agent should type, not what process they should follow. Include file paths, function names, commands, and concrete values. Don't describe architectures the agent can read from the code. Link to specs and docs instead of summarizing them.
apps/gui-swift/SPEC.md for requirements" beats 20 lines paraphrasing the spec. Only inline details the agent can't find in existing docs.apps/gui-swift/" and "Do NOT modify packages/core/" prevent damage. State them directly.Use plain markdown (not XML tags). Follow this structure:
# [1-line task summary — what to do, not what role to play]
[2-4 sentences: what exists, why, key decisions already made]
## What's done
- [Bulleted list of completed work]
## What to do
### 1. [First concrete task]
[Details: file paths, function names, expected behavior, example values]
### 2. [Second concrete task]
[Details]
### 3. [Continue as needed]
## Key files
- `path/to/file.ts` — what it does / why it matters
- `path/to/other.ts` — what it does
## Spec
[OPTIONAL — include only if a spec exists. Link to the file, don't repeat its contents.]
## Verify
[Exact commands to run to confirm the work is done]
```bash
command-to-build
command-to-test
command-to-check-scope
[OPTIONAL — things that will trip you up if you don't know them. Examples:
git stash@{0} — pop after committing"@MainActor annotation"DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer prefix"[OPTIONAL — hard boundaries. Examples:
apps/gui-swift/"packages/core/ or packages/proto/"
### Anti-Patterns to Avoid
- **Prose architecture summaries** — if there's a README or SPEC, link it
- **"Read these files first" as a step** — key files section serves this purpose
- **Role paragraphs** — "You are a senior engineer..." doesn't help; a clear task summary does
- **Repeating spec contents** — link to the spec file instead
- **Process descriptions** — "apply the delivery flow gates" is vague; "write tests for X, then run `swift test`" is concrete
- **Over 120 lines** — if the handoff is this long, split into smaller handoffs or link to existing docs
### Output Method
1. Ensure directory exists: `mkdir -p ~/.handoffs`
2. Write the handoff prompt to `~/.handoffs/handoff-<repo>-<shortname>-<timestamp>.md`
3. Generate the timestamp using: `date +%Y%m%d-%H%M`
4. Confirm with the path: "Handoff saved to `~/.handoffs/<filename>`"