मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट33k · #8514

ctx-purge

यह क्या करती है

यह स्किल किसी प्रोजेक्ट के लिए context-mode द्वारा सहेजे गए सर्च इंडेक्स और सेशन डेटा को मिटाती है। यह उन लोगों के लिए है जो पुराना इंडेक्स किया गया कंटेंट हटाना या नए सिरे से शुरू करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब कोई एक पुराने सेशन का इंडेक्स किया गया कंटेंट हटाना चाहे।
  • ✓जब प्रोजेक्ट का सर्च इंडेक्स भरा हुआ हो और सब कुछ साफ़ करना हो।
  • ✓जब प्रोजेक्ट को दोबारा इंडेक्स करने से पहले साफ़ शुरुआत चाहिए।

Skill का लिंक

https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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>" or scope: "session"): wipes ONLY the matching session's rows + FTS5 chunks. Sibling sessions, project stats, and the FTS5 store file are preserved.

Instructions

  1. 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).
  2. 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
  3. Call the mcp__context-mode__ctx_purge MCP 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.
  4. 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: true is always required.
  • sessionId and scope: "project" together is REJECTED as ambiguous (the sessionId implies session scope; combining with project scope contradicts intent).
  • scope: "session" without sessionId throws — 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_purge is the only way to delete session data. No other mechanism exists.
  • ctx_stats is read-only — shows statistics only.
  • /clear and /compact do 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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

context-mode

33k

आपके एजेंट को पढ़ने, खोजने और डेटा-भारी काम चलाने के लिए context-mode टूल इस्तेमाल करना सिखाती है, ताकि बड़े आउटपुट मुख्य बातचीत में न आएँ।

AI और एजेंटएजेंट

context-mode

33k

आपके एजेंट को डेटा-भारी काम sandbox में चलाकर केवल जवाब छापना सिखाती है, ताकि कच्ची फ़ाइलें और वेब पेज बातचीत न भरें।

AI और एजेंटएजेंट

context-mode

33k

आपके एजेंट को बड़े आउटपुट वाले कामों, जैसे लॉग, JSON या बिल्ड के नतीजे, के लिए सादे शेल कमांड की जगह context-mode टूल इस्तेमाल करना सिखाती है।

AI और एजेंटएजेंट

ctx-doctor

33k

context-mode के डायग्नोस्टिक चलाती है, जो रनटाइम, हुक, सर्च स्टोरेज, प्लगइन सेटअप और वर्शन जाँचती है, फिर साफ़ पास या फ़ेल रिपोर्ट दिखाती है।

AI और एजेंटएजेंट

मिलती-जुलती skills