Summary
TL;DR: Fast file-name and content search using `fd` and `rg` (ripgrep).
File Search gives your AI agent fast file finding powered by fd and ripgrep (rg). Search by file name with fd, or search inside file contents with rg. Both tools are much faster than find and grep.
When your agent needs to locate a file in a large codebase or find a specific string across thousands of files, this skill makes it instant. fd handles name searches, rg handles content searches.
Simple and focused. No extra features, just the fastest way for your agent to find files. Part of our search & research collection and text across your project.
Use cases
- Finding files by name pattern across large codebases in milliseconds
- Searching file contents for specific strings, functions, or error messages
- Locating configuration files buried deep in nested directories
- Quickly finding all files that reference a specific API or variable
Installation
Run this command to install the skill on your OpenClaw agent:
npx clawhub@latest install file-searchSecurity scan
This skill is internally coherent: it documents use of fd and ripgrep, only requires those binaries (installed via distro packages), and its runtime instructions are limited to running those search commands.
SKILL.md
---
name: file-search
description: "Fast file-name and content search using `fd` and `rg` (ripgrep)."
metadata:
{
"openclaw":
{
"emoji": "🔍",
"requires": { "bins": ["fd", "rg"] },
"install":
[
{
"id": "dnf-fd",
"kind": "dnf",
"package": "fd-find",
"bins": ["fd"],
"label": "Install fd-find (dnf)",
},
{
"id": "dnf-rg",
"kind": "dnf",
"package": "ripgrep",
"bins": ["rg"],
"label": "Install ripgrep (dnf)",
},
],
},
}
---
# File Search Skill
Fast file-name and content search using `fd` and `rg` (ripgrep).
## Find Files by Name
Search for files matching a pattern:
```bash
fd "\.rs$" /home/xrx/projects
```
Find files by exact name:
```bash
fd -g "Cargo.toml" /home/xrx/projects
```
## Search File Contents
Search for a regex pattern across files:
```bash
rg "TODO|FIXME" /home/xrx/projects
```
Search with context lines:
```bash
rg -C 3 "fn main" /home/xrx/projects --type rust
```
## Install
```bash
sudo dnf install fd-find ripgrep
```
Version history
Initial publish
Frequently asked questions
fd is a fast file finder (alternative to find), and rg is ripgrep, a fast content search tool (alternative to grep). Both are written in Rust and run many times faster than their traditional counterparts.
Installation method
Send this prompt to your agent to install the skill
npx clawhub@latest install file-searchSkill data sourced from ClawHub