file-search

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

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill file-search-penitence1992
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-search
Source: https://github.com/Penitence1992/go-zero-backend-skills/tree/main/skills/file-search
Command: npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill file-search-penitence1992

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the challenge of efficiently locating text and code patterns across large codebases.

Core Features & Use Cases

  • Fast text search: Use ripgrep (rg) to locate strings, patterns, and textual occurrences across files.
  • Structural search: Leverage ast-grep (sg) to find code patterns based on abstract syntax trees.
  • Use cases: Helpful for code exploration, refactoring impact analysis, security reviews, and dependency tracing.

Quick Start

Use the file-search skill to locate the term "LoginService" in the src/ directory using rg, and to perform a structural pattern search with sg.

Frequently Asked Questions about file-search

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

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

You can search for specific text patterns across a large codebase using ripgrep. It handles fast text queries to locate strings, patterns, and textual occurrences across files within scoped directories.

What is the best way to find code patterns for refactoring impact analysis?

The best way to find code patterns for refactoring impact analysis is using ast-grep. It performs structural searches based on abstract syntax trees to identify affected code segments accurately.

How does structural search differ from regular text search?

Structural search differs from regular text search by using ast-grep to match code patterns based on abstract syntax trees, whereas ripgrep performs fast textual queries for strings and patterns across files.

Can I filter codebase searches by specific programming languages?

Yes, you can filter codebase searches by specific programming languages. The skill leverages pre-installed tooling to satisfy requirements for fast, configurable searches with language filters and directory scoping.

Do I need to install ripgrep and ast-grep before using this skill?

No, you do not need to install ripgrep and ast-grep before using this skill. It leverages pre-installed tooling to apply rapid text and structural code searches across large codebases.

Why use ast-grep for security reviews instead of standard text search?

You use ast-grep for security reviews because its syntax-aware structural search identifies code patterns based on abstract syntax trees, providing more accurate dependency tracing and vulnerability detection than standard text search.