/handoff:handofffrom handoff
Creates structured session handoff documents so future Claude sessions can resume work seamlessly. Generates timestamped markdown files with current state, failed approaches, key decisions, modified files, blockers, and next concrete steps.
Ships in handoff. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Write a structured resume document that lets the next Claude session understand exactly where this session left off — without needing any of this conversation's context.
Accept an optional free-form <focus> argument. If provided, use it as the
slug (lowercased, spaces replaced with hyphens). If omitted, slug = auto.
$PROJECT_ROOT/.claude/handoffs/<ISO-timestamp>-<slug>.md
For example:
/handoff auth-token-bug → .claude/handoffs/2026-05-25T14-32-00-auth-token-bug.md/handoff → .claude/handoffs/2026-05-25T14-32-00-auto.mdCreate the .claude/handoffs/ directory if it doesn't exist. It should be
gitignored — add /.claude/handoffs/ to .gitignore if not already present.
Write these sections in order. Keep each section tight.
1-2 sentences. Where are we right now? What's working, what's half-done?
Bullet list of failed/abandoned approaches and why each failed. This is the highest-value section — the next session must not re-attempt the same dead ends. If nothing failed, write "Nothing failed — clean path to current state."
Each decision on its own line: Decision — why. No orphan decisions without a reason.
Table or list: file path + one-line note on what changed and why. Be concrete
(src/auth/token.ts — added 24h expiry check, not "changed auth file").
Anything that is genuinely blocked and why. If none, write "None."
A single runnable instruction. Must be one of:
npm test -- auth.test.tssrc/auth/token.ts:142 — implement the refresh logicNOT acceptable: "continue the refactor", "pick up where we left off", "keep going with the auth work".
## Current state
Token refresh is half-implemented. The request path works but the 401-retry
loop in `fetchWithAuth` is not wired up yet.
## What we tried
- Tried intercepting at the axios level (src/api/client.ts) — abandoned
because interceptors run before the token check, causing double-refresh.
- Tried a global event bus approach — too complex, reverted in commit a3f9d2.
## Key decisions
- **Store refresh token in httpOnly cookie** — avoids XSS exposure via
localStorage (OWASP TOP-10 A02).
- **Retry once on 401, then force logout** — prevents infinite loops on
revoked tokens.
## Modified files
- `src/auth/token.ts` — added `refreshAccessToken()`, wires to cookie store
- `src/api/fetchWithAuth.ts` — placeholder for retry logic (TODO at line 58)
- `tests/auth.test.ts` — added 3 token-refresh scenarios, all currently skipped
## Blockers
- `refreshAccessToken()` needs the backend `/auth/refresh` endpoint, which
isn't deployed yet. Ticket: JIRA-4821.
## Next concrete step
Open `src/api/fetchWithAuth.ts:58`, implement the retry wrapper:
`if (res.status === 401) { await refreshAccessToken(); return fetch(req); }`
Then run: `npm test -- --testPathPattern auth`
API_KEY=[retrieve from 1Password vault "project-name dev"] or TOKEN=[set via: aws sso login --profile dev].Before writing the file, verify internally:
Run this to register the handoff for auto-load on next session:
HANDOFF_FILENAME=$(basename "$HANDOFF_PATH")
mkdir -p "$(dirname "$HANDOFF_PATH")"
printf "%s" "$HANDOFF_FILENAME" > "$PROJECT_ROOT/.claude/handoffs/.pending"
Tell the user:
"Handoff written to
.claude/handoffs/<filename>. If you run/clearor start a fresh session within 24 hours, the next session will auto-load it via the SessionStart hook."
Note: if the user has the handoff plugin installed and its load-pending-handoff.mjs
SessionStart hook is active, the handoff will inject automatically. If not,
the user can manually cat .claude/handoffs/<filename> to prime the next session.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jasonm4130/claude-skills --plugin handoff