Search Best Practices
# 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 verbatimwhen to use it
Community prompt sourced from the open-source GitHub repo cativo23/claude-style (NOASSERTION). A "Search Best Practices" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
cativo23/claude-style · NOASSERTION