Agent skill

Handoff

by espennilsen in espennilsen/pi

Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context.

MITAuto-check passed

Install Handoff

skills CLI
$ npx skills add espennilsen/pi --skill handoff -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install espennilsen/pi handoff --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
handoff
GitHub stars
122
Token cost
~1.4k tokens
SKILL.md length
464 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Generate a self-contained handoff prompt that lets the user continue work in a fresh coding agent session with empty context.

  • Works in 3 steps: Gather State → Synthesize Context from the Session → Generate the Handoff Prompt
  • — use this skill when: - User says handoff
  • SKILL.md covers Philosophy, Workflow, Handoff Prompt Template and Guidelines, plus 1 more section
  • Calls git

What it does

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.

When your agent uses it

  • — 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

Example prompts

  • “handoff”
  • “hand off”
  • “hand-off”
  • “/handoff”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Gather State
  2. Synthesize Context from the Session
  3. Generate the Handoff Prompt

What it can do on your machine

Read from SKILL.md and the folder at commit 79d019b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    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.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~153
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from espennilsen/pi at commit 79d019b, republished under its MIT licence (© espennilsen). 464 words, ~1,359 tokens.

Download SKILL.mdSave it as .claude/skills/handoff/SKILL.md (or your agent's skills folder).
name
handoff
description
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" - User asks "how do I pick this up later" - User wants to "pass this to another agent"

Handoff — Session Context Transfer

Generate a self-contained prompt that a fresh coding agent (with zero prior context) can use to seamlessly continue the current work.

Philosophy

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:

  • Self-contained — no references to "our earlier conversation"
  • Actionable — the new agent knows exactly what to do next
  • Honest — clearly states what's done, what's broken, and what's uncertain
  • Minimal — includes only what's needed, not a transcript of the old session

Workflow

Step 1 — Gather State

Collect facts from the codebase. Do not rely on conversation memory alone — verify against the filesystem.

bash
# 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)
Step 2 — Synthesize Context from the Session

Review the conversation to extract:

ElementQuestion to answer
GoalWhat is the user ultimately trying to accomplish?
ScopeWhat specific task was this session focused on?
CompletedWhat has been done? (commits, files created/edited, commands run)
In-progressWhat was being worked on when the handoff was requested?
RemainingWhat still needs to be done?
DecisionsWhat architectural or design choices were made and why?
BlockersAny issues, bugs, or unknowns that the next session should know about?
Key filesWhich files are most relevant to the current task?
Step 3 — Generate the Handoff Prompt

Produce a single Markdown code block containing the prompt. The user copies this into their next session.


Handoff Prompt Template

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.

markdown
```
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>
```

Guidelines

Be Specific, Not Vague
  • ❌ "We updated the config"
  • ✅ "Added pi-heartbeat settings block to settings.json.example with all 6 fields"
Show full SKILL.md (185 more words)Show less
Include Dirty File Details

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.

State the Next Action Clearly

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".

Keep It Proportional
  • Quick fix session → 10-15 line handoff
  • Multi-file feature session → 30-50 line handoff
  • Major refactor → up to 80 lines, but no more
Don't Include
  • Full file contents (the agent can read them)
  • Conversation transcript or reasoning history
  • Obvious project facts the agent will discover from package.json etc.
  • Emotional context ("we struggled with this" — just state the facts)

Output

  1. Present the handoff prompt inside a single fenced code block so it's easy to copy
  2. If there are uncommitted changes, mention this outside the code block as a reminder
  3. Optionally suggest saving the prompt to a file: 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

Files

Just SKILL.md in skills/handoff of espennilsen/pi.

Open the folder on GitHubat commit 79d019b

Compare with similar skills

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.

Handoff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Handoff this skillespennilsen/pi122—~1.4kAutomated safety check: PassMIT
Session Handoff Documentthedotmack/claude-mem98k—~1.4kAutomated safety check: PassApache-2.0
Handoffnexu-io/open-design100k—~547Automated safety check: PassApache-2.0
Handoffalirezarezvani/claude-skills28k—~2.5kAutomated safety check: NotesMIT
Handoffalirezarezvani/claude-skills28k—~532Automated safety check: PassMIT
Session Handoff Writercodewhale-hq/Codewhale41k—~1.2kAutomated safety check: PassMIT

Similar skills

  • 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.

    98k GitHub stars~1.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Handoff

    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.

    100k GitHub stars~547 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Handoff

    alirezarezvani/claude-skills

    Compact the current conversation into a handoff document for another agent to pick up.

    28k GitHub stars~2.5k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check: notes
  • Handoff

    alirezarezvani/claude-skills

    Compact the current conversation into a handoff document for another agent to pick up.

    28k GitHub stars~532 tokensUpdated 1 mo ago
    Product & Project ManagementAuto-check passed
  • Session Handoff Writer

    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.

    41k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Session Handoff

    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.

    47k GitHub stars~1.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes

More from espennilsen/pi

All 36 skills in this repo
  • GitHub

    espennilsen/pi

    Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.

    122 GitHub stars~1k tokensUpdated 17 days ago
    Auto-check passed
  • Skill Creator

    espennilsen/pi

    Create, review, and improve skills for Pi agents. An agent skill from espennilsen/pi.

    122 GitHub stars~2.1k tokensUpdated 17 days ago
    Auto-check passed
  • Dry Code Review

    espennilsen/pi

    Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.

    122 GitHub stars~1.7k tokensUpdated 17 days ago
    Auto-check passed
  • Extract Design System

    espennilsen/pi

    Reverse-engineer a design system from a live website (public URL or localhost).

    122 GitHub stars~2k tokensUpdated 17 days ago
    Auto-check passed
  • Herdr Operations

    espennilsen/pi

    A skill your agent uses when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.

    122 GitHub starsUsed in 1 repo~525 tokens
    Auto-check passed
  • PDF Reader

    espennilsen/pi

    Read and extract content from PDF files — text, tables, metadata, and images.

    122 GitHub stars~1.6k tokensUpdated 17 days ago
    Auto-check passed

Questions about Handoff

What does Handoff do?

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.

When should I use Handoff?

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.

How do I install Handoff in Claude Code?

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.

How do I install Handoff in Codex?

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.

Can I use Handoff in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Handoff need to run?

Going by SKILL.md and its folder, Handoff needs the command-line tools its instructions call (git).

Does Handoff access the network?

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.

Is Handoff safe to install?

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.

What licence does Handoff use?

Handoff is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Handoff use?

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.

What are the alternatives to Handoff?

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.

Who maintains Handoff?

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.