cancel
ما الذي تفعله
تنهي هذه المهارة الأوضاع الآلية الجارية في oh-my-claudecode، وتنظف الحالة المتبقية منها. وهي موجهة إلى من يريدون إيقاف وضع يعمل في الخلفية أو إعادة ضبطه بعد انتهائه.
متى تستخدمها
- ✓عندما تريد إيقاف وضع آلي، مثل autopilot أو ralph، ما زال يعمل.
- ✓عندما ينتهي وضع آلي وتحتاج حالته المحفوظة إلى تنظيف.
- ✓عندما تريد إيقاف الأوضاع الآلية في كل جلساتك.
رابط المهارة
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/cancel/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“من فضلك أوقف تشغيل autopilot الذي ما زال يعمل ونظّف حالته.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يكتشف الوكيل الوضع النشط ويلغيه في الجلسة الحالية. ولا يصل إلى جلسات أخرى إلا إذا طلبت صراحة إلغاء كل الجلسات، ويحترم الأقفال حتى لا يتدخل في عمل جارٍ.
المحتوى التقني (ملف 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
الأسئلة الشائعة
ماذا يفعل خيار force؟
يتخطى فترة الانتظار المنظمة أثناء الإيقاف، لكنه ما زال يحترم الأقفال وفحوص الملكية.
هل يلغي كل الجلسات افتراضياً؟
لا. يعمل افتراضياً على الجلسة الحالية فقط، وإلغاء كل الجلسات يحتاج إلى طلب صريح.
هل يُحتاج إليها بعد كل تشغيل؟
هي الطريقة المعتادة لإنهاء الوضع الآلي والخروج منه بشكل نظيف، لذلك تُستخدم لإغلاقه.
التفاصيل
الوصف الأصلي من المؤلف
Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state
الشعبية
- نجوم GitHub
- 41k
- الترتيب
- #6996
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
agent-doc-discipline
41kيعلّم وكيلك كتابة تعليمات يستطيع وكلاء ذكاء اصطناعي آخرون اتباعها وحدهم، بقواعد قابلة للفحص ومع سبب واضح وراء كل قاعدة.
ai-slop-cleaner
41kيساعد وكيلك على تنظيف الكود الذي كتبه الذكاء الاصطناعي، وهو يعمل لكنه منتفخ أو مكرر، فيحذف الكود الزائد دون تغيير ما يفعله.
architecture-survey
41kيساعد وكيلك على مراجعة بنية الكود وسرد الأجزاء التي تصبح أصعب في التغيير، مع الأدلة، دون أن يغيّر أي شيء بنفسه.
ask-navigator
41kيساعد وكيلك على تحويل مشروع غامض إلى خريطة من أسئلة قرار واضحة، ثم العمل عليها واحداً تلو الآخر حتى يتضح الطريق.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.