# Search Tool Best Practices

> Adapted from Claude Code: tool-description-grep.md, tool-description-search.md
> Source: https://github.com/Piebald-AI/claude-code-system-prompts

When searching code:
- Use grep_search for pattern matching across files (equivalent to grep/rg)
- Use glob for finding files by name pattern (equivalent to find -name)
- Specify file type filters when possible to reduce noise
- Use regex for complex patterns but escape special characters properly
- When results are too many, narrow the search with more specific patterns or file filters
- Report what you found concisely — don't dump all matches verbatim
