cablate

Ctx Handoff Mod — Development skill for Claude Code

Development community

Claude Code mod: auto handoff to a fresh conversation when context hits a threshold, keeps the prompt cache warm while you're away.

How to install Ctx Handoff Mod

This entry records only its repository, not the path inside it, so there is no exact command to give. Open cablate/ctx-handoff-mod and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ctx Handoff Mod does

Claude Code mod: auto handoff to a fresh conversation when context hits a threshold, keeps the prompt cache warm while you're away.

Alternatives in Development

  • Claude Code Tamagotchi — A digital friend that lives in your Claude Code statusline and keeps you company while you build cool stuff 308 ★
  • Ontology Engineer — Use when building, modifying, or validating ontologies 80 ★
  • Brb — Use when the user signals they're stepping away (brb, afk, heading out) — keep working autonomously, skip anyt 52 ★

README

ctx-handoff

[繁體中文](README.zh-TW.md)

A Claude Code mod that hands a long conversation over to a fresh one **automatically**: when the main conversation's context reaches a threshold, it writes a handoff summary, runs `/clear`, and submits the handoff so the new conversation picks up where you left off. While you are away it keeps the prompt cache warm, then saves a handoff instead of clearing. You type no commands in the normal flow.

**Who it's for:** people who run long Claude Code sessions on a 1M-context model with a Claude subscription (1-hour prompt cache). **Status:** experimental. It is built on Claude Code's early-access function-hooks API, which may change between releases. Read [Limitations](#limitations) before relying on it.

What it does

All three paths apply to the main conversation only. Subagent turns are ignored.

When What happens You do
A turn ends and context ≥ 600k (or 80% of the window, whichever is lower) Waits if background shells, workflows or subagents are still running. Otherwise it forks the conversation to write a handoff, then runs /clear and submits the handoff. The new conversation reports what it understood and waits for you. Nothing
You've been idle 55 minutes Forks a tiny request to refresh the prompt cache, up to 3 times (about 4 hours in total). At the 4th point it saves an "away handoff" and does not clear: you're not there, so it doesn't switch conversations on you. Nothing
You come back after an away handoff Holds your first message and asks you to choose. /handoff-resume starts a new conversation with the handoff and your message. /handoff-continue stays in the old one.

Evidence so far:

  • The building blocks were checked live with a probe mod. /clear followed by prompt.submit works from a mod. A fork over a 102k-token conversation read 102,003 of 102,523 input tokens from cache (about 99.5%).
  • claude plugin test: 9/9 pass, covering the thresho