search-code

Locate code patterns and symbols across the Syncpack codebase using ast-grep and grep.

2.1k|72|Updated Aug 17, 2017
One-click install
npx skills add https://github.com/JamieMason/syncpack --skill search-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: search-code
Source: https://github.com/JamieMason/syncpack/tree/main/skills/search-code
Command: npx skills add https://github.com/JamieMason/syncpack --skill search-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

An efficient approach to locating Rust symbols, implementations, and usage patterns across the Syncpack codebase, minimizing manual search time.

Core Features & Use Cases

  • Rust pattern searches: use ast-grep to filter out comments, strings, and docs for accurate symbol discovery.
  • Multi-file searches: use grep/rg for non-Rust files and broad searches across the repository.
  • Use Case: quickly locate where a type or function is defined, used, or implemented to understand dependencies and behavior.

Quick Start

Run ast-grep to locate Rust symbols across the codebase using a pattern like pub struct $NAME in the src directory.

Frequently Asked Questions about search-code

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

FAQPage Schema
How do I search for Rust symbols across a large codebase?

To search for Rust symbols across a large codebase, use ast-grep with patterns like "pub struct $NAME" in the src directory to accurately locate definitions while filtering out comments, strings, and docs.

What is the best way to locate function calls and implementations in non-Rust files?

The best way to locate function calls and implementations in non-Rust files is using grep or rg. These tools enable broad searches across the repository to quickly find where types or functions are defined and used.

How does ast-grep handle code pattern matching differently from standard grep?

ast-grep handles code pattern matching by parsing the abstract syntax tree, allowing it to filter out comments, strings, and docs for accurate Rust symbol discovery, whereas standard grep performs broad text-based searches across non-Rust files.

Can I use this approach to find where a specific type is defined and used in my repository?

Yes, you can find where a specific type is defined and used in your repository by applying ast-grep for Rust sources and grep or rg for non-Rust files, minimizing manual search time to understand dependencies and behavior.

Do I need repository access to execute ast-grep pattern searches?

Yes, you need repository access to execute ast-grep pattern searches. The process assumes direct access to the repository files to run pattern matching tools and locate symbols, structs, and function calls across the codebase.