Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote 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/commands/nebulae/trudi/trudi-clear-case)<a href="https://agentmods.dev/commands/nebulae/trudi/trudi-clear-case"><img src="https://agentmods.dev/badge/commands/nebulae/trudi/trudi-clear-case.svg" alt="Measured on agentmods" 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.00027 | $0.01483 |
| Opus 5 | $0.00014 | $0.00741 |
| Sonnet 5 | $0.00005 | $0.00297 |
| Haiku 4.5 | $0.00003 | $0.00148 |
Grade C, and why
trudi-clear-case scanned grade C with 1 finding 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
3. **(live) remove monitoring state** — `rm -rf <case_dir>/monitoring`. How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/trudi-clear-case
Resets a case to a clean slate. Removes the investigation outputs and the
case's Claude project memory, and for a live-monitoring case also
stops the watcher and removes the monitoring state (alerts + everything
under monitoring/).
Destructive and irreversible — misc.clear_case_run hard-deletes (no
backup). This command therefore previews everything it will remove and
requires explicit confirmation before deleting anything. If the
operator wants a backup-taking reset of just the output dirs instead,
point them at python -m tools.trudi_reset --case-dir <case> --purge-outputs.
The argument, if supplied, names the case. Otherwise read it from
~/cases/.common/active_case.
What is removed vs. preserved
| Removed | Preserved |
|---|---|
analysis/*, exports/*, reports/* |
CLAUDE.md |
~/.cache/trudi/session.json |
.claude/settings.json (tool allowlist) |
~/.claude/projects/<encoded-case-dir>/memory/* (the case's project memory) |
any evidence/, mounted images |
live: monitoring/ (alerts, response, baselines, watchers, artifacts, seq/open-inv state) |
top-level case data files (e.g. ground_truth.json) |
live: TRUDI cache counter/hook-state (via trudi_reset) |
~/.cache/trudi/hash_cache.json (evidence-hash memo) |
The project-memory deletion is case-scoped: clear_case_run encodes
the case dir (/home/trin/cases/<case> → -home-trin-cases-<case>),
so it can never touch the global ~/.claude/projects/-home-trin/memory/.
Steps
1. Resolve the case
case_id=$ARGUMENTSif non-empty, elsecat ~/cases/.common/active_case. Refuse if neither is set.case_dir= absolute path~/cases/<case_id>(expand~). Confirm it exists. Use the absolute path everywhere so the encoded memory path resolves correctly.- Detect live: the case is live-monitoring if
<case_dir>/monitoring/exists. Otherwise treat as static-evidence.
2. Build the removal preview (read-only — delete NOTHING yet)
Enumerate the actual targets so the operator sees exactly what will go.
Use read-only shell (ls, find … | wc -l, du -sh) — no rm:
- Outputs: list contents of
analysis/,exports/,reports/. Show each file (or a count + total size if large). - Project memory: compute
encoded = <abs case_dir>with/→-; list files under~/.claude/projects/<encoded>/memory/(state "none" if the dir is absent/empty). - Cache: note
~/.cache/trudi/session.jsonwill be removed (and, live, the call-id counter / hook-state reset). - Live only:
monitor.list_watchers(case_id)— list watchers that will be stopped (client_id + alive/dead). (Ensure an execution log is active first: ifcore.execution_log.log._pathis unset, callmisc.start_execution_log(case_id, "<case_dir>/analysis/<case_id>_trace.json").)- Summarize
monitoring/that will be removed: alert payload count, response suggestion/approval/execution counts, baselines present, rendered detector artifacts, watcher pid/log files, and the_open_investigation.json/_last_check_seq.txt/_inv_seq.txtstate.
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.
- 4d ago Changed · -1 lines 65bce0971a4d
- 8d ago First seen · 111 lines · 27 tokens per session scan C c6450c743edc
trudi-clear-case is a command published in the GitHub repository nebulae/trudi (57 stars, last pushed 7d ago), licensed MIT. It adds 27 tokens to every session and 1,483 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.