file-search
Original:🇺🇸 English
Translated
Modern file and content search using fd, ripgrep (rg), and fzf. Triggers on: fd, ripgrep, rg, find files, search code, fzf, fuzzy find, search codebase.
9installs
Source0xdarkmatter/claude-mods
Added on
NPX Install
npx skill4agent add 0xdarkmatter/claude-mods file-searchTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →File Search
Modern file and content search.
fd - Find Files
bash
# Find by name
fd config # Files containing "config"
fd -e py # Python files
# By type
fd -t f config # Files only
fd -t d src # Directories only
# Exclude
fd -E node_modules # Exclude directory
fd -E "*.min.js" # Exclude pattern
# Execute command
fd -e py -x wc -l # Line count per filerg - Search Content
bash
# Simple search
rg "TODO" # Find TODO
rg -i "error" # Case-insensitive
# By file type
rg -t py "import" # Python files only
rg -t js -t ts "async" # JS and TS
# Context
rg -C 3 "function" # 3 lines before/after
# Output modes
rg -l "TODO" # File names only
rg -c "TODO" # Count per filefzf - Interactive Selection
bash
# Find and select
fd | fzf
# With preview
fd | fzf --preview 'bat --color=always {}'
# Multi-select
fd -e ts | fzf -m | xargs codeCombined Patterns
bash
# Find files, search content
fd -e py -x rg "async def" {}
# Search, select, open
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vimQuick Reference
| Task | Command |
|---|---|
| Find TS files | |
| Find in src | |
| Search pattern | |
| Search in type | |
| Files with match | |
| Count matches | |
| Interactive | |
| With preview | |
Performance Tips
| Tip | Why |
|---|---|
Both respect | Auto-skip node_modules, dist |
Use | Type flags are faster |
| Narrow the path | |
Use | Avoids regex overhead |
Additional Resources
For detailed patterns, load:
- - Git integration, shell functions, power workflows
./references/advanced-workflows.md