Skip to content
cccskills
FreePublished on GitHub

ctx-purge

Delete stored context-mode data for one session or an entire project after confirming the scope. Remove an unwanted session while preserving others, or clear project knowledge, session records, and statistics for a fresh start.

OriginalShow the original description

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

See how to install

Good for

  • Remove data from one unwanted session
  • Clear a project database containing outdated information
  • Reset all stored project data for a fresh start

Files included (1)

  • SKILL.md2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

context-mode

FreeSummary

Analyze large logs, test results, API responses, and files outside the conversation, then return focused findings. It guides agents to save, process, index, and search outputs while limiting how much raw data enters their working context.

  • Extracting errors from large logs
  • Summarizing test failures and build warnings
  • Inspecting JSON and CSV data
mksglu/context-mode31.1KUpdated Oct 19, 2026

context-mode

FreeSummary

Route codebase exploration, file analysis, and web research through context-mode tools in Antigravity CLI. Process large outputs outside the conversation and return focused findings, with indexed content available for later searches.

  • Explore a codebase and summarize key findings
  • Extract and count information in a file
  • Index web content for follow-up searches
mksglu/context-mode31.1KUpdated Oct 19, 2026

context-mode

FreeSummary

Route data analysis, large-file processing, and web retrieval through context-mode tools, returning only relevant results to the conversation. This helps preserve the context window, the limited amount of information an AI can work with at once.

  • Counting or filtering large datasets
  • Retrieving relevant information from web pages
  • Collecting and searching results from multiple commands
mksglu/context-mode31.1KUpdated Oct 19, 2026

context-mode-ops

FreeSummary

Coordinate multiple agents to maintain context-mode, from sorting GitHub issues and reviewing pull requests to preparing releases and announcements. Workflows require reproduced bugs, source evidence, test-first changes, and checks across supported platforms.

  • Investigating reported bugs and their history
  • Reviewing contributor pull requests
  • Preparing releases and compatibility checks
mksglu/context-mode31.1KUpdated Oct 19, 2026

ctx-doctor

FreeSummary

Run context-mode diagnostics to check runtimes, hooks, full-text search support, plugin registration, and npm and marketplace versions. Results appear directly in the conversation with clear status labels, with a CLI fallback if the MCP call fails.

  • Checking the environment after installation
  • Checking hooks and full-text search support
  • Reviewing plugin registration status
mksglu/context-mode31.1KUpdated Oct 19, 2026

ctx-index

FreeSummary

Index local files or folders in context-mode’s persistent search database, so later searches can retrieve relevant passages without rereading entire files. Useful for repeatedly consulting project documents while keeping raw file contents out of the conversation.

  • Preparing project documents for repeated searches
  • Finding relevant passages in local files
  • Indexing a repository with selected folders excluded
mksglu/context-mode31.1KUpdated Oct 19, 2026

See all skills by mksglu

Report a problem with this skill