handoff

handoff is a command for coding agents from OXI-717/ai-native-toolkit. It costs 16 tokens per session (623 once invoked), scanned A, original, MIT.

A command that saves a compressed summary of the current coding session in a handoff file. The summary records the goal, changed files, decisions, current state, problems, and dependencies.

In plain words
What is it for?
Use it before compacting or clearing a session. It helps carry project context, file changes, unresolved work, and technical decisions into a later session.
Why use it?
It preserves the important context when a session is shortened or cleared. This makes it easier to continue the work without reconstructing what happened.

Command

Part of the context-handoff plugin — 1 skill, 1 command shipped together

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/oxi-717/ai-native-toolkit/handoff
Clone the repo
git clone --depth 1 https://github.com/OXI-717/ai-native-toolkit

Or install context-handoff, the plugin that ships this one along with the rest of its 1 skill, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for handoff

README.md
[![agentmods](https://agentmods.dev/badge/commands/oxi-717/ai-native-toolkit/handoff.svg)](https://agentmods.dev/commands/oxi-717/ai-native-toolkit/handoff)
Your own site
<a href="https://agentmods.dev/commands/oxi-717/ai-native-toolkit/handoff"><img src="https://agentmods.dev/badge/commands/oxi-717/ai-native-toolkit/handoff.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 623 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.00016 $0.00623
Opus 5 $0.00008 $0.00311
Sonnet 5 $0.00003 $0.00125
Haiku 4.5 $0.00002 $0.00062

Measured 4d ago against content hash 79dc54a710d0, 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 4d 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.

plugins/context-handoff/commands/handoff.md · 87 lines

How it starts

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

Compress the current session context into a handoff document. This preserves critical information before compaction.

Instructions

Review the ENTIRE current conversation and create a compressed handoff document.

What to Extract

  1. Goal — what user is trying to accomplish (1-2 lines)
  2. Files Modified — every file path touched, with what changed
  3. Decisions Made — architectural choices, rejected alternatives, reasons
  4. Key Context — project structure, conventions, constraints discovered
  5. Current State — what is done, what remains
  6. Errors/Solutions — issues encountered and how resolved
  7. Dependencies — external tools, APIs, configs involved

Compression Rules (Heavy Density, 60-75% reduction)

  • Imperative mood, present tense, active voice
  • 3-7 words per statement
  • Bullets over paragraphs
  • key: value for named properties
  • Zero redundancy — state each fact once
  • Preserve ALL: identifiers, file paths, values, decisions, causal relationships
  • Use for flows, | for alternatives, ?: for conditions

Output Format

Write to ~/.claude/handoff/<project-hash>/HANDOFF.md where project-hash is cwd with / replaced by -:

# Context Handoff
- session: [session id if available]
- cwd: [working directory]
- branch: [git branch]
- saved: [ISO timestamp]
- method: manual

## Goal
[1-2 lines, compressed]

## Files Modified
- path/to/file — what changed
- ...

## Decisions
- Chose X over Y — reason
- ...

## Key Context
- [compressed bullets of critical information]

## Current State
- Done: [completed items]
- Remaining: [pending items]

## Errors Resolved
- issue → solution
- ...

Steps

  1. Run mkdir -p ~/.claude/handoff/$(pwd | sed 's|/|-|g')
  2. Analyze current conversation context
  3. Compress using rules above
  4. Write HANDOFF.md
  5. Write HANDOFF.meta.json: {"session_id":"...","timestamp":"...","cwd":"...","method":"manual"}
  6. MANDATORY: Confirm to user with this exact format:
Context saved to ~/.claude/handoff/<hash>/HANDOFF.md
- Sections: [list of ## sections written]
- Size: N lines, M bytes
- Method: manual

You can now safely run /compact or /clear.
After compaction, context will be auto-restored from this handoff.

Read the full file on GitHub · 87 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. 4d ago First seen · 87 lines · 16 tokens per session scan A 79dc54a710d0

Subscribe to this mod's changes

handoff is a command published in the GitHub repository OXI-717/ai-native-toolkit (7 stars, last pushed 12d ago), licensed MIT. It adds 16 tokens to every session and 623 once invoked, about $0.0001 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-31.