with one click
exploration-tools
// Tool definitions and usage patterns for codebase exploration (Glob, Grep, Read, LSP). Agents reference this skill instead of inline tool definitions.
// Tool definitions and usage patterns for codebase exploration (Glob, Grep, Read, LSP). Agents reference this skill instead of inline tool definitions.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | Exploration Tools |
| description | Tool definitions and usage patterns for codebase exploration (Glob, Grep, Read, LSP). Agents reference this skill instead of inline tool definitions. |
| version | 2.0.0 |
Start narrow, expand only if results are insufficient
</example>
Prioritizing search results by relevance
High relevance: Exact matches, definition sites
Medium relevance: Usage sites, related patterns
Low relevance: Comments, test files, generated code
Pattern for finding files by name or extension
1. Use Glob with pattern to find candidate files
2. Filter results by relevance
3. Read specific files for details
Pattern for searching file contents
1. Use Grep with pattern and file type filter
2. Review matches with context (-C flag)
3. Follow up with Read for full file context
Pattern for navigating code symbols
1. Use LSP_goToDefinition to find symbol source
2. Use LSP_findReferences to find usages
3. Use LSP_documentSymbol for file overview
<decision_tree name="tool_selection"> What type of search is needed? Use Glob Use Grep Use LSP_goToDefinition or Serena find_symbol Use LSP_findReferences or Serena find_referencing_symbols Use Read </decision_tree>
<best_practices> Use Glob for file discovery, Grep for content search Always return file:line references for findings Start with narrow search scope, expand if needed Use LSP tools when available for accurate symbol navigation Filter out binary and generated files Limit results to manageable size using head_limit </best_practices>
<anti_patterns> Searching entire codebase without filters Start with file type or directory filters
Reading files without first using Glob/Grep to locate them Use search tools to find relevant files first Returning matches without surrounding context Use -C flag with Grep or read surrounding lines Exploration operations must be read-only; never modify files during search Always use absolute file paths in Read tool calls Keep guidance evidence-based and version-aware Prefer Grep over shell grep/rg commands for consistent behavior Prefer project conventions over generic defaults<error_escalation> Minor inconsistencyDocument and continue Ambiguous guidanceClarify assumptions Conflicting constraintsEscalate with options Unsafe or misleading retrieval guidanceBlock and escalate to maintainers with corrective steps </error_escalation>
<related_agents> Locate relevant code patterns Review output consistency </related_agents>
Return file paths with line numbers for all findings Limit results to manageable size Maintain read-only operations during exploration Modifying files during exploration Returning raw dumps without filtering Searching binary or generated files<related_skills> Alternative symbol navigation via Serena MCP Evidence collection methodology using these tools </related_skills>