Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/sofumel/claude-handoff-reviveWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/sofumel/claude-handoff-revive/auto)<a href="https://agentmods.dev/commands/sofumel/claude-handoff-revive/auto"><img src="https://agentmods.dev/badge/commands/sofumel/claude-handoff-revive/auto/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sofumel/claude-handoff-revive/auto"><img src="https://agentmods.dev/badge/commands/sofumel/claude-handoff-revive/auto.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.01421 |
| Opus 5.5 | $0.00010 | $0.00568 |
| Sonnet 5.5 | $0.00005 | $0.00284 |
| Haiku 4.5 | $0.00002 | $0.00142 |
Grade B, and why
auto scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
SID=$(cat .claude/handoff/.session-id 2>/dev/null || true) How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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)
How to handle
-
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:
- "Session ID not yet captured. Make sure the SessionStart hook is enabled (see HOOK_SETUP.md). Try again after one Claude turn."
- And stop. Do NOT proceed to step 2.
-
Resolve the action based on
$ARGUMENTS:-
on— Re-enable auto-save for this session: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% で自動保存が走ります。」)
-
off— Disable auto-save for this session only: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:saveto save manually whenever you want. New Claude sessions reset to enabled." -
status(or empty) — Report current state: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:- State: ENABLED / DISABLED
- Effective thresholds (read env vars
HANDOFF_AUTO_SAVE_PERCENT,HANDOFF_URGENT_PERCENT; defaults 90 / 95) - Reminder: "New Claude sessions start ENABLED by default."
- If both env vars are
disabled, mention that auto-save is also globally disabled regardless of session toggle.
-
Anything else: tell the user usage is
/handoff-revive:auto on | off | status.
-
-
Always respond in the user's language (read
.claude/handoff/langif it exists, otherwise detect from the user's message). Confirmation patterns:- ja: 「✓ このセッションでの自動保存を{有効|無効}にしました。」
- en: "✓ Auto-save {enabled|disabled} for this session."
- zh: "✓ 已为本会话{启用|禁用}自动保存。"
- zh-TW: 「✓ 已為本會話{啟用|停用}自動儲存。」
- ko: "✓ 이 세션에서 자동 저장 {활성화|비활성화}."
- es: "✓ Auto-guardado {activado|desactivado} para esta sesión."
- pt: "✓ Auto-save {ativado|desativado} para esta sessão."
- de: "✓ Auto-Save für diese Sitzung {aktiviert|deaktiviert}."
- fr: "✓ Auto-sauvegarde {activée|désactivée} pour cette session."
- tr: "✓ Bu oturum için otomatik kayıt {etkinleştirildi|devre dışı bırakıldı}."
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 101 lines · 24 tokens per session scan B 740f331ea7e4
auto is a command published in the GitHub repository sofumel/claude-handoff-revive (8 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,421 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
remember
Save the current session to persistent context memory.
recall
Search past sessions stored in context memory.
land
Resolve and squash merge one named, currently authorized pull request.
sync
Manually trigger plan-sync to update downstream task specs after implementation drift.
analyze-context
USE WHEN you want to analyze project context before starting work on a task. Calls context + recall, then synthesizes goals, decisions, gotchas, and relevant memories into a pre-task brief.
uninstall
Remove flow-next files from project.