Relay
Use this skill when the user says "handoff", "create a handoff", "save session context", "generate a handoff document", "I need to switch agents", "context is getting full", "prepare for compaction", "summarize session for handoff", "save my progress", "export session", or asks how to resume work with another AI agent (Claude, Codex, Gemini, Copilot, etc.). Also use when the user asks where handoff files are saved, how the automatic 90% handoff works, or how to change the threshold. This skill belongs to the Relay plugin.From its SKILL.md
npx -y skills add pushkargrover/relay --skill relayAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.4 KB, as published. Nobody here has run it
Relay Skill
Relay generates structured session handoff documents so work can be resumed seamlessly by any AI agent.
Automatic Behavior
The plugin checks context on every user turn by reading the real token count from the session transcript. When it reaches the token budget (default 150,000 tokens), it instructs Claude to write a handoff document before continuing, once per session. Relay uses an absolute token budget rather than a percentage because the true context window isn't exposed to hooks and varies by model.
For long single turns that never return to a prompt boundary, a throttled mid-task check runs after tool calls and fires at a higher emergency budget (default 190,000 tokens). A PreCompact backstop also fires right before compaction — this is the reliable near-full signal for any model, since Claude Code knows the true window.
On Pro/Max accounts, Relay also watches your 5-hour plan usage: at the end of each turn it reads rate_limits.five_hour.used_percentage from the Stop-hook payload and writes a handoff when it reaches RELAY_PLAN_THRESHOLD (default 90%), so a rate-limit lockout never catches you without a handoff. If the user asks about tracking their plan/subscription usage or the 5-hour limit, this is the relevant feature.
Save locations:
- Inside a project:
<project-root>/handoffs/handoff-YYYY-MM-DD-HHMMSS.md - Session without a project (cwd is the home directory):
~/.claude/handoffs/handoff-YYYY-MM-DD-HHMMSS.md
Changing the Threshold
Set RELAY_TOKEN_THRESHOLD (turn-boundary budget, default 150000 tokens) and/or RELAY_EMERGENCY_TOKEN_THRESHOLD (mid-task budget, default 190000). Keep the emergency value higher. On a big-window model, raise both. Set per-machine in settings.json:
{ "env": { "RELAY_TOKEN_THRESHOLD": "120000", "RELAY_EMERGENCY_TOKEN_THRESHOLD": "180000" } }
Manual Invocation
Run /handoff at any time, optionally with a custom output path:
/handoff
/handoff path/to/my-handoff.md
Handoff Document Sections
Every handoff contains these 8 sections:
- Session Goal: what was being accomplished
- Decisions Made: choices with rationale (the WHY)
- Work Completed: files changed, commands run
- Current State: what works right now
- Open Questions / Blockers: unresolved issues
- Next Steps: ordered, concrete next actions
- Key File Paths: files to read immediately when resuming
- Instructions for Next Agent: conventions, warnings, non-obvious context
Local Mode (Ollama) — Lockout Recovery
Relay can also generate a handoff with a local model via Ollama, using zero Anthropic tokens — useful when the account is rate-limited/locked out and Claude can't write the handoff itself.
- Automatic on lockout: if Relay sees a rate-limit
429in the transcript, it spawnsrelay-recoverin the background so the local model writes the handoff without any user action (requires Ollama; disable withRELAY_AUTO_RECOVER=0). - After a lockout (manual), the user runs the standalone script in a terminal (no Claude needed):
relay-recover.ps1(Windows) orrelay-recover.py(mac/Linux). Flags:--list, a bare index,--session <id>,--model <name>,--out <path>. - Before a lockout, the
/handoff-localcommand does the same local synthesis on demand. - Requires Ollama installed with a model pulled (e.g.
ollama pull gemma4). Model viaRELAY_OLLAMA_MODEL, endpoint viaRELAY_OLLAMA_URL.
If the user asks how to recover work after hitting their limit, or how to make a handoff without spending tokens, point them to local mode.
Resuming From a Handoff
Tell any AI agent:
Read handoffs/handoff-2026-07-03-143022.md and continue the work described there.
The handoff format is agent-agnostic. It works with Claude Code, Codex, Gemini, Copilot, or any LLM-based coding assistant.