tgrep-searchlisted
Install: claude install-skill xeonvs/xeonvs-engineering
# tgrep Search
`tgrep` is a ripgrep-compatible regex search with an optional trigram index and
local server. It is valuable for repeated discovery in large trees; a single
small-tree query generally does not justify setup. This guidance uses ordinary
shell commands and is portable across Codex, Claude Code, OpenCode, and other
terminal-capable agents.
Search output is discovery evidence, not proof that a behavior is reachable,
safe, or correct. Inspect the owning code and tests before acting on it.
## Choose the lightest useful mode
| Situation | Use | Why |
| --- | --- | --- |
| One query or a small tree | `rg -- ...` or already-available `tgrep -- ...` | Avoid setup cost. |
| Several queries in one task | `tgrep index ...`, then indexed searches | One bounded index amortizes repeated discovery. |
| Long-lived terminal session with many edits | One supervised `tgrep serve ...` | A single-root server maintains a live overlay and answers multiple clients. |
| Many linked worktrees with repeated searches | Consider opt-in managed v2; read [shared worktree guidance](references/shared-worktrees.md) first | Sharing can reduce duplicate storage/build work, but adds lifecycle cost. |
| Exact post-edit or exhaustive absence check | `rg -- ...` or `tgrep --no-index ...` | Read the current filesystem rather than a possibly stale snapshot. |
Do not start a persistent server for a short task or a non-persistent agent
runtime. A personal or non-coding agent can use the same modes ove