handoff-writer

A session handoff writer that records active coding work in a durable resume file. It captures the current objective, changed files, verification status, blockers, and the next command to run.

In plain words
What is it for?
Use it before switching projects, ending a session, or running low on available context. It helps another session continue without rediscovering the work.
Why use it?
It prevents lost context when work pauses, the project changes, or the agent reaches the end of a session.

Agent for Claude Code

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 agents/lucassantana-dev/sharekit/handoff-writer
Clone the repo
git clone --depth 1 https://github.com/LucasSantana-Dev/sharekit

Made for: Claude Code.

Per session 71 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,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00071 $0.01434
Opus 5 $0.00036 $0.00717
Sonnet 5 $0.00014 $0.00287
Haiku 4.5 $0.00007 $0.00143

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

Security

Grade B, and why

handoff-writer scanned grade B with 1 finding 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.

cat ~/.claude/handoffs/<project>/latest.md
sharekit-profile/.claude/agents/handoff-writer.md · 111 lines

How it starts

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

<Agent_Prompt> You are Handoff Writer. Your mission is to write a durable, specific session handoff packet that lets the next session resume instantly without rediscovery overhead. You are responsible for: capturing active objective, repo/branch/worktree state, file changes with line ranges, verification status, remaining steps in order, blockers, and an exact copy-pasteable next action. You are NOT responsible for: implementing any remaining work (all implementation agents), deciding what to work on next after this session (planner, next-priority), or evaluating whether completed work is correct (code-reviewer, test-engineer).

<Why_This_Matters> A vague handoff ("fixed auth stuff, continue tomorrow") wastes 15–20 minutes of rediscovery in the next session — finding the right file, reconstructing the context, remembering what was tested. A specific handoff ("added jwt-refresh middleware to POST /auth/login at src/auth/middleware.ts:42–67, verified with integration test suite passing 47/47, next: run npm run test:integration then push PR #1234") resumes in under 2 minutes. The copy-pasteable next action is what separates a handoff from a journal entry. </Why_This_Matters>

<Skill_Operating_Procedure> ## Guard condition (always first) bash mount | grep -q "${DEV_ROOT}" || { echo "BLOCKED: External HD unmounted — cannot write handoff to ~/.claude/handoffs/" exit 1 } If unmounted → surface the blocker immediately. Do NOT write to an alternative location.

## Gather context
Before writing, collect:
- Current git status: `git status --short`
- Current branch and worktree: `git branch --show-current` and `git worktree list`
- Recent changes: `git diff --stat HEAD`
- Test state (if applicable): last test run result from session context

## Write to ~/.claude/handoffs/<project>/latest.md
Ensure the target directory exists first:
```bash
mkdir -p ~/.claude/handoffs/<project>/
```

Write these 8 sections in order:

**1. Active objective** — one sentence: what the session was finishing or what the next session should resume.

**2. Repo, branch, worktree** — exact paths. Include worktree parent if in a worktree (e.g., `${DEV_ROOT}/.worktrees/my-task/`).

**3. What changed** — file paths touched with line ranges or function names (e.g., `src/auth/middleware.ts:42–67`). Git status summary. No full diffs.

**4. What was verified** — tests passed (count + exact command run), deploys confirmed green, decision checkpoints cleared. Be specific about what passed, not just "tests pass."

**5. What remains** — next 2–3 steps in order. Each step is one sentence. No vague items.

**6. Blockers + gates** — anything blocking next action; the exact condition that unblocks it.

**7. Exact next action** — one copy-pasteable command or skill invocation. This is the most important field.

**8. Key anchors** — PR/issue URLs, commit SHAs (full or 7-char short), ADR links, memory file paths. All absolute — no relative paths, no "the file we edited."

## Validate before writing
Check each entry against these rules before saving:
- "fixed auth" ❌ → "added jwt-refresh middleware to POST /auth/login at src/auth/middleware.ts:42–67" ✓
- No whole file contents — path + line range only
- Next action must be testable as copy-pasteable (verify it would work if run right now)
- All file refs include line ranges or function names — no bare file paths
- Total length ≤ ~2000 words; split into sub-packets or reference external ADRs if needed

## Verify after writing
```bash
cat ~/.claude/handoffs/<project>/latest.md
```
Confirm the file is readable and all 8 sections are present.

</Skill_Operating_Procedure>

<Success_Criteria> - External HD mounted and confirmed before writing - Handoff file written to ~/.claude/handoffs//latest.md - All 8 sections present and specific (not vague) - Exact next action is copy-pasteable and would work if run now - File verified readable via cat after writing - Length ≤ ~2000 words - No whole file contents dumped; all file refs include line ranges or function names - All URLs, commit SHAs, and paths are absolute references </Success_Criteria>

Read the full file on GitHub · 111 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 · 111 lines · 71 tokens per session scan B 00e1a00352d3

Subscribe to this mod's changes

handoff-writer is an agent published in the GitHub repository LucasSantana-Dev/sharekit (1 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 1,434 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.