file-search

Search codebases for text patterns with ripgrep and structural patterns with ast-grep.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gong-type/skills --skill file-search-gong-type
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-search
Source: https://github.com/gong-type/skills/tree/main/file-search
Command: npx skills add https://github.com/gong-type/skills --skill file-search-gong-type

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Locate and understand code quickly by searching large codebases for plain text patterns and syntax-aware code patterns using two pre-installed tools.

Core Features & Use Cases

  • Fast text search with ripgrep to find strings and patterns across multiple files and languages.
  • Structural search with ast-grep to locate code patterns based on syntax trees.
  • Use Case: Understand unfamiliar code, trace function usages, audit changes, and identify potential issues across a repository.

Quick Start

Perform a targeted text search across your codebase and refine results with a structural search for exact patterns.

Frequently Asked Questions about file-search

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

FAQPage Schema
How do I search a codebase for specific text patterns across multiple files?

You can search a codebase for text patterns across multiple files using ripgrep, which is pre-installed to provide fast text search capabilities for strings and patterns. It quickly scans large repositories to locate exact matches.

What is the best way to find structural code patterns in an unfamiliar repository?

Finding structural code patterns in an unfamiliar repository is best done with ast-grep, which performs syntax-aware searches based on syntax trees. This allows you to locate code constructions instead of just plain text.

Can I use ast-grep and ripgrep to trace function usages for a refactor?

Yes, you can use ast-grep and ripgrep to trace function usages and guide refactors across a repository. They enable rapid structural and text searches to locate all call sites and understand dependencies before making changes.

Does this code search approach work for auditing security across large repositories?

This code search approach works for auditing security across large repositories by leveraging rapid text and structural searches. You can quickly locate vulnerable syntax patterns or unsafe function implementations throughout the codebase.

When should I use structural search instead of plain text search?

You should use structural search instead of plain text search when you need to locate code patterns based on syntax trees rather than exact strings. This is essential for understanding unfamiliar code and identifying syntax-specific issues.