Summarize the current in-context conversation into a handoff a fresh agent (or
future-you) can pick up without re-reading the session. Two output modes:
The skill accepts a free-form argument string (
). Parse it once:
Pick from this pool. Include a section only if you actually have content for
it from the conversation. Order them as listed.
Render the handoff directly as Markdown in chat. No code-fence wrapper.
Then the applicable sections, each as
followed by its
content. Do not print a trailing summary, sign-off, or question.
-
Resolve the encoded cwd: take the absolute working directory and replace
every
with
. Example:
→
.
-
Build the filename:
YYYY-MM-DD-HHMM[-slug].md
, local time. Slug is
derived from the focus string if present:
- Lowercase, replace non-alphanumeric runs with , trim leading/trailing
, collapse repeats, cap at ~40 chars. Use the first 4–6 meaningful
words.
- Omit the slug entirely if focus is empty.
-
Target path — use the first directory that matches the host you are running in:
| Host | Base directory |
|---|
| Claude Code | ~/.claude/projects/<encoded-cwd>/handoff/
|
| Codex | ~/.codex/projects/<encoded-cwd>/handoff/
|
| OpenCode | ${XDG_CONFIG_HOME:-~/.config}/opencode/projects/<encoded-cwd>/handoff/
|
| pi | ~/.pi/agent/projects/<encoded-cwd>/handoff/
|
| Unknown | in the current project |
If you cannot tell which host you are in, prefer the project-local
path over guessing a home directory — a handoff written somewhere the user cannot
find is worse than one in the repo.
-
Create the
directory if needed.
-
On collision (same filename), suffix with
,
, … before
.
-
Write the same Markdown body as inline mode to the file.
-
Print to chat exactly two lines, nothing else:
[<filename>](<absolute-path>)
Read @<absolute-path> and continue the work.
The first line renders as a clickable link in hosts that support it; the second is
the copy-paste shortcut for starting the next session.
Use only what the in-context conversation already provides plus light,
read-only inspection if needed:
Do not run mutating commands, do not edit code, do not commit. Reading
project files to ground a fact is fine, but only if the conversation pointed
at them — don't go exploring.