file-search

Locate files and search contents using fd, ripgrep, and fzf.

Updated Apr 26, 2023
One-click install
npx skills add https://github.com/quanphm/dotfiles --skill file-search-quanphm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-search
Source: https://github.com/quanphm/dotfiles/tree/main/opencode/skills/file-search
Command: npx skills add https://github.com/quanphm/dotfiles --skill file-search-quanphm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Locating specific files quickly and extracting relevant content across large codebases and document repositories can be time-consuming and error-prone.

Core Features & Use Cases

  • File discovery: Locate files by name, extension, or pattern using fd.
  • Content search: Scan inside files with rg and regex patterns.
  • Interactive results: Use fzf for quick selection and actions.
  • Use Case: When you need to find all TypeScript files referencing a symbol across a project.

Quick Start

Use fd to locate files by name or pattern, search inside files with rg, and interactively select results with fzf.

Frequently Asked Questions about file-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find files by name and search content across a large codebase?

You can search a codebase by using fd for file discovery by name or pattern, and rg to scan inside files with regex patterns. This approach accelerates locating specific files and extracting relevant content across large repositories.

Can I filter file search results by type or exclude specific directories?

Yes, file search supports include/exclude patterns and file-type filtering. You can narrow down results by applying these constraints to target specific file extensions and cross-directory searches while excluding irrelevant paths.

How do I interactively select file search results in the terminal?

You can interactively select file search results using fzf. It provides an interactive interface for quick selection and actions on the files and content discovered by fd and rg during your codebase search.

Do I need to install all three tools to use interactive file and content search?

Interactive file and content search requires fd and rg to function. The tool fzf is optional and only needed if you want interactive selection capabilities for your search results across codebases and document repositories.

What is the best way to find all files referencing a specific symbol in a project?

The best way to find symbol references is using rg to scan inside files with regex patterns. You can combine this with fd to locate specific file types first, ensuring fast and accurate content search across the project.

Why use ripgrep and fd for codebase search instead of standard find and grep?

Using ripgrep and fd for codebase search provides significantly faster file discovery and content searching than standard tools. They handle large repositories efficiently and support advanced pattern matching for codebases and logs.