Logo Handoff

Handoff

Cộng đồng
dsifry
handoff

Analyze the current session and write a self-contained handoff document so a fresh agent can resume the work with full context — outputs a single "Read XXX.md and do YYY." sentence

Add to TypingMind

Tổng quan

Nhà phát hànhdsifry
Kho mãmetaswarm
Tên kỹ nănghandoff
Sao
421
Bản fork
54
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được dsifry công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Handoff trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/dsifry/metaswarm/tree/main/skills/handoff
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dsifry/metaswarm.git /tmp/metaswarm
mkdir -p .claude/skills
cp -r /tmp/metaswarm/skills/handoff .claude/skills/handoff
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Handoff trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Handoff ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Handoff với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Handoff Skill

Capture everything a fresh agent with zero prior context needs to resume the current work, write it to a single self-contained markdown document, and hand it off with one unambiguous sentence:

Read docs/handoffs/<file>.md and do <the next concrete action>.

Use this when a session is ending, when context is about to be compacted, when you are switching machines or sessions, or when the user explicitly asks for a handoff. The goal is zero context loss: the receiving agent should be able to act correctly after reading exactly one file.


Output Contract

This skill produces exactly two things:

  1. A handoff document at docs/handoffs/handoff-<YYYY-MM-DD-HHmm>.md (created if the directory does not exist). It is comprehensive, self-contained, and links to — or quotes — every artifact the next agent must read.

  2. A single closing sentence, and nothing else after the document is written, of the exact form:

    text
    Read docs/handoffs/handoff-2026-06-17-1432.md and do <YYY>.

    Where <YYY> is one concrete, actionable next step (an imperative, not a vague theme). Good: "implement the parseConfig validation in src/config.ts:84 and make tests/config.test.ts pass". Bad: "continue the work" / "look into the config stuff".

The sentence is the deliverable the user hands to the next agent. The document is what makes that sentence safe to follow.


Method

Step 1 — Reconstruct what we are working on

Review the session to date and answer, concretely:

  • Objective: What is the user actually trying to accomplish? State it in one or two sentences.
  • Definition of Done: What does "finished" look like? Enumerate verifiable acceptance criteria if any exist.
  • Why: The motivation/problem behind the task, so the next agent does not re-litigate settled decisions.

Pull from: the user's original request, any GitHub Issue (gh issue view <n>), the design/plan docs, and the arc of the conversation.

Step 2 — Load any persisted metaswarm state

If this project uses metaswarm's context persistence, read and fold in whatever exists — do not duplicate it blindly, summarize and link:

bash
ls .beads/plans/active-plan.md            # the approved plan (if mid-execution)
ls .beads/context/project-context.md      # completed work units, patterns, tooling
ls .beads/context/execution-state.md      # current work unit, phase, retry count
bd prime --work-type recovery 2>/dev/null # reload plan + state + knowledge, if beads present

If an active plan exists, the handoff must point to it explicitly and state which work unit/phase is in progress.

Step 3 — Establish current status

Be honest and specific about state. Distinguish clearly between:

  • Done & verified — with evidence (tests passing, build green, commit SHAs).
  • Done but unverified — written but not yet tested/run.
  • In progress — the exact thing being worked on right now, and where it stopped.
  • Not started — remaining work.

Capture the working tree reality so the next agent is not surprised:

bash
git branch --show-current
git status --short
git log --oneline -10
git diff --stat

Note uncommitted changes, stashes, and whether the branch is pushed.

Step 4 — Identify required reading

List every artifact the next agent must read before acting, and for each one say why and what to look for. Categories to sweep:

  • Specs / Issues — the requirements source of truth (GitHub Issue, spec section, DoD).
  • Design docs — docs/plans/*-design.md and any approved design.
  • Plans — .beads/plans/active-plan.md, docs/plans/*-plan.md.
  • Code — the specific files and file:line anchors that are the focus of the work, plus any pattern files to imitate.
  • Tests — the tests that define correctness (failing tests are the spec under TDD).
  • Config / gates — .coverage-thresholds.json, CLAUDE.md rules, CI config that the change must satisfy.

Prefer precise pointers (src/foo.ts:120-145) over whole-file references. If something is short and load-bearing, quote it directly into the handoff so the next agent does not have to hunt.

Step 5 — Decide the single next action (YYY)

Pick the one most important, concrete next step. It must be:

  • Actionable — an imperative the agent can start immediately.
  • Specific — names files, functions, or DoD items.
  • Bounded — the immediate next move, not the entire remaining roadmap (the rest goes in the document's "Remaining work" section).

Step 6 — Write the document

Create docs/handoffs/handoff-<YYYY-MM-DD-HHmm>.md using the template below. Fill every section; write "None" where a section genuinely does not apply rather than deleting it.

Step 7 — Emit the handoff sentence

After writing the file, verify it (Step 8), then output the single sentence — exactly one line, the literal file path, and the concrete action. Do not add commentary after it.

Step 8 — Self-check before handing off

Confirm, as if you were the receiving agent who knows nothing:

  • Could I start work from this document alone, without the prior conversation?
  • Are all referenced files/paths/issues real and correct (spot-check with ls/git)?
  • Is the next action unambiguous and immediately startable?
  • Are decisions and their rationale captured so I won't undo them?
  • Are the quality gates (tests, coverage, lint, build commands) stated?
  • Does the closing sentence name the exact file and a concrete action?

Handoff Document Template

markdown
# Handoff: <short title of the work>

**Date**: <YYYY-MM-DD HH:mm> · **Branch**: `<branch>` · **Author session**: <model/agent>

## 1. Objective
<1–2 sentences: what we are trying to accomplish and why.>

## 2. Definition of Done
- [ ] <verifiable acceptance criterion>
- [ ] <…>

## 3. Current Status
**Done & verified:**
- <item> (evidence: <tests/commit>)

**Done, not yet verified:**
- <item>

**In progress (stopped here):**
- <the exact thing being worked on, and where/why it paused>

**Not started:**
- <remaining item>

### Working tree
- Branch `<branch>`, <pushed/not pushed>
- Uncommitted changes: <git status --short summary, or "clean">
- Recent commits:
  - `<sha>` <subject>

## 4. Required Reading (read these before acting)
| # | Path / reference | Why it matters | What to look for |
|---|---|---|---|
| 1 | `<path-or-issue>` | <reason> | <specific thing> |
| 2 | `<path:line>` | <reason> | <specific thing> |

## 5. Key Decisions & Rationale
- **<decision>** — <why; what alternatives were rejected and why>. Do not undo without reason.

## 6. Code Map
- `<file:line>` — <what lives here / its role in this task>
- Pattern to imitate: `<file>` — <why>

## 7. How to Verify
```bash
<test command>           # e.g., npm test
<coverage command>       # reads .coverage-thresholds.json
<lint/build command>
```
Expected: <what green looks like>.

## 8. Open Questions / Blockers
- <question needing the user, or external dependency>  — or "None"

## 9. Next Action
<The single concrete next step — the YYY — expanded with any detail the one-liner can't hold.>

## 10. Remaining Work (after the next action)
1. <subsequent step>
2. <…>

Anti-Patterns

  1. Vague next action — "continue where we left off" is useless. Name the file and the change.
  2. Assuming shared memory — the next agent has none. If it matters and isn't in the doc, it's lost.
  3. Dumping the transcript — synthesize. A 40-line oriented summary beats a 4,000-line paste.
  4. Stale pointers — verify paths and line numbers exist before citing them; code may have moved.
  5. Hiding uncommitted state — always disclose dirty working tree, stashes, and unpushed commits.
  6. Multiple "final" sentences — emit exactly one Read <file> and do <action>. line.
  7. Silent decision loss — if a choice was made and settled, record it with rationale so it isn't reopened.

Relationship to Other Metaswarm Pieces

  • Complements /prime (which loads knowledge into a session) by serializing context out of a session for the next one.
  • For mid-execution work, this skill should reference .beads/plans/active-plan.md and .beads/context/execution-state.md rather than restating them, so the next agent can bd prime --work-type recovery and then read the handoff for the human-readable narrative.
  • Run /self-reflect separately to capture durable learnings into the knowledge base; /handoff captures this task's transient state to resume it.

Câu hỏi thường gặp

Kỹ năng AI Handoff làm được gì?

Analyze the current session and write a self-contained handoff document so a fresh agent can resume the work with full context — outputs a single "Read XXX.md and do YYY." sentence

Vì sao nên dùng Handoff trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Handoff là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Handoff trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/dsifry/metaswarm/tree/main/skills/handoff. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Handoff?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Handoff với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Handoff với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Handoff có miễn phí không?

Có. Kỹ năng này được dsifry phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇