Agent skill

Session Handoff Writer

by codewhale-hq in 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.

MITAuto-check passedAgent Workflows

Install Session Handoff Writer

skills CLI
$ npx skills add codewhale-hq/Codewhale --skill handoff -a claude-code

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

GitHub CLI
$ gh skill install codewhale-hq/Codewhale 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/codewhale-hq/Codewhale.git skills-src && mkdir -p .claude/skills && cp -r skills-src/crates/tui/assets/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
41k
Token cost
~1.2k tokens
SKILL.md length
552 words
Files
1
Skills in repo
63
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 5 steps: Gather the truth from tools, not memory.… → Write a compact markdown handoff (aim… → Persist it. Always write… → …
  • Ending a session while a multi-step operation is still in progress
  • SKILL.md covers When to use, What to do and Constraints
  • Calls gh and git

What it does

When a session is ending, context is running low or you ask to pass the baton, the agent collects facts from tools rather than memory: the current branch, short git status, commits that exist only locally, recent history, and any in-flight work such as dirty files, partial worktrees, background jobs and queued CI. Remote state like open pull requests and checks is included only when the operation depends on it.

It then writes a markdown handoff of roughly 60 lines or fewer (about 15 for a text-only variant) covering state, committed work with exact SHAs and what is blocked. The note is always saved to .codewhale/handoff.md in the workspace, the only path the Codewhale runtime reads back and injects as a previous-session block on the next first turn. A copy in an ops notes folder is optional.

When your agent uses it

  • Ending a session while a multi-step operation is still in progress
  • Running low on context and needing a durable checkpoint before it compacts
  • Switching to a fresh session that should start from recorded evidence
  • Leaving a note for a teammate about branches, pull requests and blockers

Example prompts

  • “Write me a handoff before we run out of context.”
  • “Pass the baton: record where the migration branch and its CI stand.”
  • “Give me a short text-only handoff of what is committed and what is still blocked.”

Requirements

  • A git workspace
  • GitHub CLI (gh) when remote pull request or CI state matters

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Gather the truth from tools, not memory. Run/collect
  2. Write a compact markdown handoff (aim under ~60 lines; the user may
  3. Persist it. Always write .codewhale/handoff.md in the workspace — that
  4. Clear the way for the new session ("clears context"). A skill cannot
  5. Deliver. Give the user the compact handoff text in your reply

What it can do on your machine

Read from SKILL.md and the folder at commit 8d2fb45. 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:

    • gh
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use gh and 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

Session Handoff Writer loads about 1.2k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 552 words of instructions outside code blocks.

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

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 codewhale-hq/Codewhale at commit 8d2fb45, republished under its MIT licence (© codewhale-hq). 552 words, ~1,204 tokens.

Download SKILL.mdSave it as .claude/skills/handoff/SKILL.md (or your agent's skills folder).
name
handoff
description
Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / 'pass the baton' / 'hand off', or a long-running operation needs a durable state checkpoint.
invocation
model+user

Handoff

Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / "pass the baton" / "hand off", or a long-running operation needs a durable state checkpoint. The goal: the durable artifact survives, the context does not need to.

Invocation: model+user

When to use

  • The user says "handoff", "hand off", "pass the baton", "takeover prompt", "write me a handoff", or the session is about to end / compact.
  • A long operation (multi-turn, multi-workstream) has state that must survive context loss: commits, branches, PRs, CI, blockers, decisions.
  • You are switching to a fresh session and want the new session to start from evidence instead of reconstructing the old one.

What to do

  1. Gather the truth from tools, not memory. Run/collect:

    • git branch --show-current, git status --short, git log --oneline origin/<default>..HEAD (what is local-only), git log --oneline -5 (recent context).
    • Live remote state where relevant (gh pr list --state open, gh pr checks <n>, gh run list) — only what the user's operation actually depends on; do not pad the handoff with a full GitHub dump.
    • Any in-flight work: dirty files, uncommitted slices, partial worktrees, running background jobs/workers, queued CI.
  2. Write a compact markdown handoff (aim under ~60 lines; the user may also ask for a "short text-only" variant — then aim under ~15 lines):

    markdown
    # Handoff — <operation/session name> — <date>
    - **State:** <one-line: what is done vs in-flight vs blocked>
    - **Landed/committed:** <exact SHAs + one-line what>
    - **Branches/PRs:** <names + states; which are ours vs community>
    - **CI:** <what is green, what is waiting, what is broken>
    - **Blockers:** <exact blocker + what would unblock>
    - **Decisions made:** <the WHY that a fresh session must not re-litigate>
    - **Next step:** <the single next action, one line>
    - **Continuation records:** <pointers to partial work that must be
      preserved (worktrees, uncommitted files, receipts)>
  3. Persist it. Always write .codewhale/handoff.md in the workspace — that is the only path the runtime reads back. On the next session's first turn it is injected as the "## Previous Session Relay" block (HANDOFF_RELATIVE_PATH, crates/tui/src/prompts.rs:85; loader at prompts.rs:301-315). A handoff written anywhere else is never picked up, so the next session starts cold no matter how good the note is.

    Optionally also write a human-discoverable copy:

    • If the workspace has an ops/notes convention (e.g. codewhale-ops/notes/ with a living handoff file), update the living handoff's dated facts and snapshot, or create <topic>-handoff-<date>.md next to it.
    • Otherwise the repo root as HANDOFF.md or docs/handoff/<topic>-<date>.md. These are for people; nothing in the runtime reads them. Never overwrite someone else's uncommitted handoff without reading it first.
  4. Clear the way for the new session ("clears context"). A skill cannot delete the current context, but it can make the context disposable:

    • Ensure nothing is left only in memory: dirty work is either committed (WIP is fine with a real body), stashed with a note, or recorded in the handoff with its exact location.
    • Kill or record background work that would outlive the session (background jobs, sub-agents) — record what is still running and its task id.
    • Close with the one-line "next step" so the fresh session has an unambiguous first action.
  5. Deliver. Give the user the compact handoff text in your reply (the persisted file is the durable copy; the reply is the readable one).

Show full SKILL.md (77 more words)Show less

Constraints

  • Facts only from tool output; never invent SHAs, check states, or blockers.
  • Keep claims narrower than evidence: distinguish landed/committed, verified locally, CI-verified, and pending.
  • Preserve other people's uncommitted work: read before touching, archive before overwriting.
  • The handoff is orientation, not law: tell the next session to refresh live state before acting on it.
  • If the user asks for a "short text-only" handoff, give exactly that in the reply and skip the full markdown file unless asked.

© codewhale-hq, 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 crates/tui/assets/skills/handoff of codewhale-hq/Codewhale.

Open the folder on GitHubat commit 8d2fb45

Compare with similar skills

Session Handoff Writer 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.

Session Handoff Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Handoff Writer this skillcodewhale-hq/Codewhale41k—~1.2kAutomated safety check: PassMIT
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Beadsmatthiasn/lotti1.2k—~589Automated safety check: PassGPL-3.0
File-Based Planning in ArabicOthmanAdi/planning-with-files27k—~3.2kAutomated safety check: NotesMIT
Context Savegarrytan/gstack136k—~9.8kAutomated safety check: NotesMIT

Similar skills

  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Beads

    matthiasn/lotti

    A skill your agent uses for authorized Lotti maintainer work that needs private durable task tracking, issue dependencies, blocker management, multi-session handoff, or shared agent memory.

    1.2k GitHub stars~589 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • File-Based Planning in Arabic

    OthmanAdi/planning-with-files

    Arabic edition of a file-based planning skill that keeps task_plan.md, findings.md and progress.md on disk so multi-step agent work survives lost context.

    27k GitHub stars~3.2k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes
  • Context Save

    garrytan/gstack

    Captures git state, decisions made and remaining work so that a later session can resume the task without losing context.

    136k GitHub stars~9.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Gcc

    davila7/claude-code-templates

    Git Context Controller (GCC) - Manages agent memory as a versioned file system under .GCC/.

    32k GitHub stars~1.6k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from codewhale-hq/Codewhale

All 63 skills in this repo
  • Codewhale Dogfood Install

    codewhale-hq/Codewhale

    Proves a Codewhale change in the real product: a stamped release build, an atomic local install, fresh-shell verification and manual QA that automated gates cannot cover.

    41k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Codewhale Session Handoff

    codewhale-hq/Codewhale

    Writes a paste-ready handoff for the next agent session, opening with a state-check command block and separating done, suspected and blocked work.

    41k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Sub-Agent Delegation

    codewhale-hq/Codewhale

    Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

    41k GitHub stars~790 tokensUpdated today
    Auto-check passed
  • Codewhale Fleet Manager

    codewhale-hq/Codewhale

    Triages and manages Codewhale fleet runs and workers with typed commands, classifying failures and choosing a safe restart, resume or escalation.

    41k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • GitHub Issue Bulk Assigner

    codewhale-hq/Codewhale

    Moves a list of GitHub issues into a milestone or assigns them to owners with the gh CLI, checking each one before and after the change.

    41k GitHub stars~953 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Session Handoff Writer

What does Session Handoff Writer do?

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. When a session is ending, context is running low or you ask to pass the baton, the agent collects facts from tools rather than memory: the current branch, short git status, commits that exist only locally, recent history, and any in-flight work such as dirty files, partial worktrees, background jobs and queued CI. Remote state like open pull requests and checks is included only when the operation depends on it.

When should I use Session Handoff Writer?

Session Handoff Writer fits situations like: ending a session while a multi-step operation is still in progress; running low on context and needing a durable checkpoint before it compacts; switching to a fresh session that should start from recorded evidence; leaving a note for a teammate about branches, pull requests and blockers.

How do I install Session Handoff Writer in Claude Code?

Run `npx skills add codewhale-hq/Codewhale --skill handoff -a claude-code`. Or copy the skill folder (crates/tui/assets/skills/handoff in codewhale-hq/Codewhale) into .claude/skills/handoff in your project. Claude Code loads it when a task matches its description.

How do I install Session Handoff Writer in Codex?

Run `npx skills add codewhale-hq/Codewhale --skill handoff -a codex`. Or copy the skill folder (crates/tui/assets/skills/handoff in codewhale-hq/Codewhale) into .agents/skills/handoff in your project. Codex loads it when a task matches its description.

Can I use Session Handoff Writer 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 codewhale-hq/Codewhale --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 Session Handoff Writer need to run?

Going by SKILL.md and its folder, Session Handoff Writer needs the command-line tools its instructions call (gh and git). Our summary lists: A git workspace; GitHub CLI (gh) when remote pull request or CI state matters.

Does Session Handoff Writer access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Session Handoff Writer 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 Session Handoff Writer use?

Session Handoff Writer 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 Session Handoff Writer use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Session Handoff Writer?

Skills that share tags, products or a category with Session Handoff Writer: Beads Task Memory (gastownhall/beads, 28k stars), Session History Search (slopus/happy, 24k stars), Beads (matthiasn/lotti, 1.2k stars) and File-Based Planning in Arabic (OthmanAdi/planning-with-files, 27k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Handoff Writer?

codewhale-hq (a GitHub organization) maintains it in codewhale-hq/Codewhale, which has 41,078 GitHub stars. The repository holds 63 skills in this directory. The repository was last updated on October 9, 2026.

Source: codewhale-hq/Codewhale on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.