Skip to content
Back to skills

Cancel

ASecurity

[oh-my-agy] Cancel active workflow modes (autopilot, ralplan, ultragoal, ultraqa, team) with exact-scope cleanup of state, subagents, and background tasks. Use for $cancel, 'stop the workflow', or hard blockers.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 15, 2026
ai-agentsgoperformance

Works with

  • terminal

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add Yomudogly/oh-my-agy --skill cancel --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cancel?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cancel
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yomudogly-cancel/badge)](https://www.skillsdirectory.com/skills/yomudogly-cancel)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cancel
description: "[oh-my-agy] Cancel active workflow modes (autopilot, ralplan, ultragoal, ultraqa, team) with exact-scope cleanup of state, subagents, and background tasks. Use for $cancel, 'stop the workflow', or hard blockers."
---

# Cancel Skill

## When to use

Use `$cancel` to stop an active oh-my-agy mode and run its documented cleanup: when work is verified done, the user says stop, or a hard blocker prevents meaningful progress. Do not cancel while recoverable work remains unless the user asks.

## Inputs and preconditions

- Accepted forms: `$cancel`, `$cancel <mode>`, `$cancel --force`.
- Reject `--all`, unknown flags, and repeated or mixed flags before changing anything.
- Discover active or paused modes by reading `.omagy/state/*-state.json` in the workspace root (active means `active:true` or `paused:true` with a non-terminal `current_phase`). If `.omagy/state/pause.json` exists, clear it so cancellation is never blocked.
- Confirm the exact target before cleanup. If several modes are active and no mode was named, cancel in dependency order (below) and report each one.

## Operational steps

1. Validate arguments and select the exact target mode(s).
2. Process active modes in dependency order:
   `autopilot -> team -> ultragoal -> ultraqa -> autoresearch -> performance-goal -> ralplan -> deep-interview -> plan`.
3. **Autopilot**: write `active:false`, `current_phase:"cancelled"`, `completed_at`. **Preserve** `handoff_artifacts` and the iteration so a new `$autopilot` can resume from them. Clean up only the child work Autopilot owns (its team run, its ultraqa harnesses).
4. **Team (with worktree/branch preservation)**: `manage_subagents list`, then inspect only the conversation IDs recorded on `.omagy/state/team/<team>/tasks.json`. Because `manage_subagents kill` deletes branched workspaces, if any worker ran with `Workspace: "branch"` or `"share"` and has unmerged work, salvage or checkpoint its commits/branch in the leader lane first (stopping a worker is not permission to discard unsaved work). Separate **`worktreeCreated`** (boolean) from **`worktreePath`** (string) during cleanup: remove a worker worktree **strictly when `worktreeCreated: true`** (after verifying zero unmerged/untracked loss) and **never delete a pre-existing user checkout** (`worktreeCreated: false`). Then `kill` only those recorded worker conversation IDs, mark the remaining `in_progress` tasks `blocked` with `result:"cancelled"`, and terminalize `team-state.json`. Never use `kill_all` unless the user explicitly aborts everything.
5. **Ultraqa**: stop its background commands (`manage_task list` -> `kill` the ones it started), remove its temporary harnesses/fixtures, and terminalize its state.
6. **Ultragoal / performance-goal / autoresearch** (`$deep-research --loop` state): terminalize the state file. Do not modify `goals.json`, the ledger, or evidence artifacts beyond appending one `cancelled` ledger note.
7. **Planning modes** (`ralplan`, `deep-interview`, and `plan` written by `$ralplan --light`): terminalize the state. Keep the context snapshots, specs, and plans.
8. `--force`: additionally delete the target mode's `*-state.json` file (exact path only) after terminalizing it. This is for corrupt or stale state that keeps the Stop hook nudging. It never widens scope.
9. Report any cleanup failure instead of claiming success.

Terminal write shape (read-modify-write the existing file):
```json
{"active": false, "current_phase": "cancelled", "completed_at": "<ISO>", "updated_at": "<ISO>", "cancel_reason": "<user request | blocker>"}
```

## Exit and evidence

Report one line per selected mode: mode, terminal phase, what was preserved, linked cleanup (subagents killed, tasks stopped, files removed), and any refusal reason. A clean no-op reports `No active oh-my-agy modes detected.` When reporting checked missing-state paths on a no-op, limit the output to the current conversation's session paths (or cap checked paths at 10 with `... and N more checked paths`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.