memory-handoff – Agents & Automation skill for AI agents
Portable session handoff across agent CLIs: read a project's handoff file at session start, rewrite it at session end, so the next session starts mid-thought instead of cold.
Install the memory-handoff skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /memory-handoff – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $memory-handoff – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /memory-handoff – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /memory-handoff – then describe the task you want done.
SKILL.md content
Memory Handoff
Overview
A cross-CLI session handoff contract: one plaintext markdown file per
project, read at session start and rewritten at session end, so any
agent CLI (Claude Code, Cursor, Gemini CLI, OpenCode, Codex, aider)
picks up the work mid-thought instead of cold. No daemon, no database,
no lock-in — the file is the memory, and the format is the API.
When to Use This Skill
- Use when starting a session on a project that has a handoff file at
~/.agent/handoffs/<project-slug>.md.
- Use when the user asks to "hand off", "save context", or "pick up
where we left off".
- Use when a session is long enough that losing it would hurt (more
decisions made than fit in what you can reliably recall later).
How It Works
Step 1: Locate the file
# Default directory is ~/.agent/handoffs; $AGENT_HANDOFF_DIR overrides it.
# For ~/dev/src/crawlkit, the slug is "crawlkit".
printf '%s\n' "${AGENT_HANDOFF_DIR:-$HOME/.agent/handoffs}/crawlkit.md"Step 2: Read it at session start
Read the whole file. Treat Next step as the default first action and
Open threads as the agenda. State out loud what you picked up, so the
human can correct stale context before it misleads you.
Step 3: Rewrite it at session end
Rewrite whole sections rather than appending; stale handoffs are worse
than none. The five fixed sections:
# handoff: <project-slug>
## Status
One paragraph: what this project is and where it stands. A stranger
should be able to act after reading only this.
## Open threads
Bulleted, newest first. Each item names the branch, file, or command
needed to resume it.
## Decisions
Dated, one line each, irreversible choices only.
## Next step
The single most useful thing to do first, with the exact command.
## Updated
ISO timestamp of the last write and which agent wrote it.Step 4: Check decisions before irreversible work
Before doing anything expensive to reverse, check Decisions for a
dated line that contradicts what you are about to do.
Limitations
- Writes only inside the handoffs directory; it never deletes files and
never touches anything outside ~/.agent/handoffs (or
$AGENT_HANDOFF_DIR).
- Plaintext in a home directory, often synced by dotfile tooling: never
put secrets, tokens, or credentials in the file.
- Only as good as the last write: a handoff that was not updated after
a session is stale and must be said out loud as stale when read.
- No Windows-native paths without WSL (the slug comes from the
directory name; mount paths differ).
- Do not dump session transcripts into the file: handoff is decisions
and pointers, not history.
Related skills
- memory-safety-patterns – Cross-language patterns for memory-safe programming including RAII, ownership, smart…
- memory-systems – Design short-term, long-term, and graph-based memory architectures. Use when building…
- mercury-mcp – Cheatsheet for the Mercury (proton) MCP tools. Use when connected to the Mercury MCP…
- mesh-memory – Self-hosted semantic memory for AI agents via MCP. Save worklogs, decisions, and notes…
- microsoft-teams-automation – Automate Microsoft Teams tasks via Rube MCP (Composio): send messages, manage channels…
- miro-automation – Automate Miro tasks via Rube MCP (Composio): boards, items, sticky notes, frames…
- mixpanel-automation – Automate Mixpanel tasks via Rube MCP (Composio): events, segmentation, funnels, cohorts…
- monday-automation – Automate Monday.com work management including boards, items, columns, groups, subitems…