본문으로 건너뛰기
Skillpedia
에이전트41k · #6996

cancel

하는 일

이 스킬은 oh-my-claudecode에서 실행 중인 자동 모드를 끝내고, 남은 상태를 정리합니다. 백그라운드 모드를 멈추거나 끝난 뒤 초기화하고 싶은 사람을 위한 스킬입니다.

사용하는 경우

  • ✓autopilot이나 ralph처럼 아직 실행 중인 자동 모드를 멈추고 싶을 때.
  • ✓자동 모드가 끝나서 저장된 상태를 정리해야 할 때.
  • ✓모든 세션에서 자동 모드를 멈추고 싶을 때.

스킬 링크

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/cancel/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/cancel/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“아직 실행 중인 autopilot 실행을 중지하고, 그 상태를 정리해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 어떤 모드가 활성인지 감지하고, 현재 세션에서 그 모드를 취소합니다. 다른 세션은 모든 세션을 대상으로 하라고 명시적으로 요청했을 때만 건드리며, 진행 중인 작업을 방해하지 않도록 잠금을 존중합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Cancel Skill

Intelligent cancellation that detects and cancels the active OMC mode.

The cancel skill is the standard way to complete and exit any OMC mode. When the stop hook detects completion, it instructs the LLM to invoke this skill for state cleanup. Retry a failed operation in the same scope and report what remains; --force changes shutdown urgency, never scope, lock handling, or ownership checks. --all is the only cross-session authorization.

Cancellation Contract

The flags control independent scope and shutdown dimensions:

Invocation Scope Shutdown behavior
no flags Current session only Graceful cancellation, including teammate shutdown waits
--force Current session only Forced cancellation: skip graceful waits, but still use protected state tools and honor locks/ownership
--all Every known session, by explicit session id Normal safe cancellation independently for each session, then explicit legacy/global cleanup
--force --all Every known session, by explicit session id Forced-all: skip graceful waits for each session, then perform the authorized legacy/global cleanup

Resolve the current identity from OMC_SESSION_ID in CLI contexts or the hook-provided session_id. A missing or ambiguous identity for no flags or --force fails closed: do not aggregate state, choose a discovered session, or issue an unscoped cleanup. This is a fail-closed error for the default command and for --force. --all may enumerate known sessions, but every concrete id is still read, cancelled, and cleared independently.

What It Does

Automatically detects and cancels active modes:

  • Autopilot: Stops the workflow while preserving progress for resume.
  • Ralph: Stops the persistence loop.
  • Legacy Ultrawork / UltraQA: Removes stale upgraded-installation state only; neither is a live workflow.
  • Ultragoal: Clears its session runtime guard while preserving durable .omc/ultragoal/ plan and ledger artifacts.
  • Swarm: Stops coordinated agents and releases claimed tasks only in its authorized shared cleanup path.
  • Ultrapilot / Pipeline: Stops their worker or sequential execution.
  • Team: Uses the active team surface for graceful shutdown, then clears session-scoped Team state; forced paths skip waits. Claude Code 2.1.178+ has no TeamDelete.
  • Team + Ralph: Team is cancelled first, then linked Ralph is cleared in the same session; a Team failure retains linked Ralph.
  • OMC Teams, Plan Consensus, and Self-Improve: Use their mode-specific protected cleanup and preserve artifacts designated for resume.

Usage

/oh-my-claudecode:cancel
/oh-my-claudecode:cancel --force
/oh-my-claudecode:cancel --all
/oh-my-claudecode:cancel --force --all

Or say: cancelomc, stopomc.

Critical: Deferred Tool Handling

The state tools (state_clear, state_read, state_write, state_list_active, state_get_status) may be deferred by Claude Code. Before calling any of them, load all of them with ToolSearch:

ToolSearch(query="select:mcp__plugin_oh-my-claudecode_t__state_clear,mcp__plugin_oh-my-claudecode_t__state_read,mcp__plugin_oh-my-claudecode_t__state_write,mcp__plugin_oh-my-claudecode_t__state_list_active,mcp__plugin_oh-my-claudecode_t__state_get_status")

If state_clear is unavailable or fails, retry the same scoped operation and report the failure. The fallback below is only an emergency escape from a stop-hook loop for a non-force, non-Team cancellation. It removes files only for an explicitly identified current session. Do NOT use this fallback for autopilot, team, or omc-teams, or for --force/--all; never use it to bypass a lock, ownership check, corruption, or another state-tool failure. Linked modes need one protected operation per mode.

Replace MODE with the specific mode (for example ralplan, ralph, ultrawork, or ultragoal).

# Emergency fallback: direct file removal for one identified session only.
SESSION_ID="${OMC_SESSION_ID:-${CLAUDE_SESSION_ID:-${CLAUDECODE_SESSION_ID:-}}}"
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || { d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.omc" ]; do d="$(dirname "$d")"; done; echo "$d"; })"
sha256portable() { printf '%s' "$1" | (sha256sum 2>/dev/null || shasum -a 256) | cut -c1-16; }

if [ -n "${OMC_STATE_DIR:-}" ]; then
  SOURCE="$(git remote get-url origin 2>/dev/null || echo "$REPO_ROOT")"
  HA
자주 묻는 질문

강제 옵션은 무엇을 하나요?

종료 중 정상적인 대기를 건너뛰지만, 잠금과 소유권 검사는 여전히 존중합니다.

기본적으로 모든 세션을 취소하나요?

아니요. 기본적으로는 현재 세션에서만 작동하며, 모든 세션을 취소하려면 명시적으로 요청해야 합니다.

실행이 끝날 때마다 이것이 필요한가요?

자동 모드를 깔끔하게 끝내고 종료하는 표준 방법이므로, 마무리할 때 사용합니다.

상세 정보

작성자의 원본 설명

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

repo: Yeachan-Heo/oh-my-claudecode

인기도

GitHub 스타
41k
순위
#6996
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬