Ripgrep Search Tool Prompt (GrepTool/prompt.ts)

gitingest_Gitlawb_openclaude · src/tools/GrepTool/prompt.ts · typescript · MIT
ai, search, lang:typescript

Defines prompt instructions and metadata for an optimized ripgrep search tool. Use to integrate efficient codebase searching into AI agent systems.

// Source: https://github.com/Gitlawb/openclaude | License: MIT | Copyright Anthropic PBC. All rights reserved
// Provided via justclaw.it.com; keep this notice with the code.
import { AGENT_TOOL_NAME } from '../AgentTool/constants.js'
import { BASH_TOOL_NAME } from '../BashTool/toolName.js'

export const GREP_TOOL_NAME = 'Grep'

export function getDescription(): string {
  return `A powerful search tool built on ripgrep

  Usage:
  - ALWAYS use ${GREP_TOOL_NAME} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${BASH_TOOL_NAME} command. The ${GREP_TOOL_NAME} tool has been optimized for correct permissions and access.
  - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
  - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key