---
description: Cancel any active SKC mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline)
---

# Cancel Command

[UNIFIED CANCEL - INTELLIGENT MODE DETECTION]

You are cancelling the active SKC mode. The cancel skill will automatically detect which mode is running and clean it up properly.

## Auto-Detection

The skill checks state files to determine what's active and cancels in order of dependency:

1. **Autopilot** - Stops workflow, preserves progress for resume, cleans up ralph/ultraqa
2. **Ralph** - Stops persistence loop, cleans up linked ultrawork or ecomode
3. **Ultrawork** - Stops parallel execution (standalone)
4. **Ecomode** - Stops token-efficient execution (standalone)
5. **UltraQA** - Stops QA cycling workflow
6. **Swarm** - Stops coordinated agents, releases claimed tasks
7. **Ultrapilot** - Stops parallel autopilot workers
8. **Pipeline** - Stops sequential agent chain

## Usage

Basic cancellation (auto-detects mode):
```
/sk-claudecode:cancel
```

Force clear ALL state files:
```
/sk-claudecode:cancel --force
/sk-claudecode:cancel --all
```

## User Arguments

{{ARGUMENTS}}

## State Files Checked

- `.skc/state/autopilot-state.json` → Autopilot
- `.skc/state/ralph-state.json` → Ralph
- `.skc/state/ultrawork-state.json` → Ultrawork
- `.skc/state/ecomode-state.json` → Ecomode
- `.skc/state/ultraqa-state.json` → UltraQA
- `.skc/state/swarm.db` (SQLite) or `.skc/state/swarm-active.marker` → Swarm
- `.skc/state/ultrapilot-state.json` → Ultrapilot
- `.skc/state/pipeline-state.json` → Pipeline

## What Gets Preserved

| Mode | Progress Preserved | Resume |
|------|-------------------|--------|
| Autopilot | Yes (phase, spec, plan) | `/sk-claudecode:autopilot` |
| All Others | No | N/A |

## Dependency-Aware Cleanup

- **Autopilot cancellation** → Cleans ralph + ultraqa if active
- **Ralph cancellation** → Cleans linked ultrawork OR ecomode if applicable
- **Force mode** → Clears ALL state files regardless of what's active

## Exit Messages

The skill will report:
- Which mode was cancelled
- What phase/iteration it was in (if applicable)
- What dependent modes were cleaned up
- How to resume (if applicable)

## Implementation

Run the cancel skill which contains the full bash implementation for intelligent mode detection and cleanup.
