handoff
SkillAI & modelsLets your agent write a handoff prompt so a new agent can pick up where the current session left off.
Then ask your AI: use the handoff skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add it as a step in a pipeline you build on Ahel, or connect Ahel to Claude, ChatGPT, Cursor, Claude Code or Codex and ask your AI to use it.
About this skill
Write a copy-pasteable prompt that hands this session over to another agent, with a summary and this session's ID so the next agent can read the full transcript when it needs detail.
What this skill tells your AI
The instructions your AI receives, as published by babarot/dotfiles in home/skills/handoff/SKILL.md and read by Ahel’s review.
The user wants another agent (a new Claude Code or Codex session, maybe on another machine) to continue the work of this session. Write the prompt they will paste into it. Output it in the chat; do not write a file.
1. Find this session's ID and transcript
- Claude Code: the ID is in
$CLAUDE_CODE_SESSION_ID(this session:${CLAUDE_SESSION_ID}). The transcript is~/.claude/projects/<cwd with every non-alphanumeric character replaced by ->/<id>.jsonl; confirm the path withls. - Codex: use
$CODEX_THREAD_IDif it is set. Otherwise take the newest~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonlwhose first line (session_meta) has this session'scwd; the ID is itspayload.id.
If neither works, say so in the prompt instead of guessing an ID.
2. Write the prompt
A summary, not a transcript: enough for the next agent to start working, with the session ID as the way to dig deeper. Write it in the language the user has been using, addressed to the next agent. Include:
- Goal: what the user wants in the end, and why if it matters.
- Working directory, repository and branch (and worktree, if any).
- Done so far: what changed and where (files, commits, PRs), and what was verified.
- Decisions: what the user chose or ruled out, with the reason, so the next agent does not reopen them.
- Next: the remaining steps, in order, starting with the very next one.
- Open questions and pitfalls: unresolved points, dead ends already tried, anything the user must do by hand (e.g. commands that need sudo).
- Source: the session ID, the agent it ran in, and the transcript path. Tell the next agent it may look up details there only when the summary is not enough: with the claude-recall MCP (
recall_search,recall_export) if it has it, or by reading the transcript file directly.
Leave out secrets and tokens even if they appeared in the session.
3. Output
Put the whole prompt in one fenced code block (use four backticks if it contains a code block) so it can be copied as is.
Also copy the same prompt to the clipboard with pbcopy, through a quoted heredoc so nothing in it is expanded:
pbcopy <<'HANDOFF'
<the prompt>
HANDOFF
Before the code block, add one line saying whether it is on the clipboard (if pbcopy failed, e.g. in a sandbox, say so). Nothing else is needed.
Signals
- GitHub stars
- 781
- Forks
- 92
- Last commit
- Oct 2026
- Hacker News mentions
- 20
Advanced
- Item type
- skill
- Key
handoff-babarot- Source
- github.com/babarot/dotfiles