trudi-start-watcher

trudi-start-watcher is a command for Claude Code from nebulae/trudi. It costs 19 tokens per session (974 once invoked), scanned A, original, MIT.

A command that starts live monitoring for a TRUDI investigation case. It prepares a baseline, installs the case’s detectors and starts a background watcher that records alerts.

In plain words
What is it for?
Use it to start monitoring a case with Velociraptor, a system for collecting endpoint evidence and events, then store detected alerts under the case’s monitoring directory.
Why use it?
It brings the monitoring parts of a case into an active state and ensures the required execution record is available.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it to start monitoring a case with Velociraptor, a system for collecting endpoint evidence and events, then store detected alerts under the case’s monitoring directory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nebulae/trudi/trudi-start-watcher
Install

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.

Clone the repo
git clone --depth 1 https://github.com/nebulae/trudi

Made for: Claude Code.

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.

agentmods badge for trudi-start-watcher

README.md
[![agentmods](https://agentmods.dev/badge/commands/nebulae/trudi/trudi-start-watcher.svg)](https://agentmods.dev/commands/nebulae/trudi/trudi-start-watcher)
Your own site
<a href="https://agentmods.dev/commands/nebulae/trudi/trudi-start-watcher"><img src="https://agentmods.dev/badge/commands/nebulae/trudi/trudi-start-watcher.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 974 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00974
Opus 5 $0.00010 $0.00487
Sonnet 5 $0.00004 $0.00195
Haiku 4.5 $0.00002 $0.00097

Measured 8d ago against content hash 7388a6559fcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

trudi-start-watcher 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 8d 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.

claude/commands/trudi-start-watcher.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/trudi-start-watcher

Brings a TRUDI live-monitoring case online: resolves the live Velociraptor client, ensures a baseline exists, renders the Custom.TRUDI.* detectors onto the client event table, and spawns the watcher sidecar that drains alerts into monitoring/alerts/.

The argument, if supplied, names the case. Otherwise read it from ~/cases/.common/active_case.

Steps

1. Resolve the case

  1. case_id = $ARGUMENTS if non-empty, else cat ~/cases/.common/active_case. Refuse if neither is set.
  2. case_dir = ~/cases/<case_id>. Confirm it exists and looks like a live-monitoring case (has monitoring/ or a CLAUDE.md describing Velociraptor). If it has no monitoring/ scaffold yet, that's fine — baseline_capture creates it.

2. Ensure an execution log is active (gate prerequisite)

monitor.* tools are blocked by the DAIR cold-start gate unless a trace is configured. If core.execution_log.log._path is unset, call:

misc.start_execution_log(case_id, output_path="<case_dir>/analysis/<case_id>_trace.json")

This (re)establishes the case-wide orchestration trace, which the /trudi-check-alerts loop also expects. Surface the returned dashboard_url.

3. Resolve the LIVE client_id (do NOT trust CLAUDE.md)

The victim re-enrolls and rotates its C.xxx id (container restarts, down -v). Always resolve it fresh:

velo.list_clients()
  • Pick the client whose hostname matches the case's target host (see the Target host row in <case_dir>/CLAUDE.md, typically victim). If several match, prefer the most recent last_seen_at.
  • If velo.list_clients returns nothing, the stack is down — surface a one-line warning ("Velociraptor has no enrolled clients; bring up the demo stack first") and exit.
  • If the resolved id differs from the Velociraptor client_id row in CLAUDE.md, update that row (move the old id into its history note).

4. Ensure a baseline for THAT client_id

Check <case_dir>/monitoring/baselines/<client_id>.json.

  • If missing (e.g. the client rotated), capture one:
    monitor.baseline_capture(client_id, case_id)
    
    The baseline is the known-good allowlist; only capture it when the host is in a clean state (a freshly-restarted/clean victim). If the summary shows unexpected persistence_paths / endpoints, note that the baseline may have absorbed pre-existing artifacts.
  • Optionally remove stale baseline files for dead clients (baselines/<old_client_id>.json) so the directory only holds the active client.

Read the full file on GitHub · 84 lines

Changes

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.

  1. 8d ago First seen · 84 lines · 19 tokens per session scan A 7388a6559fcf

Subscribe to this mod's changes

trudi-start-watcher is a command published in the GitHub repository nebulae/trudi (57 stars, last pushed 7d ago), licensed MIT. It adds 19 tokens to every session and 974 once invoked, about $0.0001 per session on Opus 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-30.