Initial commit with translated description

This commit is contained in:
2026-03-29 14:37:52 +08:00
commit dac6c65980
3 changed files with 84 additions and 0 deletions

67
SKILL.md Normal file
View File

@@ -0,0 +1,67 @@
---
name: file-search
description: "使用fd和rg快速文件名和内容搜索。"
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
```