From qgrep-mcp
Provides fast indexed code search via MCP tools, up to 300x faster than grep on large codebases. Supports regex, glob filters, and index lifecycle management.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qgrep-mcp:code-searchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides fast indexed code search via the `search_code` MCP tool, which is up to 300x faster than standard grep on large codebases.
This skill provides fast indexed code search via the search_code MCP tool, which is up to 300x faster than standard grep on large codebases.
Prefer the search_code MCP tool over the built-in Grep tool when searching file contents across a directory tree. The search_code tool automatically selects the fastest backend:
Primary search tool. Supports regex patterns, glob filters, case-insensitive search, and context lines.
search_code(pattern="impl Iterator for", path="/path/to/repo")
search_code(pattern="TODO|FIXME", path="/path/to/repo", case_insensitive=True)
search_code(pattern="class.*Handler", path="/path/to/repo", glob="*.py")
search_code(pattern="fn main", path="/path/to/repo", output_mode="files_with_matches")
Parameters:
pattern (required): Regex pattern to search forpath (required): Absolute directory path to search inglob: Filter files (e.g. "*.py", "*.{ts,tsx}")case_insensitive: Case-insensitive search (default: false)output_mode: "content" (default), "files_with_matches", or "count"context_lines: Lines of context around matchesmax_results: Maximum result lines (default: 200)Manage the search index lifecycle. Build an index before searching to get maximum speed.
build_search_index(action="build", path="/path/to/repo")
build_search_index(action="status", path="/path/to/repo")
build_search_index(action="rebuild", path="/path/to/repo")
build_search_index(action="delete", path="/path/to/repo")
Analyze a directory and get an indexing recommendation with stats.
search_estimate(path="/path/to/repo")
Returns file count, current search latency stats, and whether building an index is worthwhile.
Based on benchmarks against rust-lang/rust (58,534 files):
| Backend | Avg latency | When used |
|---|---|---|
| qgrep (indexed) | ~12ms | Index exists or auto-built for large repos |
| ripgrep (fallback) | ~2.9s | Small repos, glob filters, context lines |
Index build is a one-time cost (~7s for 58k files) that pays for itself after ~3 searches.
The search_code tool handles backend selection automatically:
No manual index management is needed for typical usage. Just call search_code and it handles the rest.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sumisingh10/qgrep-mcp