Skip to content
Back to skills

File Search

ASecurity

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.

  • 50 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
developmentpythonshellbashnodegitperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add 0xDarkMatter/claude-mods --skill file-search --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of File Search?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for File Search
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0xdarkmatter-file-search/badge)](https://www.skillsdirectory.com/skills/0xdarkmatter-file-search)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: file-search
description: "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."
compatibility: "Requires fd, ripgrep (rg), and optionally fzf. Install: brew install fd ripgrep fzf (macOS)."
allowed-tools: "Bash"
---

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

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

## fzf - Interactive Selection

```bash
# Find and select
fd | fzf

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

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

## Combined 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 vim
```

## Quick Reference

| Task | Command |
|------|---------|
| Find TS files | `fd -e ts` |
| Find in src | `fd -e ts src/` |
| Search pattern | `rg "pattern"` |
| Search in type | `rg -t py "import"` |
| Files with match | `rg -l "pattern"` |
| Count matches | `rg -c "pattern"` |
| Interactive | `fd \| fzf` |
| With preview | `fd \| fzf --preview 'bat {}'` |

## Performance Tips

| Tip | Why |
|-----|-----|
| Both respect `.gitignore` | Auto-skip node_modules, dist |
| Use `-t` over `-g` | Type flags are faster |
| Narrow the path | `rg pattern src/` faster |
| Use `-F` for literals | Avoids regex overhead |

## Additional Resources

For detailed patterns, load:
- `./references/advanced-workflows.md` - Git integration, shell functions, power workflows

Files in this skill

  • SKILL.md2.3 KB
  • references/advanced-workflows.md7.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…