codebase-search

Locate functions, classes, and call sites in large codebases using grep, glob, and semantic search.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill codebase-search-ttnhan18062000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-search
Source: https://github.com/ttnhan18062000/rpg-based-simulation/tree/main/docs/archive/legacy_agents_skills_20260722/codebase-search
Command: npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill codebase-search-ttnhan18062000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Navigating an unfamiliar or large codebase to find where a feature is implemented, where a bug originates, or how a function is used often requires slow manual file browsing. This Skill provides a structured search workflow that combines semantic search, grep patterns, and glob file discovery to pinpoint relevant code quickly. ## Core Features & Use Cases - Multi-Strategy Search: Combines semantic search for conceptual questions, grep for exact patterns, and glob for file discovery, with guidance on when to use each. - Call and Dependency Tracing: Step-by-step workflows for finding function definitions, all callsites, import relationships, and end-to-end feature traces from endpoint to database. - Impact Analysis: Procedures for mapping all usages and tests of a function before refactoring, plus git blame and git log integration for code archaeology. - Use Case: Before renaming a shared utility function, use the impact analysis workflow to find every callsite, related test, and dependent module so nothing breaks. ## Quick Start Ask the AI to find where user authentication is implemented in this repository and trace all of its callsites.

Frequently Asked Questions about codebase-search

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

FAQPage Schema
How do I find where a function is defined in a large codebase?

Use grep with language-specific patterns such as "def function_name" for Python or "function functionName" for JavaScript, filtered by file type. Start broad across the repository, then narrow with directory targeting once you locate the relevant module.

How to find all callsites of a function before refactoring?

First grep for the function definition, then search for all imports of its module, and finally grep for the function name followed by an opening parenthesis. Read each callsite for context and check related test files to map the full impact.

When should I use semantic search instead of grep for code search?

Use semantic search for conceptual questions like "how is authentication handled" when you do not know exact terms, especially in unfamiliar codebases. Use grep when you know exact function names, error messages, or string literals for fast precise matches.

Why does my grep search return no results in a codebase?

No results usually come from case sensitivity, misspelled patterns, or files excluded by .gitignore. Try case-insensitive search with -i, broaden the scope by removing directory targets, or switch to semantic search with different terms.

Can grep search be limited to specific file types?

Yes, use the --type flag to filter by language, such as --type py for Python or --type js,ts for JavaScript and TypeScript. You can also exclude patterns with glob flags, for example skipping test files during a search.