Skip to content

aalmada/Stationary / .agents/skills/ripgrep

ripgrep

Flagged

Search files and code with ripgrep (`rg`) after preferring available code-indexing tools. Use when: finding literal text or regex matches; listing searchable files; filtering by glob or file type; checking whether `rg` is installed; installing ripgrep on macOS, Linux, or Windows; replacing legacy text-search commands in agent workflows. ALWAYS prefer an available fresh code index for symbols, references, call paths, architecture, and impact analysis, then use `rg` for text search. NEVER use `grep`. DO NOT USE FOR: structural code questions already answered by an available index; modifying matched files; searching binary formats without a text preprocessor.

Ripgrep

Anatomy

FilePurposeTarget Size
SKILL.mdSearch policy, availability check, quick reference<100 lines
references/installation.mdInstall and verify rg across platforms<200 lines
references/usage.mdSearch patterns, filtering, output, and diagnostics<200 lines

Search Policy

Use the first applicable route:

  1. Use an available, fresh code index for symbols, definitions, references, implementations, call paths, architecture, dependencies, dead code, or change impact. Examples: codebase-memory, language-server, IDE symbol, or repository index tools.
  2. Use rg for exact text, regex, filenames, configuration values, logs, generated text, or when the index cannot answer the question.
  3. If rg is unavailable, install it or report the blocker. Never fall back to grep.

For codebase-memory, prefer its one-shot CLI and verify index freshness before querying:

command -v codebase-memory-mcp && codebase-memory-mcp --version
codebase-memory-mcp cli index_status --project <project-name>

Availability

if command -v rg >/dev/null 2>&1; then
  rg --version
else
  printf '%s\n' 'ripgrep (rg) is not installed or is not on PATH.'
fi

See installation when the check fails.

Quick Reference

NeedCommand
Search recursivelyrg 'pattern' [path]
Search literal textrg -F 'literal text' [path]
Ignore case / smart caserg -i 'pattern' / rg -S 'pattern'
Match whole wordsrg -w 'pattern'
Include / exclude globsrg 'pattern' -g '*.cs' -g '!bin/**'
Include / exclude typesrg 'pattern' -tcs / rg 'pattern' -Tjson
List searchable filesrg --files [path]
List matching files onlyrg -l 'pattern' [path]
Show contextrg -n -C 2 'pattern' [path]
Search hidden filesrg --hidden 'pattern'
Explain skipped filesrg --debug 'pattern' [path]
Show supported typesrg --type-list
Full command helprg --help

Quote patterns and globs so the shell does not expand them. Ripgrep respects .gitignore, .ignore, and .rgignore and skips hidden and binary files by default.

Reference Files

FileLoad When
references/installation.mdChecking availability; installing, upgrading, or verifying ripgrep
references/usage.mdBuilding searches; filtering paths; handling ignores, regex, output, or exit status
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 319kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 319kUpdated Claude CodeCodexVerifiedInstall