SLOPSHOPPER

handoff-pickup

Picks up your newest handoff with /pickup, and deletes it when you're done

commandpromptprocess
★ 1v0.3.0MITupdated 2026-10-26Spardutti/claude-mods/plugins/handoff-pickup
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · handoff-pickup
› fix the failing auth test and add an audit log call ⏺ Read(src/auth.ts) ⎿ Read 6 lines ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(bun test) ⎿ 3 pass, 1 fail ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM › /pickup ⎿ handoff-pickup: No handoff waiting in .claude/handoffs. ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts
README

claude-mods

Little mods for Claude Code: panels that keep the stuff you'd normally go check next to the chat, and helpers that do the chores for you.

Claude Code 2.1.287+ mods: 5 License: MIT

Why

You spend all day in Claude Code. But the small stuff keeps pulling you out of it: checking git, rescuing a session that got too long, doing the same cleanup by hand.

These mods put that stuff inside Claude Code. Some draw a live panel next to the chat. Some do a chore for you at the right moment. You keep your eyes on the work.

Each one installs on its own, so you take only what you want.

Get started

Add the marketplace once, then install a mod:

/plugin marketplace add spardutti/claude-mods
/plugin install branch-status@spardutti-mods
/plugin install auto-handoff@spardutti-mods
/plugin install handoff-pickup@spardutti-mods
/plugin install blocked-run@spardutti-mods
/plugin install dev-apps@spardutti-mods

Install any you like. Each one starts working on the next session start.

The mods

Each mod has its own page with the full story.

ModWhat it does
branch-statusA panel with your branch, develop and main as a tiny git-flow graph, so you see what's waiting to ship without running git log.
auto-handoffWhen the context gets too full, it warns you, counts down, then hands the work to a fresh session.
handoff-pickup/pickup picks up your newest handoff, /pickup done deletes it.
blocked-runWhen auto mode blocks a command, it shows above the prompt with a button to run it yourself.
dev-appsUnder the Git panel: this project's apps, a link to open each, and Start and Stop. Stops them when you close Claude.
/plugin marketplace update spardutti-mods
/plugin update branch-status@spardutti-mods
/plugin update auto-handoff@spardutti-mods
/plugin update handoff-pickup@spardutti-mods
/plugin update blocked-run@spardutti-mods
/plugin update dev-apps@spardutti-mods
/reload-plugins
Source 2 files
hooks/register.tsx 73 lines
1import type { EngineInterface, Register } from 'claude-code'
2
3import { handoffFiles, handoffTitle } from './waiting'
4
5const COMMAND = 'pickup'
6
7// Module state, not $.state: /clear keeps this module loaded, and the pick belongs to this session.
8let pickedUp: string | undefined
9let cwd = ''
10
11// Kept in $.store so a reload or another session skips a handoff already being worked from.
12const pickKey = (path: string) => `picked:${cwd}/${path}`
13
14async function markPicked($: EngineInterface, path: string) {
15  pickedUp = path
16  await $.store.set(pickKey(path), true)
17}
18
19async function unpickedHandoffs($: EngineInterface, folder: string) {
20  const entries = await $.fs.list(folder).catch(() => [])
21  const picked = new Set(await $.store.keys())
22  return handoffFiles(entries).filter(e => !picked.has(pickKey(`${folder}/${e.name}`)))
23}
24
25async function pickUp($: EngineInterface, folder: string) {
26  const [newest] = await unpickedHandoffs($, folder)
27  if (!newest) return { text: `No handoff waiting in ${folder}.` }
28  const path = `${folder}/${newest.name}`
29  const doc = await $.fs.read(path).catch(() => undefined)
30  if (doc === undefined) return { text: `No handoff waiting in ${folder}.` }
31  const title = handoffTitle(newest.name, doc)
32  await markPicked($, path)
33  return {
34    text: `Picked up: ${title}. Send any message to start.`,
35    context: [`Read ${path} and continue from it. When the work is done, tell the person to run /pickup done to delete it.`],
36  }
37}
38
39async function finish($: EngineInterface) {
40  const path = pickedUp
41  if (!path) return { text: 'Nothing picked up in this session. Run /pickup first.' }
42  const { exitCode } = await $.process.run(['rm', '--', path])
43  if (exitCode !== 0) return { text: `Could not delete ${path}.` }
44  pickedUp = undefined
45  await $.store.delete(pickKey(path))
46  return { text: `Deleted ${path}.` }
47}
48
49export const register: Register = (on, options) => {
50  const folder = String(options.folder).replace(/\/+$/, '')
51  const resumed = new RegExp(`^Read (${folder.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}/[\\w-][\\w.-]*\\.md) and continue\\.(?:\\n|$)`)
52
53  on('session.start', async ($, e, next) => {
54    cwd = e.cwd
55    await $.command.register({ name: COMMAND, description: 'Pick up the newest handoff, "/pickup done" to delete it' })
56    return next(e)
57  })
58
59  on('command.run', { command: COMMAND }, async ($, e) => {
60    const arg = e.args.trim()
61    if (arg === 'done') return finish($)
62    if (arg) return { text: `Unknown: ${arg}. Run /pickup, or /pickup done.` }
63    return pickUp($, folder)
64  })
65
66  // auto-handoff resumes with this exact prompt, so its handoff counts as picked up here.
67  on('prompt.submit', async ($, e, next) => {
68    const path = e.text.match(resumed)?.[1]
69    if (path) await markPicked($, path)
70    return next(e)
71  })
72}
73
hooks/waiting.ts 13 lines
1export type Entry = { name: string; kind: string; mtimeMs: number }
2
3export function handoffFiles(entries: readonly Entry[]): Entry[] {
4  return entries
5    .filter(e => e.kind === 'file' && e.name.endsWith('.md'))
6    .sort((a, b) => b.mtimeMs - a.mtimeMs)
7}
8
9export function handoffTitle(name: string, doc: string): string {
10  const subject = doc.match(/^#\s*Handoff\s*[—–-]\s*(.+)$/m)?.[1]?.trim()
11  return subject || name.replace(/\.md$/, '').replace(/^\d{4}-\d{2}-\d{2}-/, '')
12}
13