cancel
它能做什么
这个技能会停止正在运行的智能体工作流,并清除遗留的状态。适合启动了长时间运行模式、需要干净地结束它的人。
适用场景
- ✓当某个自主或多步骤模式正在运行,而你想停止它的时候。
- ✓当某个模式似乎卡住,你需要干净地结束它的时候。
- ✓当你想在结束任何模式之前,先查看有哪些模式处于活动状态的时候。
技能链接
https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/cancel/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我停止正在运行的 autopilot,但保留它的进度,方便之后继续。”
每周 5 个新技能,1 分钟读完。
工作原理
它会先检查哪些模式处于活动状态,然后按照固定顺序取消它们。Autopilot 会保留可以恢复的状态,其他模式则会被标记为已取消并完成清理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Cancel Skill
When to use
Use /cancel (or cancelomc / stopomc) to stop an active OMX mode and perform its documented cleanup. Read AGENTS.md#durable-runtime-invariants-canonical-ssot first; it is the invariant authority for scope, ownership, hooks, and Team cleanup.
Inputs and preconditions
- Accepted forms are
/canceland/cancel --force. - Reject
--all, unknown flags, repeated flags, and mixed flags before mutation. - Discover the current session/root with the state read surfaces before cleanup:
omx state list-active --json omx state get-status --mode <mode> --json - Confirm the current session/root and exact target before cleanup; stop when the required evidence is missing.
Operational steps
- Parse and validate arguments; select one exact session/root scope.
- Inspect active modes in dependency order:
autopilot → ralph → ultrawork → ecomode → ultraqa → swarm → ultrapilot → pipeline → team → plan-consensus. - Cancel Autopilot while preserving its resumable state; clean only linked child modes it owns.
- For Ralph, terminalize the target state (
active:false,current_phase:"cancelled",completed_at) and terminalize a proven linked Ultrawork/Ecomode state in the same scope. Confirm the post-conditions indocs/contracts/ralph-cancel-contract.md. - Clear standalone modes only after proving they are not linked to another active mode.
- For Team, inspect the runtime with
omx team status <team> --json; useomx team shutdown <team>after the normal completion gate, or follow the explicit abort path. - Clear only the selected mode/session state through the state API, for example:
omx state clear --input '{"mode":"<mode>","session_id":"<session>"}' --json - With
--force, perform its documented native-stop cleanup. Report rollback or cleanup failures rather than claiming success.
Exit and evidence
Report one result per selected mode: mode, scope/session, terminal phase, preserved state, linked cleanup, and any refusal reason. A clean no-op reports No active OMX modes detected. Include Team status and shutdown evidence when Team was selected.
常见问题
我会丢失进度吗?
Autopilot 会保留可恢复的状态,之后仍可以接着做。
可以使用哪些选项?
只接受普通的取消命令和强制取消版本。任何其他选项都会在任何更改发生前被拒绝。
可以一次取消所有模式吗?
不可以。这个技能会拒绝 all 选项,只针对一个确切的会话进行操作。
详情
作者的原始描述
Cancel any active OMX mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline, team)
repo: Yeachan-Heo/oh-my-codex
热度
- GitHub 星标
- 34k
- 排名
- #8415
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …