handoff

A command that creates a self-contained summary for giving ongoing work to another coding agent.

In plain words
What is it for?
Use it when moving work between agents such as Codex or Claude Code, especially across sessions.
Why use it?
It removes the need to reconstruct the task, decisions, repository state, and unfinished work from scratch.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/alleneubank/claude-code/handoff
Clone the repo
git clone --depth 1 https://github.com/alleneubank/claude-code
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,324 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.01324
Opus 5 $0.00003 $0.00662
Sonnet 5 $0.00001 $0.00265
Haiku 4.5 $0.00001 $0.00132

Measured 2d ago against content hash 883ddc46c6e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

handoff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/handoff.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 (last 4 hours): !git log --oneline -5 --since="4 hours ago" 2>/dev/null || echo "N/A"

Session Context

Review the conversation history from this session to understand:

  • What task was requested and why
  • What approach was taken
  • Decisions made or tradeoffs discussed
  • Current state: what's done, in progress, or blocked
  • Known issues or incomplete items

Additional Focus

$ARGUMENTS

Task

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.

Core Principle

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.

Prompting Guidelines

  • Be concrete over comprehensive — file paths, function names, shell commands, specific values. Cut anything the agent can learn by reading the code.
  • Link, don't summarize — "See apps/gui-swift/SPEC.md for requirements" beats 20 lines paraphrasing the spec. Only inline details the agent can't find in existing docs.
  • Include constraints — "Only modify files under apps/gui-swift/" and "Do NOT modify packages/core/" prevent damage. State them directly.
  • Front-load the task — the agent should know what to do after reading the first 10 lines.
  • Keep it short — target 60-100 lines. The best handoffs are the shortest ones. If it's over 120 lines, you're probably summarizing things the agent can read themselves.

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 138 lines · 7 tokens per session scan A 883ddc46c6e7

Subscribe to this mod's changes

handoff is a command published in the GitHub repository alleneubank/claude-code (52 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 7 tokens to every session and 1,324 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.