handoff

A command that records the current work, decisions, problems, changes, and next steps for another conversation or coding agent.

In plain words
What is it for?
Creating a handoff document and updating lasting project notes about architecture, conventions, dependencies, and API changes.
Why use it?
It reduces the need to reconstruct project context after a session ends or the work changes direction.

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/stefan-jansen/claude-code-toolkit/handoff
Clone the repo
git clone --depth 1 https://github.com/stefan-jansen/claude-code-toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,347 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00000 $0.02347
Opus 5 $0.00000 $0.01174
Sonnet 5 $0.00000 $0.00469
Haiku 4.5 $0.00000 $0.00235

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

Security

Grade D, and why

handoff scanned grade D with 2 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find .claude/transitions/ -type f -name "*.md" -mtime -3

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

find .claude/transitions/ -type d -name "2025-*" -mtime +90 -exec rm -rf {} \;
plugins/transition/commands/handoff.md · 312 lines

How it starts

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

Conversation Handoff

Prepare a smooth transition for the next conversation when approaching context limits or switching focus.

Purpose

Creates a structured handoff document that:

  1. Extracts session-specific context for immediate continuation
  2. Updates permanent memory with durable learnings
  3. Prepares clean transition for the next agent

What Gets Created

Transition Document

Location: .claude/transitions/YYYY-MM-DD/HHMMSS.md (UTC timestamps)

Contains:

  • Current Work Context: What was being worked on, why, and current state
  • Recent Decisions: Important choices made this session (not yet in permanent docs)
  • Active Challenges: Current blockers, open questions, debugging context
  • Next Steps: Specific, actionable tasks ready for immediate execution
  • Session-Specific State: File changes, test results, temporary findings

Memory Updates (if needed)

Updates .claude/memory/ files with durable knowledge:

  • project_state.md: Architecture changes, new components
  • conventions.md: Discovered patterns, coding standards
  • dependencies.md: New integrations, API changes

Usage

# Standard handoff - analyzes conversation and creates transition
/handoff

# With specific focus for next session
/handoff "focusing on performance optimization"

# Quick handoff (minimal extraction)
/handoff --quick

Handoff Process

I'll analyze our conversation and execute these steps:

Step 1: Verify Working Directory (CRITICAL)

# ALWAYS check PWD first
pwd

# Verify .claude/transitions/ exists
[ -d ".claude/transitions" ] || echo "ERROR: Wrong directory!"

Stop if not in correct directory - Do not proceed with file creation.

Step 2: Create Transition File

# Get UTC timestamp
UTC_DATE=$(date -u +%Y-%m-%d)
UTC_TIME=$(date -u +%H%M%S)

# Create date directory
mkdir -p ".claude/transitions/$UTC_DATE"

# Create transition file
TRANSITION_FILE=".claude/transitions/$UTC_DATE/$UTC_TIME.md"

Read the full file on GitHub · 312 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 · 312 lines · 0 tokens per session scan D 4d55222be162

Subscribe to this mod's changes

handoff is a command published in the GitHub repository stefan-jansen/claude-code-toolkit (85 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,347 tokens. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.