Session Handoff Document
thedotmack/claude-mem
Writes a HANDOFF.md capturing goal, state, files, failed attempts and next steps so a fresh agent session can continue exactly where this one stopped.
Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context.
$ npx skills add espennilsen/pi --skill handoff -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install espennilsen/pi handoff --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/handoff .claude/skills/handoff && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .claude/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/espennilsen/pi/tree/main/skills/handoffType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add espennilsen/pi --skill handoff -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install espennilsen/pi handoff --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/handoff .agents/skills/handoff && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .agents/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add espennilsen/pi --skill handoff -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install espennilsen/pi handoff --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/handoff .cursor/skills/handoff && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .cursor/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/espennilsen/pi.git --path skills/handoff--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add espennilsen/pi --skill handoff -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install espennilsen/pi handoff --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/handoff .gemini/skills/handoff && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .gemini/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install espennilsen/pi handoffInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add espennilsen/pi --skill handoff -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/handoff .github/skills/handoff && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .github/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add espennilsen/pi --skill handoff -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install espennilsen/pi handoff --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/handoff .opencode/skills/handoff && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "handoff" agent skill from https://github.com/espennilsen/pi/tree/main/skills/handoff into .opencode/skills/handoff/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handoff", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
handoffGenerate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context.
Handoff is an agent skill from espennilsen/pi. Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context. The prompt captures everything a new agent needs: project, goal, progress, decisions, current state, and remaining work. Triggers — use this skill when: - User says "handoff", "hand off", "hand-off" - User asks to "generate a continuation prompt" - User says "give me a prompt to continue this" - User asks to "wrap up for a new session" - User says "context transfer", "session transfer" -…
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 79d019b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Handoff loads about 1.4k tokens when it runs. Until then it costs about 153 tokens; SKILL.md has 464 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from espennilsen/pi at commit 79d019b, republished under its MIT licence (© espennilsen). 464 words, ~1,359 tokens.
.claude/skills/handoff/SKILL.md (or your agent's skills folder).Generate a self-contained prompt that a fresh coding agent (with zero prior context) can use to seamlessly continue the current work.
Context is expensive. When a session hits its limit, or you want to switch tools, the work-in-progress knowledge shouldn't evaporate. A good handoff prompt is:
Collect facts from the codebase. Do not rely on conversation memory alone — verify against the filesystem.
# Project identity
basename $(pwd)
git remote -v 2>/dev/null | head -2
# Branch and recent work
git branch --show-current 2>/dev/null
git log --oneline -10 2>/dev/null
# Uncommitted changes (critical for handoff)
git status --short 2>/dev/null
git diff --stat 2>/dev/null
# Stashed work
git stash list 2>/dev/null
# Any running processes or dev servers the user should know about
# (mention if relevant to the task)Review the conversation to extract:
| Element | Question to answer |
|---|---|
| Goal | What is the user ultimately trying to accomplish? |
| Scope | What specific task was this session focused on? |
| Completed | What has been done? (commits, files created/edited, commands run) |
| In-progress | What was being worked on when the handoff was requested? |
| Remaining | What still needs to be done? |
| Decisions | What architectural or design choices were made and why? |
| Blockers | Any issues, bugs, or unknowns that the next session should know about? |
| Key files | Which files are most relevant to the current task? |
Produce a single Markdown code block containing the prompt. The user copies this into their next session.
Use this structure. Adapt and omit sections as needed — a trivial task doesn't need architectural decisions. The prompt should be as short as possible while remaining complete.
```
Project: <name> — <one-line description>
Path: <absolute path to project root>
Branch: <current branch>
## Goal
<What the user is trying to accomplish — the big picture.>
## Context
<Brief project context the new agent needs. Tech stack, relevant architecture,
anything non-obvious about the codebase.>
## What's Been Done
- <Completed item 1 — be specific: files changed, commits made>
- <Completed item 2>
- ...
## Current State
<What state is the codebase in right now? Clean? Dirty files? Failing tests?
Mention uncommitted changes explicitly — the new agent should not accidentally
discard or duplicate work.>
Dirty files:
- <path/to/file — what was changed and why>
- ...
## What's Left
1. <Next concrete step — this is what the new agent should do first>
2. <Subsequent step>
3. ...
## Key Decisions
- <Decision 1: what was chosen and why>
- <Decision 2>
## Key Files
- `<path>` — <why this file matters for the current task>
- `<path>` — <description>
## Gotchas
- <Anything surprising, non-obvious, or easy to get wrong>
```pi-heartbeat settings block to settings.json.example with all 6 fields"Uncommitted changes are the most fragile part of a handoff. List every dirty file with a brief note on what changed. If there's a large diff, summarize the intent rather than listing every line.
The first item under "What's Left" should be an unambiguous instruction the new agent can act on immediately. Not "continue the refactor" but "refactor src/parser.ts to use the new TokenStream class — the interface is defined in src/types.ts:42".
package.json etc.pbcopy or write to .handoff.md© espennilsen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/handoff of espennilsen/pi.
Open the folder on GitHubat commit 79d019b
Handoff next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Handoff this skillespennilsen/pi | 122 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Session Handoff Documentthedotmack/claude-mem | 98k | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Handoffnexu-io/open-design | 100k | — | ~547 | Automated safety check: Pass | Apache-2.0 | |
| Handoffalirezarezvani/claude-skills | 28k | — | ~2.5k | Automated safety check: Notes | MIT | |
| Handoffalirezarezvani/claude-skills | 28k | — | ~532 | Automated safety check: Pass | MIT | |
| Session Handoff Writercodewhale-hq/Codewhale | 41k | — | ~1.2k | Automated safety check: Pass | MIT |
thedotmack/claude-mem
Writes a HANDOFF.md capturing goal, state, files, failed attempts and next steps so a fresh agent session can continue exactly where this one stopped.
nexu-io/open-design
Push the run's accepted artifact to a downstream collaboration surface (cli, other code agents, cloud, desktop) and stamp the artifact manifest with the export target.
alirezarezvani/claude-skills
Compact the current conversation into a handoff document for another agent to pick up.
alirezarezvani/claude-skills
Compact the current conversation into a handoff document for another agent to pick up.
codewhale-hq/Codewhale
Writes a compact handoff note from real git and CI state so the next session or a teammate can pick up the work without rebuilding the context.
sickn33/agentic-awesome-skills
A skill your agent uses when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.
espennilsen/pi
Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.
espennilsen/pi
Create, review, and improve skills for Pi agents. An agent skill from espennilsen/pi.
espennilsen/pi
Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.
espennilsen/pi
Reverse-engineer a design system from a live website (public URL or localhost).
espennilsen/pi
A skill your agent uses when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.
espennilsen/pi
Read and extract content from PDF files — text, tables, metadata, and images.
Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context. Handoff is an agent skill from espennilsen/pi. Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context.
Handoff fits situations like: — use this skill when: - User says handoff; session transfer - User asks how do I pick this up later - User wants to pass this to another agent.
Run `npx skills add espennilsen/pi --skill handoff -a claude-code`. Or copy the skill folder (skills/handoff in espennilsen/pi) into .claude/skills/handoff in your project. Claude Code loads it when a task matches its description.
Run `npx skills add espennilsen/pi --skill handoff -a codex`. Or copy the skill folder (skills/handoff in espennilsen/pi) into .agents/skills/handoff in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add espennilsen/pi --skill handoff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/handoff, .gemini/skills/handoff, .github/skills/handoff and .opencode/skills/handoff in your project.
Going by SKILL.md and its folder, Handoff needs the command-line tools its instructions call (git).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Handoff is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Handoff: Session Handoff Document (thedotmack/claude-mem, 98k stars), Handoff (nexu-io/open-design, 100k stars), Handoff (alirezarezvani/claude-skills, 28k stars) and Handoff (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
espennilsen (a GitHub user) maintains it in espennilsen/pi, which has 122 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on September 21, 2026.
Source: espennilsen/pi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.