cancel
GitHub用于停止活跃的OMX模式(如autopilot、ralph等)并执行状态清理。支持按依赖顺序取消,验证前置条件,处理正常退出或强制终止,并报告操作结果及证据。
Trigger Scenarios
Install
npx skills add Yeachan-Heo/oh-my-codex --skill cancel -g -y
SKILL.md
Frontmatter
{
"name": "cancel",
"description": "Cancel any active OMX mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline, team)"
}
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.
Version History
-
3ad79a8
Current 2026-08-28 17:53
重构为基于状态API的精确操作,增加参数校验、依赖顺序检查及详细证据报告;移除旧版自动检测描述,强调AGENTS.md规范。
- e94437f 2026-08-20 07:19


