takeokunn

Exploration Tools

Tool definitions and usage patterns for codebase exploration (Glob, Grep, Read, LSP). Agents reference this skill instead of inline tool definitions.

takeokunn 68 1 Updated 3mo ago
GitHub

Install

npx skillscat add takeokunn/nixos-configuration/exploration-tools

Install via the SkillsCat registry.

SKILL.md
Provide standardized tool definitions and usage patterns for codebase exploration. This skill centralizes tool knowledge that was previously duplicated across agents. Fast file pattern matching for finding files by name Glob pattern (e.g., **/*.ts, src/**/*.md) Directory to search in (defaults to cwd) Find files by name pattern when you know the file extension or naming convention</use_case> Pattern: **/*.tsx Result: All TypeScript React files in the project Content search with regex support across files Regex pattern to search for File or directory to search in Filter files by glob pattern File type filter (js, py, rust, etc.) content, files_with_matches, or count Lines after match Lines before match Lines around match Search file contents for patterns, keywords, or code constructs</use_case> Pattern: useState Glob: **/*.tsx Result: All useState usages in React components Read file contents with optional line range Absolute path to file Starting line number Number of lines to read View file contents after finding with Glob or Grep</use_case> file_path: /path/to/file.ts offset: 50 limit: 30 Result: Lines 50-80 of the file Navigate to symbol definition using Language Server Protocol File containing the symbol reference Line number of the reference Column position of the reference Find where a function, class, or variable is defined</use_case> Find all references to a symbol using Language Server Protocol File containing the symbol definition Line number of the definition Column position of the definition Find all usages of a function, class, or variable</use_case> Get all symbols in a document using Language Server Protocol File to analyze Get an overview of classes, functions, and variables in a file</use_case> 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 Choosing appropriate search boundaries Narrow: Single file or directory Medium: File type across project Broad: All files in project
  Start narrow, expand if needed
</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 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 </best_practices> Searching entire codebase without filters Start with file type or directory filters Reading files without first using Glob/Grep to locate Use search tools to find relevant files first Returning matches without surrounding context Use -C flag with Grep or read surrounding lines </anti_patterns> 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> Return file paths with line numbers for all findings Limit results to manageable size Maintain read-only operations Modifying files during exploration Returning raw dumps without filtering Searching binary or generated files Alternative symbol navigation via Serena MCP Evidence collection methodology using these tools </related_skills>