file-search
Installation
SKILL.md
File Search Skill
Efficient CLI search tools for AI agents.
Tool Selection Guide
| Task | Use | Instead of |
|---|---|---|
| Search text in code files | rg (ripgrep) |
grep, grep -r |
| Find files by name/path | fd |
find, ls -R |
| Structural/syntax-aware code search | sg (ast-grep) |
regex hacks |
| Search PDFs, Office docs, archives | rga (ripgrep-all) |
manual extraction |
| Count lines of code by language | tokei |
cloc, wc -l |
| Code stats with complexity metrics | scc |
cloc, tokei |
Decision flow: text/regex → rg | code structure (empty catches,
function sigs, multi-line patterns) → sg | files by name → fd |
PDFs/archives → rga | codebase stats → tokei/scc