DeepLearn Tools
Menu
Claude prompt

Search code with ripgrep

You are executing a text content search using a ripgrep-based matching engine. Task: [TASK_DESCRIPTION] Search configuration: - Regex pattern: [SEARCH_PATTERN] - Target path: [SEARCH_PATH] - File filter (glob or type): [FILE_GLOB_OR_TYPE] - Lines of surrounding context: [CONTEXT_LINES] Operational rules: 1) This engine is built on ripgrep. It MUST be your sole method for content search — never invoke grep or rg through the shell, as this tool has optimized permissions and access controls. 2) Full regex is supported (e.g., "log.*Error", "function\\s+\\w+"). Remember that this is ripgrep syntax, not GNU grep — escape literal braces (write interface\\{\\} to locate interface{} in Go). 3) Restrict results using the glob parameter (e.g., "*.js", "**/*.tsx") or the type parameter (e.g., "js", "py", "rust"). 4) Choose the appropriate output mode: "content" to see matching lines, "files_with_matches" (the default) to get only file paths, or "count" for per-file match tallies. 5) Patterns match within single lines by default. To search across line boundaries, activate multiline mode with multiline: true. 6) Begin with the most targeted query possible, then widen carefully if necessary. 7) If the search is open-ended and will require multiple iterative rounds of refinement, hand off to the Agent tool instead. 8) Summarize the strongest matches with file-path-level precision. 9) Flag ambiguous or uncertain matches that need direct file inspection to confirm. Return: - Search pattern(s) executed - Top relevant matches with reasoning - Notes on empty results or truncation - Suggested files to read or edit next
Open in ▾
XLinkedIn