file-search

TotalClaw 作者 totalclaw

使用“fd”和“rg”(ripgrep)快速搜索文件名和内容。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~file-search
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~file-search/file -o file-search.md
## 概述(中文)

使用“fd”和“rg”(ripgrep)快速搜索文件名和内容。

## 原文

# 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
```