ctx-purge
यह क्या करती है
यह स्किल किसी प्रोजेक्ट के लिए context-mode द्वारा सहेजे गए सर्च इंडेक्स और सेशन डेटा को मिटाती है। यह उन लोगों के लिए है जो पुराना इंडेक्स किया गया कंटेंट हटाना या नए सिरे से शुरू करना चाहते हैं।
कब इस्तेमाल करें
- ✓जब कोई एक पुराने सेशन का इंडेक्स किया गया कंटेंट हटाना चाहे।
- ✓जब प्रोजेक्ट का सर्च इंडेक्स भरा हुआ हो और सब कुछ साफ़ करना हो।
- ✓जब प्रोजेक्ट को दोबारा इंडेक्स करने से पहले साफ़ शुरुआत चाहिए।
Skill का लिंक
https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस प्रोजेक्ट का context-mode इंडेक्स साफ़ कीजिए, ताकि मैं नए सिरे से शुरू कर सकूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल पहले पूछती है कि एक सेशन मिटाना है या पूरा प्रोजेक्ट, फिर बताती है कि क्या मिटेगा। आपके दायरे की पुष्टि के बाद ही purge चलता है।
तकनीकी सामग्री (मूल 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 वापस हो सकता है?
नहीं। purge डेटा स्थायी रूप से मिटाता है, इसलिए वह वापस नहीं मिल सकता।
प्रोजेक्ट और सेशन दायरे में क्या अंतर है?
प्रोजेक्ट दायरा सब कुछ मिटाता है, जबकि सेशन दायरा केवल उस सेशन की पंक्तियाँ हटाता है और बाकी रखता है।
क्या इससे उपयोग के आँकड़े रीसेट होते हैं?
प्रोजेक्ट purge आँकड़े भी मिटाता है, जबकि सेशन purge प्रोजेक्ट के आँकड़े रखता है।
जानकारी
लेखक का मूल विवरण
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
कमेंट
- …
इस repository की और skills
context-mode
33kआपके एजेंट को पढ़ने, खोजने और डेटा-भारी काम चलाने के लिए context-mode टूल इस्तेमाल करना सिखाती है, ताकि बड़े आउटपुट मुख्य बातचीत में न आएँ।
context-mode
33kआपके एजेंट को डेटा-भारी काम sandbox में चलाकर केवल जवाब छापना सिखाती है, ताकि कच्ची फ़ाइलें और वेब पेज बातचीत न भरें।
context-mode
33kआपके एजेंट को बड़े आउटपुट वाले कामों, जैसे लॉग, JSON या बिल्ड के नतीजे, के लिए सादे शेल कमांड की जगह context-mode टूल इस्तेमाल करना सिखाती है।
ctx-doctor
33kcontext-mode के डायग्नोस्टिक चलाती है, जो रनटाइम, हुक, सर्च स्टोरेज, प्लगइन सेटअप और वर्शन जाँचती है, फिर साफ़ पास या फ़ेल रिपोर्ट दिखाती है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।