ripgrep

Search text patterns across files with regex and .gitignore support.

49|9|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/ratacat/claude-skills --skill ripgrep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ripgrep
Source: https://github.com/ratacat/claude-skills/tree/main/skills/ripgrep
Command: npx skills add https://github.com/ratacat/claude-skills --skill ripgrep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Use when you need to locate text patterns quickly across files, codebases, books, or documents. Ripgrep (rg) is vastly faster than grep and respects .gitignore by default, making it ideal for searching large codebases.

Core Features & Use Cases

  • Fast, line-oriented search across directories
  • Regex support with smart defaults
  • Respect for .gitignore and file type filtering
  • Useful for finding function definitions, imports, or TODOs across large projects

Quick Start

Use the ripgrep tool to search for a pattern, e.g.: rg "pattern" [path]

Frequently Asked Questions about ripgrep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for text patterns across a large codebase quickly?

Ripgrep searches for text patterns across files and directories vastly faster than grep. It supports regex patterns, respects .gitignore by default, and handles large codebases recursively, making it ideal for locating function definitions, imports, or TODOs across projects.

Does ripgrep respect .gitignore and filter by file type?

Yes, ripgrep respects .gitignore by default and excludes ignored files from searches. It also supports file-type filtering, allowing you to search only specific file formats while automatically skipping unrelated or ignored directories.

Can I use regex patterns and get output in different formats?

Ripgrep supports full regex pattern matching with smart defaults for common cases. It outputs results in multiple formats including standard line-oriented results, JSON, and vimgrep format, enabling integration with other tools and workflows.

How do I display context around matching lines when searching?

Ripgrep lets you display lines before and after matches using context flags, helping you understand the surrounding code or documentation. This is useful for reviewing function definitions, error messages, or configuration values in their full context.

What's the difference between ripgrep and traditional grep for searching files?

Ripgrep is significantly faster than grep due to optimized algorithms and respects .gitignore by default, automatically excluding build artifacts and dependencies. It also offers better regex support, file-type filtering, and modern output formats out of the box.