# file-search

A skill that points your agent at rg, fd, ast-grep, semgrep, rga, tokei and scc instead of grep and find. Useful for gathering context before a task.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 521 installs · ★ 41
- Author: Netresearch DTT GmbH
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/netresearch/file-search-skill/tree/HEAD/skills/file-search/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/file-search

## What it does

The skill hands the agent a tool-selection table. Text goes through `rg`, files by name through `fd`, syntax-aware search through `sg` (ast-grep), security and taint rule packs through `semgrep`, PDFs, Office docs and archives through `rga`, language stats through `tokei` or `scc`. A decision flow follows the same order: text, structure, rule packs, filenames, archives, lines of code.

Quick command examples ship with the skill, along with a set of practices. It advises starting narrow: name the file types, scope the directory, count matches first with `rg -c`. Noise gets excluded with `-g '!vendor/'` and `fd -E node_modules`. Independent queries belong in one walk or as parallel tool calls, not chained with `&&`. There is a `--json` flag for programmatic processing.

\`ripgrep` is required. `fd`, `ast-grep`, `rga`, `tokei`, `scc` and `semgrep` are optional, and without them some search scenarios simply do not run. One more trap: `rg` and `fd` types do not line up. `rg -t ts` covers `.tsx`, `fd -e ts` does not, and `rg` has no `-t tsx`. When local search comes up empty and the context lives in issues, PRs or external docs, the skill hands off to `gh`, Jira or WebFetch.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add netresearch/file-search-skill --skill file-search -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/file-search/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/file-search/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add netresearch/file-search-skill --skill file-search -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/file-search/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add netresearch/file-search-skill --skill file-search -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/file-search/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install netresearch/file-search-skill file-search
```

2. **Manually: put the files in place**
- File: `.github/skills/file-search/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add netresearch/file-search-skill --skill file-search -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/netresearch/file-search-skill --path skills/file-search
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/file-search/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add netresearch/file-search-skill --skill file-search -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/netresearch/file-search-skill/tree/HEAD/skills/file-search/SKILL.md

## When to use it
- find every call site of a function across the repo in one pass
- pick files by name pattern and check their contents right away
- rewrite a call by syntax pattern instead of a regex hack
- run security and taint rule packs over a project
- pull text out of PDFs and archives without manual extraction

## Example prompts
- Find all Python function definitions in src/ with rg and show where they are called
- Find *_test.go files and list the tests declared in them
- Count lines of code by language and show the most complex modules

## Similar
- [codebase-search](https://affpapa.org/en/nevibecode/skills/codebase-search.md) — skill · 392 installs
- [ast-grep](https://affpapa.org/en/nevibecode/skills/pproenca-ast-grep.md) — skill · 332 installs
- [search](https://affpapa.org/en/nevibecode/skills/entireio-search.md) — skill · 458 installs
- [search-router](https://affpapa.org/en/nevibecode/skills/search-router.md) — skill · 485 installs
- [exa-web-search-free](https://affpapa.org/en/nevibecode/skills/exa-web-search-free.md) — skill · 2800 installs
- [grepai-search-tips](https://affpapa.org/en/nevibecode/skills/grepai-search-tips.md) — skill · 778 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
