diff
Show what changed between the current handoff and a past snapshot, section by section. Usage - /handoff-revive:diff [timestamp]
Toggle automatic handoff save (90%/95% triggers) for THIS session — pass on, off, or status
> /plugin marketplace add sofumel/claude-handoff-revive > /plugin install handoff-revive@handoff-revive-marketplace
How it fires
How this command gets triggered: by you, by Claude, or both.
/autoContext preview
What this command does when you run it.
Toggle automatic handoff save (90%/95% triggers) for THIS session — pass on, off, or status
description: Toggle automatic handoff save (90%/95% triggers) for THIS session — pass on, off, or status argument-hint: on | off | status
Toggle the per-session auto-save switch. Auto-save is **enabled by default**; this command lets the user opt out (or back in) for the current session only — new sessions reset to default.
Argument: `$ARGUMENTS` (one of: `on`, `off`, `status`, or empty for `status`)
1. **Resolve and validate the session id.** Use the Bash tool (Linux/macOS/WSL/Git-Bash) OR the PowerShell tool (Windows-only environments) to read and validate `.claude/handoff/.session-id`. Pick whichever shell is available in this environment.
**Bash variant:**
SID=$(cat .claude/handoff/.session-id 2>/dev/null || true)
# Whitelist: only alphanumerics, dashes, and underscores. Defends against
# path traversal (../) or shell metacharacters in case .session-id was
# tampered with. Real Claude Code session_ids are UUIDs; this matches them.
if [ -z "$SID" ] || ! printf '%s' "$SID" | grep -qE '^[A-Za-z0-9_-]+$'; then
echo "ERROR: session id missing or invalid"
exit 1
fi
echo "$SID"**PowerShell variant:**
$sid = (Get-Content .claude/handoff/.session-id -Raw -ErrorAction SilentlyContinue)
if ($sid) { $sid = $sid.Trim().TrimStart([char]0xFEFF) }
# Same whitelist as the bash variant — defense in depth.
if (-not $sid -or $sid -notmatch '^[A-Za-z0-9_-]+$') {
Write-Output "ERROR: session id missing or invalid"
exit 1
}
Write-Output $sidIf the command exits non-zero (empty or invalid), tell the user in their language:
2. **Resolve the action** based on `$ARGUMENTS`:
rm -f ".claude/handoff/sessions/${SID}.disabled" && echo "ENABLED"PowerShell: `Remove-Item ".claude/handoff/sessions/$sid.disabled" -Force -ErrorAction SilentlyContinue; Write-Output "ENABLED"`
Confirm to user in their language (e.g. ja: 「✓ このセッションでの自動保存を有効にしました。90% / 95% で自動保存が走ります。」)
mkdir -p .claude/handoff/sessions && touch ".claude/handoff/sessions/${SID}.disabled" && echo "DISABLED"PowerShell:
New-Item -ItemType Directory -Force -Path .claude/handoff/sessions | Out-Null
New-Item -ItemType File -Force -Path ".claude/handoff/sessions/$sid.disabled" | Out-Null
Write-Output "DISABLED"Confirm: "✓ Auto-save disabled for this session. Use `/handoff-revive:save` to save manually whenever you want. New Claude sessions reset to enabled."
if [ -f ".claude/handoff/sessions/${SID}.disabled" ]; then
echo "DISABLED"
else
echo "ENABLED"
fiPowerShell: `if (Test-Path ".claude/handoff/sessions/$sid.disabled") { "DISABLED" } else { "ENABLED" }` Then report to user:
3. **Always respond in the user's language** (read `.claude/handoff/lang` if it exists, otherwise detect from the user's message). Confirmation patterns:
Resume Claude Code work after rate/usage/context limits without replaying the prior transcript. Auto-saves at 90%/95% usage. Plugin-installable, 10 languages.
Repo: sofumel/claude-handoff-revive
Show what changed between the current handoff and a past snapshot, section by section. Usage - /handoff-revive:diff [timestamp]
Diagnose the handoff-revive installation - toolchain, script pairs, hooks, and current handoff state.
List handoff snapshots in `.claude/handoff/history/` (one is archived automatically on every save).
Preview what the next session will read from `.claude/handoff/current.md` (read-only dry-run, zero-token shell check).
Restore a handoff snapshot from `.claude/handoff/history/` as the current handoff. Usage - /handoff-revive:restore <timestamp>