Claude-context-mode ctx-purge
install
source · Clone the upstream repo
git clone https://github.com/mksglu/context-mode
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/mksglu/context-mode "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ctx-purge" ~/.claude/skills/mksglu-claude-context-mode-ctx-purge && rm -rf "$T"
manifest:
skills/ctx-purge/SKILL.mdsource content
Context Mode Purge
Permanently deletes ALL session data for this project: knowledge base, session events, analytics, and stats.
Instructions
- Warn the user: This is irreversible. 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)
- Session events markdown file
- In-memory session stats
- FTS5 knowledge base (all indexed content from
- Call the
MCP tool withmcp__context-mode__ctx_purge
.confirm: true - Report the result to the user — the response lists exactly what was deleted.
When to Use
- When the KB contains stale or incorrect content polluting search results.
- When switching between unrelated projects in the same session.
- When you want a completely fresh start for this project.
Important
is the only way to delete session data. No other mechanism exists.ctx_purge
is read-only — shows statistics only.ctx_stats
and/clear
do NOT affect any context-mode data./compact- There is no undo. Re-index content if you need it again.