memory-handoff – skill Agent & Tự động hóa cho agent AI
Bàn giao phiên làm việc linh hoạt giữa các CLI của agent: đọc file handoff của dự án khi bắt đầu phiên, viết lại khi kết thúc, để phiên sau tiếp tục ngay giữa chừng thay vì bắt đầu lại từ đầu.
Cài skill memory-handoff bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /memory-handoff – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $memory-handoff – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /memory-handoff – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/memory-handoff-a4824.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /memory-handoff – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
Skill liên quan
- memory-safety-patterns – Các mẫu lập trình an toàn bộ nhớ đa ngôn ngữ, bao gồm RAII, ownership, smart pointer và…
- memory-systems – Thiết kế kiến trúc bộ nhớ ngắn hạn, dài hạn và dựa trên đồ thị. Dùng khi xây dựng agent…
- mercury-mcp – Bảng tra cứu nhanh cho các công cụ MCP của Mercury (proton). Dùng khi kết nối với máy…
- mesh-memory – Bộ nhớ ngữ nghĩa tự lưu trữ cho AI agent qua MCP. Lưu worklog, quyết định và ghi chú…
- microsoft-teams-automation – Tự động hóa tác vụ Microsoft Teams qua Rube MCP (Composio): gửi tin nhắn, quản lý kênh…
- miro-automation – Tự động hóa tác vụ Miro qua Rube MCP (Composio): board, item, sticky note, frame, chia…
- mixpanel-automation – Tự động hóa tác vụ Mixpanel qua Rube MCP (Composio): event, phân khúc, phễu, cohort, hồ…
- monday-automation – Tự động hóa quản lý công việc trên Monday.com gồm bảng, mục, cột, nhóm, subitem và cập…