Help us improve
Share bugs, ideas, or general feedback.
From hatch3r
Fast recursive grep with gitignore awareness for regex content searches across source trees. Invoke `rg` with `-c` or `--max-count` to bound results.
npx claudepluginhub hatch3r/hatch3rHow this skill is triggered — by the user, by Claude, or both
Slash command
/hatch3r:hatch3r-cli-ripgrepThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- HATCH3R-CLI-SKILL-GENERATED v1 -->
Searches codebases using ripgrep (rg) with regex patterns, file type/extension filtering, multi-line support, and .gitignore respect. Use for text patterns, code snippets, or multi-file analysis.
User-friendly find replacement, gitignore-aware. Locates filenames or directories by glob with parallel walking; outputs newline-separated hit records.
Provides cheatsheets for fd to find files, ripgrep (rg) to search code content, and fzf for interactive fuzzy selection with previews. Includes combined workflows and performance tips.
Share bugs, ideas, or general feedback.
Fast recursive grep with sane defaults and gitignore awareness
Before invoking rg, resolve these via agents/shared/user-question-protocol.md (default behavior, not exception-driven):
--no-ignore, --hidden) over a large tree, confirm the intended path before running — an unscoped scan over a monorepo can return tens of thousands of hits.rg is read-only — it never mutates files, so no destructive confirmation is needed. The only risk is unbounded output flooding context; cap with --max-count / -l / -c when match density is unknown.-F vs regex, case-sensitive vs -i), ask which one.Tier 1 reference card — no fan-out. This skill is a single-tool usage reference an agent consults inline; it spawns no sub-agents. Fan-out is owned by the calling workflow per its own Fan-out Discipline block. Source: .claude/rules/fan-out-discipline.md (P8 B2).
Reach for rg when the task is in the search category and the agent would otherwise call an MCP tool or read large outputs into context.
CLI tools return structured stdout that fits in <1KB for typical queries; equivalent MCP calls regularly exceed 10KB. Reference: Anthropic engineering (Nov 4 2025) — code-execution-over-MCP yields 98.7% token reduction.
rg --json -tts 'createServer\(' src/
Structured JSON output scoped to TypeScript — parse hits with jq instead of re-reading files.
rg -c 'TODO' --type ts
Per-file match counts for .ts files; cheap stand-in for issue-debt triage.
rg -B 2 -A 4 'BREAKING' --max-count 50 CHANGELOG.md
Context windows around BREAKING entries, capped at 50 hits to bound output size.
rg --hidden --no-ignore 'API_KEY' .
Pierces both dotfiles and .gitignore rules — use when scanning for accidentally-committed secrets.
rg --files-with-matches 'deprecated' src/ | xargs -I{} rg -n 'deprecated' {}
Two-phase: file list first, then ranged scan — keeps stdout small when match density is uneven.
rg to match by code structure (function calls, type signatures, JSX shape); literal regex misses renames and whitespace variants. Reach for ast-grep (see the ast-grep section in hatch3r-cli-toolbox).rg against binary blobs (.zst, .png, lockfile snapshots); it skips them silently by default but explicit -a mode wastes CPU. Reach for category-specific tools (zstd -d then rg, or xxd | rg for hex).rg to search a specific git revision or stash — it only sees the working tree. Reach for git grep <rev>.| Tool | When to prefer |
|---|---|
ast-grep (toolbox section) | Structural code patterns: matchers like console.log($MSG) that survive whitespace and identifier renames. |
git grep | Search at a specific revision, tag, or stash — rg only reads the working tree. |
fd (hatch3r-cli-fd) piped into rg | Filename pre-filter when scoping by extension/age is faster than rg --type. |
grep -RIn | POSIX-only environment where ripgrep is not on PATH and install is blocked. |
Verify with:
command -v rg
Install (macOS — default for this machine):
# brew
brew install ripgrep
Install (Linux):
# apt
sudo apt install ripgrep
Install (Windows):
# scoop
scoop install ripgrep
Homepage: https://github.com/BurntSushi/ripgrep