Claude-skill-registry dev-research-codebase-exploration
Efficient codebase search using Glob and Grep
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/dev-research-codebase-exploration" ~/.claude/skills/majiayu000-claude-skill-registry-dev-research-codebase-exploration && rm -rf "$T"
manifest:
skills/data/dev-research-codebase-exploration/SKILL.mdsource content
Codebase Exploration
Efficiently explore the codebase using Glob and Grep tools.
Glob Tool
Find files by pattern:
# Find all TypeScript files Glob("**/*.ts") # Find all TSX files Glob("**/*.tsx") # Find specific folders Glob("src/components/**/*.tsx") Glob("src/hooks/**/*.ts") # Find files with keyword Glob("**/*player*") Glob("**/*physics*")
Grep Tool
Search file contents:
# Search for specific text Grep("useFrame", "src/") Grep("useState", "src/") # Case-insensitive search Grep("COLYSEUS", "src/", { ignoreCase: true }) # Search with context Grep("function.*movement", "src/", { context: 2 })
Search Patterns
Find Component Definitions
Grep("function.*Component|const.*=.*=>", "src/components/")
Find State Stores
Glob("src/stores/**/*.ts") Grep("create.*Store|zustand", "src/stores/")
Find Type Definitions
Glob("src/types/**/*.ts") Grep("interface.*|type.*=", "src/types/")
Find Exports
Grep("export.*function|export.*const", "src/")
Tips
- Start broad, then narrow - Use Glob first, then Grep
- Use specific patterns - More specific = faster results
- Check multiple locations - Code may be in unexpected places
- Read related files - Found patterns often have related code nearby
Anti-Patterns
❌ DON'T:
- Use overly broad globs -
is uselessGlob("**/*") - Search from root every time - Narrow to relevant directories
- Ignore file extensions - Searching
files for code patterns wastes time.md - Skip context - Reading just the matched line misses important context
- Search for common words -
returns everythingGrep("const")
✅ DO:
- Combine Glob + Grep -
thenGlob("src/**/*.ts")Grep("pattern", "src/") - Use specific globs -
instead ofGlob("src/components/**/*.tsx")Glob("**/*.tsx") - Search with context -
Grep("pattern", "src/", { context: 3 }) - Filter by file type - Search
files for code,.ts
for docs.md - Start from known locations - Check similar features first