mcpField
F
file-search

file-search

github.com/0xdarkmatterDevelopment79244 installsUpdated 5d ago
Repository

About file-search

file-search is a developer skill for finding files and searching their contents with fd, rg, and fzf. It also covers interactive selection, previews, and advanced workflow references.

Key features

  1. 01Find by name, extension, and type
  2. 02Search file contents by pattern
  3. 03Select results interactively with fzf
  4. 04Preview and open matching files
  5. 05Refer to advanced workflow guidance

Use cases

  1. 01Locate source files by type
  2. 02Find TODOs or errors in code
  3. 03Select search results and open files

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/0xdarkmatter/claude-mods --skill file-search

After installing, type/file-searchin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
.gitkeep
references/
advanced-workflows.md
scripts/
.gitkeep

Details

From the project README

File Search

Modern file and content search.

fd - Find Files

# 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 file

rg - Search Content

# 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 file

fzf - Interactive Selection

# Find and select
fd | fzf

# With preview
fd | fzf --preview 'bat --color=always {}'

# Multi-select
fd -e ts | fzf -m | xargs code

Combined Patterns

# Find files, search content
fd -e py -x rg "async def" {}

# Search, select, open
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vim

Quick Reference

TaskCommand
Find TS filesfd -e ts
Find in srcfd -e ts src/
Search patternrg "pattern"
Search in typerg -t py "import"
Files with matchrg -l "pattern"
Count matchesrg -c "pattern"
Interactivefd | fzf
With previewfd | fzf --preview 'bat {}'

Performance Tips

TipWhy
Both respect .gitignoreAuto-skip node_modules, dist
Use -t over -gType flags are faster
Narrow the pathrg pattern src/ faster
Use -F for literalsAvoids regex overhead

Additional Resources

For detailed patterns, load:

  • ./references/advanced-workflows.md - Git integration, shell functions, power workflows

Comments

Markdown supported