queue-handoff
它能做什么
这个技能指导 AI 智能体通过 OpenRig 的队列,把工作交给另一位智能体或人员,确保没有内容停留在聊天中或无人负责。适合跨越多轮工作的智能体团队。
适用场景
- ✓你即将结束一轮工作,但仍有下一步待办的时候。
- ✓你被另一位智能体的工作阻塞,需要等待它的时候。
- ✓你需要把某件事作为可追踪事项上报给人的时候。
技能链接
https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我已经完成了解析器部分。请通过队列把下一步交给审查者,并附上他们需要的备注。”
每周 5 个新技能,1 分钟读完。
工作原理
它创建或更新一个持久队列项,写明负责人、状态和下一步,使接收方被唤醒,工作也不会丢失。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Queue Handoff
Durable work handoff via queue items. Lets the system keep moving through compactions, missed messages, and interruptions by passing the ball forward instead of leaving work suspended in chat or in-flight without an owner.
Use this when
- Ending a turn on substantive work. Active work should end by passing the ball to an owner or to the human — never by going idle with the rig appearing dormant.
- Finishing a slice that has a clear next step. Default-nudge: receiver gets a wake-ping plus the durable queue item.
- Blocked on another agent's work. Use
rig queue block <id> --on <child>(orrig queue update <id> --state blocked --blocked-on <child>). The item stays active and returns to pending when its blocker completes. Waiting on something outside the queue, such as CI or a long job? Park the row:rig queue block <id> --on external:<what> --wake-after <duration> --continuation "<what resumes>". It stays yours and reads parked, not stalled, and the timer wakes you. - Escalating to the human. Make the escalation a durable attention item, not just a chat message.
Don't use this when
- The work is genuinely complete and there's no follow-on owner. Use
closure_reason: no-follow-on(terminal completion) orcanceled/deniedas appropriate. - The handoff would be too small and turn work into bureaucracy. Bundle the work into a coherent slice instead of decomposing every step.
- The handoff would be too broad and lose ownership/proof/closure criteria. Shape the qitem so the receiver knows the expected next action and closure evidence.
The hot-potato terminal-turn-rule
Active work ends by passing the ball to a named next owner or to the human. The qitem state machine enforces this:
pending → in-progress → done requires closure_reason from one of:
handed_off_to— work continues at a different seat (target = new owner)denied— receiver rejected the workcanceled— sender or receiver withdrewno-follow-on— terminal completion, nothing else neededescalation— kicked up to a higher tier (target = escalation target)superseded— replaced by another qitem (target = successor qitem id)
Two of those (handed_off_to, escalation) additionally
require closure_target. The daemon enforces this at the domain layer;
every surface (CLI, MCP, future UI) inherits the same guarantee.
done is terminal. closure_reason: blocked_on is valid only on an active
state=blocked park record, as used by workflow writers; combining it with
state=done is rejected. Use the block command above to wait on another qitem.
The drafted-park failure (draft ≠ throw). The rule is about the actual pass, not the
intention to pass. A turn that ends with a self-instruction typed into your own prompt but left
unsent — a drafted go-ahead, a next-atom note you never sent — has not handed off; it has
parked, and the seat sits idle for as long as nobody notices. Drafting the handoff feels like
doing it; it isn't. Your last act on a turn must be an EDIT or a SEND — a committed change, a
rig send, a rig queue handoff — never a drafted prompt line left in the buffer. If your
final output is an instruction addressed to yourself, you haven't ended the turn, you've stalled it.
The dispatcher's other half — supersession closes your own outbox. Ending your turn cleanly is only half the rule; the other half fires when you move the world. When a phase transition or a fold receipt supersedes work you dispatched, close those dispatches yourself — with a citation to the event that superseded them. Closure-on-supersession belongs to the dispatcher, never the receiver. Make it a habit: after every fold receipt / phase transition, run an outbox audit — which of my open dispatches did this just make moot? — and close them with the citation.
Why it must live with you: stale dispatch-debt is invisible to the dispatcher because it lands on someone else's queue — the cost is externalized, so no feedback loop ever fires to make you clean it up. The receiver inherits debt they did not create and must burn cycles verifying it before they can hold cleanly; a queue full of stale-pending makes check-before-holding — the discipline you most want cheap — expensive, and it degrades the idle-detector's signal (a real owner looks the same as a stale dispatch). Close it at the source: the moment your own transition mo
常见问题
接收方会被唤醒吗?
默认情况下,接收方会在持久队列项之外收到一次唤醒提醒。
为什么不直接发送聊天消息?
技能说明,聊天消息可能被漏看,而队列项是持久的,并且有明确的负责人。
如果工作已经完成怎么办?
如果工作已完成且没有后续负责人,技能会要求将其标记为完成,而不是继续交接。
详情
作者的原始描述
Use when ending a turn, finishing a slice, blocked on another agent's work, or escalating to a human — durable work handoff via queue items so the system keeps moving across compactions, missed messages, and interruptions. Covers the hot-potato terminal-turn-rule (active work ends by passing the ball, not by going idle), default-nudge semantics, and when `--no-nudge` is appropriate for intentional cold park or human gate.
repo: mvschwarz/openrig
热度
- GitHub 星标
- 8.6k
- 排名
- #12394
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-operated-software
8.6k帮你的智能体设计、构建或调试一个后端包含 AI 智能体的持续运行应用,例如基于 Markdown 或 JSON 的智能体控制层。
agent-operated-workflows
8.6k帮你的智能体判断一个有边界的流程应由 AI 智能体还是普通代码执行,并基于已验证的证据从中断处恢复。
applying-a-permission-policy
8.6k帮你的智能体在团队设置时配置 AI 编程智能体使用的命令权限,让常规命令减少审批提示。
claude-compaction-restore
8.6k帮助 Claude Code 智能体在上下文被压缩后,借助保存的恢复图、对话记录和它改动过的文件,重建工作认知。