Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add opencue/cuecards --skill ctx-purgegit clone --depth 1 https://github.com/opencue/cuecardsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/opencue/cuecards/ctx-purge)<a href="https://agentmods.dev/skills/opencue/cuecards/ctx-purge"><img src="https://agentmods.dev/badge/skills/opencue/cuecards/ctx-purge/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/opencue/cuecards/ctx-purge"><img src="https://agentmods.dev/badge/skills/opencue/cuecards/ctx-purge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00630 |
| Opus 5.5 | $0.00017 | $0.00252 |
| Sonnet 5.5 | $0.00008 | $0.00126 |
| Haiku 4.5 | $0.00004 | $0.00063 |
Grade A, and why
ctx-purge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on 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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 50 lines · 42 tokens per session scan A 1961df70dcdd
ctx-purge is a skill published in the GitHub repository opencue/cuecards (10 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 630 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
ctx-purge compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ctx-purgeopencue/cuecards | Skill | 10 | yesterday | MIT | A | 42 | Claude Code |
| atomic-wikidamusix/atomic-claude | Skill | 117 | yesterday | MIT | A | 216 | Claude Code, Codex |
| nextllmapi-pro/claude-next | Skill | 2 | 6mo ago | MIT | A | 66 | Claude Code, Codex |
| retiring-and-inheriting-a-seatmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 145 | Claude Code |
| session-compaction-and-restoremvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | B | 88 | Claude Code |
| durable-session-stateZaxbyHub/opencode-swarm | Skill | 549 | today | MIT | A | 70 | Claude Code |
| reportcwinvestments/memstack | Skill | 433 | 18d ago | MIT | A | 67 | Claude Code |