It is the fastest practical first-pass search in repository workflows.
Repo Conventions
Prefer ripgrep for discovery before semantic or AST-level tools.
Include ignored files only when the task explicitly requires them.
Trigger Examples
Should trigger: "Find where --user-install is referenced."
Should trigger: "Search all markdown docs for stale command examples."
Should not trigger: "Rename a Python symbol across semantic references only."
1---2name: tool-ripgrep-23description: tool-ripgrep4---5# tool-ripgrep67## When To Use89- Search file contents across large codebases faster than grep.10- Find symbols, flags, and text patterns before opening files.11- Build parseable discovery pipelines for agent workflows.1213## Trusted Commands1415```bash16rg "pattern" path/17rg -F "exact string"18rg "pattern" -t py19rg "pattern" -g '*.py'20rg "pattern" -C 321rg -l "pattern"22rg -c "pattern"23rg -i "pattern"24rg "pattern" --json25rg --exit-status "pattern"26```2728## Safe Defaults2930- Use `-n` when actionable line references are needed.31- Use `-F` for literal strings to avoid regex escaping mistakes.32- Use `--glob`/`-g` and type filters to keep results relevant and fast.3334## Common Pitfalls3536- Hidden and ignored files are skipped by default.37- Regex mode can over-match when fixed-string matching was intended.38- `--json` emits begin/match/end/summary events, not a single flat schema.3940## Output Interpretation4142- Default output is `path:line:column:matched_text`.43- Exit code 1 means no matches and can be a valid outcome.44- `--exit-status` is useful in conditional shell pipelines.4546## Why It Matters For Agents4748- `rg --json` produces structured, machine-parseable search events.49- It is the fastest practical first-pass search in repository workflows.5051## Repo Conventions5253- Prefer ripgrep for discovery before semantic or AST-level tools.54- Include ignored files only when the task explicitly requires them.5556## Trigger Examples5758- Should trigger: "Find where `--user-install` is referenced."59- Should trigger: "Search all markdown docs for stale command examples."60- Should not trigger: "Rename a Python symbol across semantic references only."
Run npx skillmds@latest add niksavis/tool-ripgrep-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
tool-ripgrep It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
niksavis (@niksavis) published this skill. Their other Agent Skills are listed on their SkillMD profile.