ripgrep

Search codebases for patterns with ripgrep, returning file paths, line numbers, and context.

20|2|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/xdg/xdg-claude --skill ripgrep-xdg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ripgrep
Source: https://github.com/xdg/xdg-claude/tree/main/context-efficient-tools/skills/ripgrep
Command: npx skills add https://github.com/xdg/xdg-claude --skill ripgrep-xdg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ripgrep enables fast, targeted text search across codebases by returning file names, line numbers, and context in a single operation.

Core Features & Use Cases

  • One-shot searches with context: Get files, line numbers, and surrounding lines in one command.
  • Flexible file-type filtering: Narrow results to specific languages or file types.
  • Real-world use case: Quickly locate function definitions and usages across a large repository.

Quick Start

Run ripgrep with a pattern to locate all occurrences in your codebase in a single pass

Frequently Asked Questions about ripgrep

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

FAQPage Schema
How do I search for a string across a codebase and get file names with line numbers?

To search for a string across a codebase and get file paths with line numbers, use ripgrep to find occurrences in a single pass. It returns matching file paths, line numbers, and surrounding context for quick triage.

Can I filter text search results to specific programming languages or file types?

Yes, you can filter text search results to specific languages or file types. The ripgrep Skill supports flexible file-type filtering, allowing you to narrow results to a targeted subset of your software repository.

What is the best way to locate function definitions and usages in a large repository?

The best way to locate function definitions and usages in a large repository is using ripgrep. It performs a fast, one-shot text search across multiple languages, returning exact locations and surrounding context.

Do I need ripgrep installed on my host to search codebases for patterns?

Yes, you need ripgrep available on your host to search codebases for patterns. This Skill requires the ripgrep executable to run its efficient, one-shot text searches across software repositories.

Can I match exact fixed strings instead of regex patterns when searching code?

Yes, you can match exact fixed strings instead of regex patterns when searching code. The ripgrep Skill supports common flags for fixed strings and word boundaries to refine your text search.

How do I get surrounding context lines when searching for code occurrences?

To get surrounding context lines when searching for code occurrences, use ripgrep with its context depth flags. It returns matching lines along with configurable surrounding context in a single operation.