file-search — Claude Code skill: search code and files fast
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.
npx skills add netresearch/file-search-skill --skill file-search -a claude-codeWhat file-search 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.
What it helps with
- 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 for the agent
- 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
How to install file-search
1Skills CLI (Vercel)
npx skills add netresearch/file-search-skill --skill file-search -a claude-code2Manually: put the files in place
~/.claude/skills/file-search/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/file-search/
1Skills CLI (Vercel)
npx skills add netresearch/file-search-skill --skill file-search -a codex2Manually: put the files in place
.agents/skills/file-search/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add netresearch/file-search-skill --skill file-search -a cursor2Manually: put the files in place
.cursor/skills/file-search/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install netresearch/file-search-skill file-search2Manually: put the files in place
.github/skills/file-search/SKILL.md1Skills CLI (Vercel)
npx skills add netresearch/file-search-skill --skill file-search -a gemini-cli2Platform CLI
gemini skills install https://github.com/netresearch/file-search-skill --path skills/file-searchManually: put the files in place
.devin/skills/file-search/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add netresearch/file-search-skill --skill file-search -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about file-search
How do I install file-search in Claude?
Run npx skills add netresearch/file-search-skill --skill file-search -a claude-code. The skill lands at ~/.claude/skills/file-search/SKILL.md.
What does file-search do?
It gives the agent rules for picking a search tool: rg for text, fd for filenames, sg for structural search, semgrep for rule packs, rga for PDFs and archives, tokei and scc for stats.
What does file-search need to work?
ripgrep is required. fd, ast-grep, rga, tokei, scc and semgrep are optional, but the matching search scenarios stay unavailable without them.