Agent skill
dev-research-codebase-exploration
Efficient codebase search using Glob and Grep
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/dev-research-codebase-exploration
SKILL.md
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 -
Glob("**/*")is useless - Search from root every time - Narrow to relevant directories
- Ignore file extensions - Searching
.mdfiles for code patterns wastes time - Skip context - Reading just the matched line misses important context
- Search for common words -
Grep("const")returns everything
✅ DO:
- Combine Glob + Grep -
Glob("src/**/*.ts")thenGrep("pattern", "src/") - Use specific globs -
Glob("src/components/**/*.tsx")instead ofGlob("**/*.tsx") - Search with context -
Grep("pattern", "src/", { context: 3 }) - Filter by file type - Search
.tsfiles for code,.mdfor docs - Start from known locations - Check similar features first
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?