ctx-purge
Fungsinya
Skill ini menghapus indeks pencarian dan data sesi yang disimpan context-mode untuk sebuah proyek. Cocok untuk orang yang ingin membersihkan konten lama yang sudah diindeks atau memulai dari awal.
Kapan dipakai
- βSaat seseorang ingin menghapus konten yang diindeks dari satu sesi lama.
- βSaat indeks pencarian sebuah proyek penuh dan semuanya perlu dibersihkan.
- βSaat seseorang menginginkan awal yang bersih sebelum mengindeks ulang proyek.
Link skill
https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBersihkan indeks context-mode untuk proyek ini agar saya bisa mulai dari awal.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill pertama-tama menanyakan apakah akan menghapus satu sesi atau seluruh proyek, lalu memperingatkan apa yang akan dihapus. Penghapusan dijalankan hanya setelah Anda mengonfirmasi cakupannya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum
Bisakah penghapusan dibatalkan?
Tidak. Penghapusan bersifat permanen, sehingga data tidak bisa dipulihkan.
Apa bedanya cakupan proyek dan sesi?
Cakupan proyek menghapus semuanya, sedangkan cakupan sesi hanya menghapus baris milik sesi itu dan menyimpan sisanya.
Apakah statistik penggunaan ikut direset?
Penghapusan proyek juga menghapus statistik, sedangkan penghapusan sesi tetap menyimpan statistik proyek.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 33k
- Peringkat
- #8514
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
context-mode
33kMengajari agent Anda menggunakan alat context-mode untuk membaca, mencari, dan menjalankan tugas yang berat data, sehingga keluaran besar tetap di luar percakapan utama.
context-mode
33kMengajari agent Anda menjalankan pekerjaan berat data di sandbox dan hanya mencetak jawabannya, sehingga file mentah dan halaman web tidak membanjiri percakapan.
context-mode
33kMengajari agent Anda menggunakan alat context-mode, bukan perintah shell biasa, saat keluaran mungkin besar, seperti log, JSON, atau hasil build.
ctx-doctor
33kMenjalankan diagnosis context-mode yang memeriksa runtime, hook, penyimpanan pencarian, penyiapan plugin, dan versi, lalu menampilkan laporan lulus atau gagal yang jelas.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.