Efficient text search using ripgrep (rg) with one-shot patterns that minimize iterations by getting files, line numbers, and context in a single call
Performs efficient one-shot text searches using ripgrep with line numbers and context, triggering when you need to find code patterns, debug issues, or locate specific content across files.
/plugin marketplace add xdg/xdg-claude/plugin install context-efficient-tools@xdg-claudeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/ripgrep-guide.mdFor content search: use Bash(rg) with -e 'pattern' -n -C 2 for one-shot results.
This gives files, line numbers, and context in a single call - minimizes iterations and context usage.
Always prefer getting line numbers and surrounding context over multiple search attempts.
Grep tool (built on ripgrep) - Use for structured searches:
type parameter-F, -v, -w, or pipe composition are not neededBash(rg) - Use for one-shot searches needing special flags or composition:
-F)-v)-w)-n -C 2)| head, | wc -l, | sort)Glob tool - Use for file name/path matching only (not content search)
Load ripgrep guide when needing:
-t flags)The guide focuses on practical patterns for getting targeted results in minimal calls.