codebase-search
Skill2 starsChanged 6 months agoMITView on GitHub
Search and navigate large codebases efficiently. Use when finding specific code patterns, tracing function calls, understanding code structure, or locating bugs. Handles semantic search, grep patterns, AST analysis.
- Reads credentials
3 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- tmcfarlane/team-avataredited, first seen Oct 20, 2026
- FilenCloudDienste/filen-rstheir own version, first seen Oct 9, 2026
- Helweg/open-codebase-indextheir own version, first seen Jun 26, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- tmcfarlane/team-avatar★ 112100% same
Wrote their own version · 2
- Helweg/open-codebase-index★ 230same name
- FilenCloudDienste/filen-rs★ 104same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/orchestrator.mdcCursor rule
- architectSkill
- debuggingSkill
- design-patterns-implementationSkill
- documentation-writingSkill
- Frontend BuilderSkill
- mgrep-code-searchSkill
- planningSkill
- refactoring-patternsSkill
- RefactoringSkill
- technical-roadmap-planningSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- web-design-guidelinesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Before using any jcodemunch tool, index the workspace.
- Distinctive: line 540
Use grep for precision: When you know exact terms
- Distinctive: line 542
Read surrounding context: Don't just look at matching lines
- Distinctive: line 543
Check file history: Use git blame for context
- Distinctive: line 545
Verify assumptions: Read actual code, don't assume
- Distinctive: line 645
Use "Go to Definition" for quick navigation
- Distinctive: line 646
Use "Find References" for usage
- Distinctive: line 647
Use "Find in Files" for broad search
- Distinctive: line 648
Use symbol search for classes/functions
- Distinctive: line 659
Check spelling and case sensitivity
- Distinctive: line 663
Check if files are in .gitignore
- Distinctive: line 667
Use more specific patterns
- Distinctive: line 669
Use exact phrases (quotes)
- Distinctive: line 673
Use grep instead of semantic for exact terms
- Distinctive: line 674
Add context to semantic queries
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Search
Step 0: AST-Aware Search (jcodemunch MCP — Preferred)
Use this first. jcodemunch parses the actual AST of your codebase and indexes every symbol with its signature, docstring, and an AI-generated summary. This lets you find symbols by meaning, trace call graphs, and navigate large repos in seconds — far beyond what grep can do.
jcodemunch vs. grep — choose the right tool
| Question type | Tool |
"Find all callers of processPayment" | jcodemunch find_references |
"What does the AuthMiddleware class do?" | jcodemunch search_symbols / get_symbol |
"Which files import UserService?" | jcodemunch find_importers |
"All functions in src/auth/jwt.py?" | jcodemunch get_file_outline |
| "Where does the repo even start?" | jcodemunch get_repo_outline |
"Find the literal string 'TODO: migrate'" | grep |
| "Find a regex pattern across files" | grep |
"Discover files by name glob **/*.test.ts" | glob |
One-time indexing (incremental — safe to re-run)
Before using any jcodemunch tool, index the workspace. The incremental: true flag re-indexes only changed files, so it's fast on subsequent runs.
CallMcpTool(
server: "user-jcodemunch",
toolName: "index_folder",
arguments: {
path: "<absolute-path-to-workspace>",
incremental: true
}
)Already indexed? Call
list_reposto see all indexed repos. If your workspace appears, skip re-indexing. Therepoparameter in every tool below is the repo name returned bylist_reposorindex_folder(usually the folder name, e.g."my-project").
Decision tree — which tool to call
Need to...
├── Orient in an unknown codebase?
│ └── get_repo_outline(repo)
│ → directories, language breakdown, symbol counts
│
├── Find a function/class/type by name or description?
│ └── search_symbols(repo, query, kind?)
│ → ranked matches with signatures + summaries
│ kind options: "function" | "class" | "method" | "constant" | "type"
│
├── Where is symbol X called / referenced?
│ └── find_references(repo, identifier)
│ → all files that import or reference the identifier
│
├── Who imports a specific file?
│ └── find_importers(repo, file_path)
│ → all files that import from that path
│
├── All symbols defined in a file?
│ └── get_file_outline(repo, file_path)
│ → functions, classes, methods with signatures + summaries
│
└── Full source of a specific symbol?
└── get_symbol(repo, symbol_id)
symbol_id comes from search_symbols or get_file_outline resultsExample invocations
Orient in an unfamiliar repo:
CallMcpTool(
server: "user-jcodemunch",
toolName: "get_repo_outline",
arguments: { repo: "my-project" }
)Find authentication middleware (semantic, by description):
CallMcpTool(
server: "user-jcodemunch",
toolName: "search_symbols",
arguments: {
repo: "my-project",
query: "authentication middleware",
kind: "function"
}
)Find all callers of validateToken:
CallMcpTool(
server: "user-jcodemunch",
toolName: "find_references",
arguments: {
repo: "my-project",
identifier: "validateToken"
}
)Find which files import UserService:
CallMcpTool(
server: "user-jcodemunch",
toolName: "find_importers",
arguments: {
repo: "my-project",
file_path: "src/services/UserService.ts"
}
)List all symbols in a file:
CallMcpTool(
server: "user-jcodemunch",
toolName: "get_file_outline",
arguments: {
repo: "my-project",
file_path: "src/auth/jwt.py"
}
)Read the full source of a specific symbol (use the symbol_id from search_symbols / get_file_outline):
CallMcpTool(
server: "user-jcodemunch",
toolName: "get_symbol",
arguments: {
repo: "my-project",
symbol_id: "src/auth/jwt.py::verify_token",
context_lines: 5
}
)Recommended workflow for serious codebase navigation
1. index_folder(path, incremental: true) ← once per session (or skip if already done)
2. get_repo_outline(repo) ← understand structure
3. search_symbols(repo, query, kind?) ← find the symbol(s) of interest
4. get_file_outline(repo, file_path) ← explore a file's full API surface
5. find_references(repo, identifier) ← trace all usages
6. find_importers(repo, file_path) ← find all consumers of a module
7. get_symbol(repo, symbol_id) ← read full source of a symbolFallback to grep / semantic search (Steps 1–6 below) only when:
- The codebase has not been indexed and indexing would take too long
- You need literal text matching (strings, regexes, comments)
- You're searching generated or non-standard files that the AST parser skips
When to use this skill
- Finding specific functions or classes
- Tracing function calls and dependencies
- Understanding code structure and architecture
- Finding usage examples
- Identifying code patterns
- Locating bugs or issues
- Code archaeology (understanding legacy code)
- Impact analysis before changes
Instructions
Step 1: Understand what you're looking for
Feature implementation:
- Where is feature X implemented?
- How does feature Y work?
- What files are involved in feature Z?
Bug location:
- Where is this error coming from?
- What code handles this case?
- Where is this data being modified?
API usage:
- How is this API used?
- Where is this function called?
- What are examples of using this?
Configuration:
- Where are settings defined?
- How is this configured?
- What are the config options?
Step 2: Choose search strategy
Semantic search (for conceptual questions):
Use when: You understand what you're looking for conceptually
Examples:
- "How do we handle user authentication?"
- "Where is email validation implemented?"
- "How do we connect to the database?"
Benefits:
- Finds relevant code by meaning
- Works with unfamiliar codebases
- Good for exploratory searchesGrep (for exact text/patterns):
Use when: You know exact text or patterns
Examples:
- Function names: "def authenticate"
- Class names: "class UserManager"
- Error messages: "Invalid credentials"
- Specific strings: "API_KEY"
Benefits:
- Fast and precise
- Works with regex patterns
- Good for known termsGlob (for file discovery):
Use when: You need to find files by pattern
Examples:
- "**/*.test.js" (all test files)
- "**/config*.yaml" (config files)
- "src/**/*Controller.py" (controllers)
Benefits:
- Quickly find files by type
- Discover file structure
- Locate related filesStep 3: Search workflow
1. Start broad, then narrow:
Step 1: Semantic search "How does authentication work?"
Result: Points to auth/ directory
Step 2: Grep in auth/ for specific function
Pattern: "def verify_token"
Result: Found in auth/jwt.py
Step 3: Read the file
File: auth/jwt.py
Result: Understand implementation2. Use directory targeting:
# Start without target (search everywhere)
Query: "Where is user login implemented?"
Target: []
# Refine with specific directory
Query: "Where is login validated?"
Target: ["backend/auth/"]3. Combine searches:
# Find where feature is implemented
Semantic: "user registration flow"
# Find all files involved
Grep: "def register_user"
# Find test files
Glob: "**/*register*test*.py"
# Understand the implementation
Read: registration.py, test_registration.pyStep 4: Common search patterns
Find function definition:
# Python
grep -n "def function_name" --type py
# JavaScript
grep -n "function functionName" --type js
grep -n "const functionName = " --type js
# TypeScript
grep -n "function functionName" --type ts
grep -n "export const functionName" --type ts
# Go
grep -n "func functionName" --type go
# Java
grep -n "public.*functionName" --type javaFind class definition:
# Python
grep -n "class ClassName" --type py
# JavaScript/TypeScript
grep -n "class ClassName" --type js,ts
# Java
grep -n "public class ClassName" --type java
# C++
grep -n "class ClassName" --type cppFind class/function usage:
# Python
grep -n "ClassName(" --type py
grep -n "function_name(" --type py
# JavaScript
grep -n "new ClassName" --type js
grep -n "functionName(" --type jsFind imports/requires:
# Python
grep -n "from.*import.*ModuleName" --type py
grep -n "import.*ModuleName" --type py
# JavaScript
grep -n "import.*from.*module-name" --type js
grep -n "require.*module-name" --type js
# Go
grep -n "import.*package-name" --type goFind configuration:
# Config files
glob "**/*config*.{json,yaml,yml,toml,ini}"
# Environment variables
grep -n "process\\.env\\." --type js
grep -n "os\\.environ" --type py
# Constants
grep -n "^[A-Z_]+\\s*=" --type py
grep -n "const [A-Z_]+" --type jsFind TODO/FIXME:
grep -n "TODO|FIXME|HACK|XXX" -iFind error handling:
# Python
grep -n "try:|except|raise" --type py
# JavaScript
grep -n "try|catch|throw" --type js
# Go
grep -n "if err != nil" --type goStep 5: Advanced techniques
Trace data flow:
1. Find where data is created
Semantic: "Where is user object created?"
2. Search for variable usage
Grep: "user\\." with context lines
3. Follow transformations
Read: Files that modify user
4. Find where it's consumed
Grep: "user\\." in relevant filesFind all callsites of a function:
1. Find function definition
Grep: "def process_payment"
Result: payments/processor.py:45
2. Find all imports of that module
Grep: "from payments.processor import"
Result: Multiple files
3. Find all calls to the function
Grep: "process_payment\\("
Result: All callsites
4. Read each callsite for context
Read: Each file with contextUnderstand a feature end-to-end:
1. Find API endpoint
Semantic: "Where is user registration endpoint?"
Result: routes/auth.py
2. Trace to controller
Read: routes/auth.py
Find: Calls to AuthController.register
3. Trace to service
Read: controllers/auth.py
Find: Calls to UserService.create_user
4. Trace to database
Read: services/user.py
Find: Database operations
5. Find tests
Glob: "**/*auth*test*.py"
Read: Test files for examplesFind related files:
1. Start with known file
Example: models/user.py
2. Find imports of this file
Grep: "from models.user import"
3. Find files this imports
Read: models/user.py
Note: Import statements
4. Build dependency graph
Map: All related filesImpact analysis:
Before changing function X:
1. Find all callsites
Grep: "function_name\\("
2. Find all tests
Grep: "test.*function_name" -i
3. Check related functionality
Semantic: "What depends on X?"
4. Review each usage
Read: Each file using function
5. Plan changes
Document: Impact and required updatesStep 6: Search optimization
Use appropriate context:
# See surrounding context
grep -n "pattern" -C 5 # 5 lines before and after
grep -n "pattern" -B 3 # 3 lines before
grep -n "pattern" -A 3 # 3 lines afterCase sensitivity:
# Case insensitive
grep -n "pattern" -i
# Case sensitive (default)
grep -n "Pattern"File type filtering:
# Specific type
grep -n "pattern" --type py
# Multiple types
grep -n "pattern" --type py,js,ts
# Exclude types
grep -n "pattern" --glob "!*.test.js"Regex patterns:
# Any character: .
grep -n "function.*Name"
# Start of line: ^
grep -n "^class"
# End of line: $
grep -n "TODO$"
# Optional: ?
grep -n "function_name_?()"
# One or more: +
grep -n "[A-Z_]+"
# Zero or more: *
grep -n "import.*"
# Alternatives: |
grep -n "TODO|FIXME"
# Groups: ()
grep -n "(get|set)_user"
# Escape special chars: \
grep -n "function\(\)"Best practices
- Start with semantic search: For unfamiliar code or conceptual questions
- Use grep for precision: When you know exact terms
- Combine multiple searches: Build understanding incrementally
- Read surrounding context: Don't just look at matching lines
- Check file history: Use
git blamefor context - Document findings: Note important discoveries
- Verify assumptions: Read actual code, don't assume
- Use directory targeting: Narrow scope when possible
- Follow the data: Trace data flow through the system
- Check tests: Tests often show usage examples
Common search scenarios
Scenario 1: Understanding a bug
1. Find error message
Grep: "exact error message"
2. Find where it's thrown
Read: File with error
3. Find what triggers it
Semantic: "What causes X error?"
4. Find related code
Grep: Related function names
5. Check tests
Glob: "**/*test*.py"
Look: For related test casesScenario 2: Learning a new codebase
1. Find entry point
Semantic: "Where does the application start?"
Common files: main.py, index.js, app.py
2. Find main routes/endpoints
Grep: "route|endpoint|@app\\."
3. Find data models
Semantic: "Where are data models defined?"
Common: models/, entities/
4. Find configuration
Glob: "**/*config*"
5. Read README and docs
Read: README.md, docs/Scenario 3: Refactoring preparation
1. Find all usages
Grep: "function_to_change"
2. Find tests
Grep: "test.*function_to_change"
3. Find dependencies
Semantic: "What does X depend on?"
4. Check imports
Grep: "from.*import.*X"
5. Document scope
List: All affected filesScenario 4: Adding a feature
1. Find similar features
Semantic: "How is similar feature implemented?"
2. Find where to add code
Semantic: "Where should new feature go?"
3. Check patterns
Read: Similar implementations
4. Find tests to emulate
Glob: Test files for similar features
5. Check documentation
Grep: "TODO.*new feature" -iTools integration
Git integration:
# Who changed this line?
git blame filename
# History of a file
git log -p filename
# Find when function was added
git log -S "function_name" --source --all
# Find commits mentioning X
git log --grep="feature name"IDE integration:
- Use "Go to Definition" for quick navigation
- Use "Find References" for usage
- Use "Find in Files" for broad search
- Use symbol search for classes/functions
Documentation:
- Check inline comments
- Look for docstrings
- Read README files
- Check architecture docs
Troubleshooting
No results found:
- Check spelling and case sensitivity
- Try semantic search instead of grep
- Broaden search scope (remove directory target)
- Try different search terms
- Check if files are in .gitignore
Too many results:
- Add directory targeting
- Use more specific patterns
- Filter by file type
- Use exact phrases (quotes)
Wrong results:
- Be more specific in query
- Use grep instead of semantic for exact terms
- Add context to semantic queries
- Check file types
References
Examples
Example 1: Basic usage
<!-- Add example content here -->Example 2: Advanced usage
<!-- Add advanced example content here -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

