ctx-purge
ما الذي تفعله
تمسح هذه المهارة فهرس البحث وبيانات الجلسات التي حفظها context-mode لمشروع ما. وهي موجهة لمن يريد إزالة محتوى مفهرس قديم أو البدء من جديد.
متى تستخدمها
- ✓عندما يريد أحدهم إزالة المحتوى المفهرس من جلسة سابقة واحدة.
- ✓عندما يكون فهرس البحث للمشروع مزدحماً ويجب مسحه كله.
- ✓عندما يريد أحدهم بداية نظيفة قبل فهرسة المشروع من جديد.
رابط المهارة
https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“امسح فهرس context-mode لهذا المشروع حتى أبدأ من جديد.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تسألك المهارة أولاً هل تمسح جلسة واحدة أو المشروع كله، ثم تحذرك مما سيُحذف. لا تنفذ الحذف إلا بعد تأكيد النطاق.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Context Mode Purge
Permanently deletes session data for this project. Two scopes are supported (issue #520):
- Project scope (
scope: "project"): wipes EVERYTHING — knowledge base, all session DB rows for every session, events markdown, and stats. - Session scope (
sessionId: "<id>"orscope: "session"): wipes ONLY the matching session's rows + FTS5 chunks. Sibling sessions, project stats, and the FTS5 store file are preserved.
Instructions
- Decide the scope first with the user:
- "Wipe just one session?" → ask for the
sessionId. - "Wipe the whole project?" → confirm scope:'project' (this is the destructive, irreversible default).
- "Wipe just one session?" → ask for the
- Warn the user about scope:'project'. Everything will be deleted:
- FTS5 knowledge base (all indexed content from
ctx_index,ctx_fetch_and_index,ctx_batch_execute) - Session events DB (analytics, metadata, resume snapshots) for ALL sessions in the project
- Session events markdown file
- In-memory session stats + persisted stats file
- FTS5 knowledge base (all indexed content from
- Call the
mcp__context-mode__ctx_purgeMCP tool with the chosen parameters:- Scoped:
{ confirm: true, sessionId: "<id>" }— implies scope:'session'. - Project:
{ confirm: true, scope: "project" }— explicit destructive form. - Bare
{ confirm: true }still works but emits a deprecation warning. Prefer the explicit forms.
- Scoped:
- Report the result to the user — the response lists exactly what was deleted and (for scoped purges) confirms that other sessions and project stats were preserved.
Schema rules
confirm: trueis always required.sessionIdandscope: "project"together is REJECTED as ambiguous (the sessionId implies session scope; combining with project scope contradicts intent).scope: "session"withoutsessionIdthrows — sessionId is required.
When to Use
- Scoped (per-session): scratch acceptance scenarios, drill replays, isolating a polluted session without losing the main working session's stats.
- Project: KB contains stale or incorrect content polluting search results, switching between unrelated projects in the same session, completely fresh start.
Important
ctx_purgeis the only way to delete session data. No other mechanism exists.ctx_statsis read-only — shows statistics only./clearand/compactdo NOT affect any context-mode data.- There is no undo. Re-index content if you need it again.
الأسئلة الشائعة
هل يمكنني التراجع عن الحذف؟
لا. الحذف يمسح البيانات نهائياً، ولا يمكن استعادتها.
ما الفرق بين نطاق المشروع ونطاق الجلسة؟
نطاق المشروع يمسح كل شيء، أما نطاق الجلسة فيمسح صفوف تلك الجلسة فقط ويبقي الباقي.
هل يعيد الحذف ضبط الإحصاءات؟
حذف المشروع يمسح الإحصاءات أيضاً، أما حذف الجلسة فيبقي إحصاءات المشروع.
التفاصيل
الوصف الأصلي من المؤلف
Purge the context-mode knowledge base. Permanently deletes all indexed content and resets session stats. This is destructive and cannot be undone. Trigger: /context-mode:ctx-purge
repo: mksglu/context-mode
الشعبية
- نجوم GitHub
- 33k
- الترتيب
- #8514
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
context-mode
33kتعلّم وكيلك استخدام أدوات context-mode للقراءة والبحث والمهام الثقيلة في البيانات، حتى تبقى المخرجات الكبيرة خارج المحادثة الرئيسية.
context-mode
33kتعلّم وكيلك تنفيذ العمل الثقيل في البيانات داخل بيئة معزولة، وطباعة الإجابة فقط، حتى لا تغمر الملفات الخام وصفحات الويب المحادثة.
context-mode
33kتعلّم وكيلك استخدام أدوات context-mode بدلاً من أوامر الصدفة العادية عندما قد تكون المخرجات كبيرة، مثل السجلات وJSON ونتائج البناء.
ctx-doctor
33kتشغّل تشخيصات context-mode تفحص بيئات التشغيل والخطافات وتخزين البحث وإعداد الإضافة والإصدارات، ثم تعرض تقريراً واضحاً بالنجاح أو الفشل.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.