Resume Claude Code work after rate/usage/context limits without replaying the prior transcript. Auto-saves at 90%/95% usage. Plugin-installable, 10 languages.
> /plugin marketplace add sofumel/claude-handoff-revive> /plugin install handoff-revive@handoff-revive-marketplace
Repo: sofumel/claude-handoff-revive
What's inside
When Claude Code shows You've hit your limit · resets ..., the standard recovery — claude --resume or claude -c — reloads the entire prior conversation into context. A medium session typically burns tens of thousands of tokens, often 100k+ for long sessions, before you've asked a single question.
It saves only the minimum needed to continue, structured into .claude/handoff/current.md (~1–3k tokens):
file:line + exact command)To resume, start a new session (don't use --resume). The skill reads only that one file and picks up where you left off.
Plugin install (recommended) — run these inside Claude Code:
/plugin marketplace add sofumel/claude-handoff-revive # 1. register marketplace
/plugin install handoff-revive@handoff-revive-marketplace # 2. install plugin
Skill, slash commands, and hooks auto-activate. No settings.json editing required.
/plugin isn't available in this environment? Your Claude Code version is too old. Check withclaude --versionand update viabrew upgrade claude-code(Homebrew) ornpm update -g @anthropic-ai/claude-code(npm). If you can't update, use the manual install below.
Manual install (always works, no plugin support required):
git clone https://github.com/sofumel/claude-handoff-revive.git
cd claude-handoff-revive
./install.sh /path/to/your-project # Linux/macOS/WSL/Git-Bash
# .\install.ps1 -Target C:\path\to\proj # Windows PowerShell
# Or globally for all projects:
./install.sh --global # .\install.ps1 -Global
For the manual install, optionally enable hooks by merging the snippet from HOOK_SETUP.md into your .claude/settings.json (the plugin install does this automatically).
Should .claude/handoff/ be committed to git? Both work — pick one deliberately:
.claude/handoff/
.claude/handoff/*
!.claude/handoff/current.md
Never commit the dot-marker files (.turn, .usage-flag, …) or history/ — they are machine-local state and snapshot noise.
Quick reference:
| Action | Type this in Claude Code |
|---|---|
| Save handoff | /handoff-revive:save |
| Resume in a NEW session | /handoff-revive:resume |
| Preview what the next session will read | /handoff-revive:preview |
| List saved snapshots | /handoff-revive:list |
| Restore a past snapshot | /handoff-revive:restore <timestamp> |
| Diff current vs a past snapshot | /handoff-revive:diff [timestamp] |
| Post the handoff to a PR as review context | /handoff-revive:share-to-pr [PR] (needs gh) |
| Show save/resume stats | /handoff-revive:stats |
| Diagnose the installation | /handoff-revive:doctor |
| Switch handoffs when changing branch | /handoff-revive:switch |
| Toggle auto-save for this session | /handoff-revive:auto on / off / status |
When sharing to a PR, the body is built from a sanitized copy: the author_email line is removed, absolute project/home paths become <project-root> / ~, and known-prefix API keys/tokens (e.g. sk-, ghp_, AKIA, private-key blocks, JWTs) are scanned — if any are detected the post is aborted (nothing is ever silently redacted). Sanitization is best-effort, not a security guarantee: generic passwords and unprefixed random strings are NOT detected; reviewing the preview remains your responsibility.
In Claude Code, type the following command:
/handoff-revive:save
Behind the scenes, the skill runs these steps automatically (all zero-LLM-token where possible):
git status — you don't have to remember which files you edited.claude/handoff/current.mdWhen the time on resets ... passes, your usage window opens again.
--resume)claude
When the new session starts, the plugin automatically detects the recent handoff. Just run:
/handoff-revive:resume
Claude reads only that one small file and picks up right where you left off — no need to replay the whole conversation.
A periodic reminder to checkpoint. It is off by default — enable it by setting HANDOFF_CHECKPOINT_EVERY to the number of turns between reminders (e.g. 15):
export HANDOFF_CHECKPOINT_EVERY=15
When enabled, every N turns Claude prints:
[handoff-revive] Turn 15 — checkpoint due. Run /handoff-revive:save to save.
The usage-monitor hook (PostToolUse) reads rate_limits.five_hour.used_percentage — the same value that drives Claude Code's "approaching usage limit" notification. When you cross 90%, Claude auto-saves a full handoff before its next response (no asking, no interruption). At 95%, it saves again with an urgent notice.
Per-session opt-out if you don't want auto-save in the current thread:
/handoff-revive:auto off # disable for THIS session
/handoff-revive:auto on # re-enable
/handoff-revive:auto status # show current state + thresholds
/handoff-revive:auto off only affects the current session — a new session is back to ON. To turn auto-save off permanently, set these as environment variables in your shell profile (e.g. add to ~/.zshrc or ~/.bashrc, then open a new terminal):
export HANDOFF_AUTO_SAVE_PERCENT=disabled
export HANDOFF_URGENT_PERCENT=disabled
To shift the thresholds instead of disabling, set HANDOFF_AUTO_SAVE_PERCENT=80 (fires earlier) the same way, or configure them per-hook in settings.json (see HOOK_SETUP.md).
| Method | Tokens replayed to resume |
|---|---|
claude --resume | tens of thousands, often 100k+ |
claude -c | tens of thousands, often 100k+ |
| handoff-revive | 1,000–3,000 |
Every save and resume runs these in pure shell — no extra input, no tokens:
author, branch, base_commit, created_at into the frontmatter, so a teammate (or future you) can see who saved it, on which branch, from which commit. HANDOFF_HIDE_EMAIL=1 omits the email.HANDOFF_STALE_DAYS (default 7; 0 disables) — the age check needs no git, so it works in plain directories too. Purely informational; it never blocks the resume..claude/handoff/history/<timestamp>.md. /handoff-revive:list shows them, /handoff-revive:restore <timestamp> brings one back (non-destructive — the current handoff is archived first), /handoff-revive:diff [timestamp] compares. Snapshots past HANDOFF_HISTORY_RETENTION_DAYS (default 30) are pruned automatically. A snapshot is the structured work state, not the conversation history.They answer different questions — don't write the same thing into both:
| CLAUDE.md | handoff (current.md) | |
|---|---|---|
| Holds | durable project knowledge: conventions, architecture, commands | volatile work state: current goal, WIP, next action |
| Lifetime | months (changes rarely) | hours–days (overwritten per save, snapshotted to history) |
| Loaded | every session, always | only when resuming via /handoff-revive:resume |
Writing work state into CLAUDE.md taxes every future session with stale context; keeping it in the handoff costs nothing until you actually resume. Opt-in helper (appends a one-line guidance comment to CLAUDE.md, idempotent, never edits existing content):
bash .claude/skills/handoff-revive/scripts/setup-claude-md.sh
MIT — see LICENSE.
You've hit your limit · resets ... という制限通知が表示された後、claude --resume や -c で再開すると、それまでの会話履歴がまるごとコンテキストに再ロードされます。中規模のセッションでも数万トークン、長いセッションでは 10 万を超えるトークン分が、まだ何も質問していない段階で消費されてしまいます。
作業の続きに必要な最小限の情報だけを構造化して .claude/handoff/current.md に保存します(約 1〜3k トークン)。保存される項目:
file:line + 具体的なコマンド)再開するときは claude --resume を使わず、新規セッションを起動するだけです。skill がこの 1 ファイルだけを読み込み、すぐに作業を引き継ぎます。
プラグインインストール (推奨) — Claude Code 内で実行:
/plugin marketplace add sofumel/claude-handoff-revive # 1. マーケットプレイス登録
/plugin install handoff-revive@handoff-revive-marketplace # 2. プラグインインストール
Skill・スラッシュコマンド・hook がすべて自動で有効化されます。settings.json の編集は不要。
FAQ
claude-handoff-revive is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes handoff-revive. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it