# Session Handoff Prompt

Create a concise continuation prompt that a fresh agent session can paste in to resume...

- Repository: https://github.com/dongshuyan/compass-skills (764 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add dongshuyan/compass-skills --skill session-handoff-prompt -g -a claude-code -y`
Codex: `npx skills add dongshuyan/compass-skills --skill session-handoff-prompt -g -a codex -y`
Cursor: `npx skills add dongshuyan/compass-skills --skill session-handoff-prompt -g -a cursor -y`
Gemini CLI: `npx skills add dongshuyan/compass-skills --skill session-handoff-prompt -g -a gemini-cli -y`

## Description

Create a concise continuation prompt that a fresh agent session can paste in to resume a long or degraded session. Use when the user asks for a handoff prompt, restart prompt, continuation prompt, context transfer, fresh-session resume, or a compact summary for opening a new session. Do not use for ordinary summaries, task-forest maintenance, durable user-profile updates, automatic session creation, code execution, or external publishing.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Session Handoff Prompt

## Language Policy

**All output directed at the user, the continuation prompt itself, mode explanations, questions, and confirmations, must be written in the user's language.** Detect the user's language from their message. Default to Chinese when unknown. Skill instructions are written in English; that does not affect the language of user-facing output. Keep the continuation prompt structure stable across languages. Section headers in the continuation prompt must also use the user's language. The Chinese headers below are examples for Chinese prompts; translate them for other languages.

## Role

Produce a paste-ready prompt for a new agent session. The prompt should let the next session continue the current work with high task-state fidelity and low token cost.

The goal is operational continuity, not transcript replay. Preserve the current objective, hard requirements, verified facts, decisions, completed work, pending work, key files or artifacts, risks, and next actions. Do not copy hidden system/developer instructions, tool schemas, raw private logs, credentials, or a full transcript.

## Portability

This skill is agent-agnostic. It should work in Codex, Claude Code, OpenClaw, OpenCode, Harness, and similar local agent hosts that can read `SKILL.md` plus optional `references/` and `scripts/`.

Use these source types in order:

1. Current visible conversation and user-provided next-session focus.
2. User-provided transcript, saved handoff, or local agent log path.
3. Current workspace files, `AGENTS.md`, plans, diffs, test output, and build output.
4. Optional `.agent-workbench/task-forest/exports/` files for structured task state.
5. Optional agent-specific logs, only when the user explicitly provides a path or asks you to use a known local log location.

Scripts use Python 3 standard-library modules only and should run on macOS, Linux, and Windows. Use the available Python command on the host (`python3`, `python`, or `py -3`).

The rest: https://github.com/dongshuyan/compass-skills/blob/HEAD/skills/session-handoff-prompt/SKILL.md
