Skill Document

auto-handoff

Claude Code plugin that runs a handoff command after 50 idle minutes, writing a handoff doc while the prompt cache is still warm.

  • 101 GitHub stars

Last verified: write-up checked

auto-handoff — illustration

What it is

auto-handoff is a Claude Code plugin that watches for idle sessions. After 50 minutes without activity (configurable) it runs a handoff command while the one-hour prompt cache is still warm. The bundled skill, /auto-handoff:handoff, writes a markdown file under docs/handoffs/ so a fresh session can resume the work.

Who it's for

  • Claude Code users who leave long sessions idle and want to avoid paying full price to re-read a cold cache
  • Developers who want an automatic written record of goal, status, decisions and next steps when they walk away

Requirements

Requirements

  • Claude Code (developed and tested on 2.1.289)
  • Function hooks plugin API, which is early access and may change between Claude Code releases

Setup

  1. Install the plugin

    Add the marketplace and install the plugin. It loads at the next session start.

    bash
    /plugin marketplace add obie/auto-handoff
    /plugin install auto-handoff@auto-handoff
  2. Configure options (optional)

    Run /plugin configure auto-handoff inside Claude Code, or set values from a shell, for example a custom command.

    bash
    echo '{"command": "my-plugin:my-handoff"}' | claude plugin configure auto-handoff@auto-handoff --values-stdin

Examples

Install from the marketplace

bash
bash
/plugin marketplace add obie/auto-handoff
/plugin install auto-handoff@auto-handoff

What it does: Adds the marketplace and installs the plugin; it takes effect at the next session start.

Use a custom handoff command

bash
bash
echo '{"command": "my-plugin:my-handoff"}' | claude plugin configure auto-handoff@auto-handoff --values-stdin

What it does: Replaces the default auto-handoff:handoff command. The custom command needs allowed-tools or a permissive permission mode to run unattended.

Validate and test during development

bash
bash
claude plugin validate .
claude plugin test .

What it does: Validates the plugin and runs the tests in tests/ against a mocked clock.

Link a local clone for development

bash
bash
git clone https://github.com/obie/auto-handoff ~/projects/auto-handoff
ln -s ~/projects/auto-handoff ~/.claude/skills/auto-handoff

What it does: Claude Code loads the linked folder as auto-handoff@skills-dir at the next session start and reloads the hooks module on file save.

Pros & cons

Pros

  • Pro:Runs the handoff while the cache is warm, avoiding the full-price re-read of a cold cache
  • Pro:Bundled skill writes a structured handoff file (goal, status, decisions, dead ends, files, verification commands, next steps, open questions) and commits nothing
  • Pro:Skips the handoff if the timer fired late, such as after a laptop slept, so it doesn't incur the cost it aims to avoid
  • Pro:Idle time and command are configurable

Cons

  • Con:Built on an early-access hooks API that may change between Claude Code releases
  • Con:The 50-minute default assumes the one-hour cache; the plugin can't detect a five-minute cache, so minutes must be lowered manually
  • Con:The timer lives in the Claude Code process, so it stops when you quit, and the handoff turn itself costs cached reads

Images