From intellectronica-agent-skills-5
Searches codebases with natural language queries using mgrep. Indexes files for semantic search, complementing grep for larger or nested codebases.
How this skill is triggered — by the user, by Claude, or both
Slash command
/intellectronica-agent-skills-5:mgrep-code-searchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
mgrep is a semantic search tool that enables natural language queries across code, text, PDFs, and images. It is particularly effective for exploring larger or complex codebases where traditional pattern matching falls short.
mgrep is a semantic search tool that enables natural language queries across code, text, PDFs, and images. It is particularly effective for exploring larger or complex codebases where traditional pattern matching falls short.
Use mgrep when:
Use traditional grep/ripgrep when:
Before searching, start the watcher to index the repository:
bunx @mixedbread/mgrep watch
The watch command indexes the repository and maintains synchronisation with file changes. It respects .gitignore and .mgrepignore patterns.
bunx @mixedbread/mgrep "your natural language query" [path]
bunx @mixedbread/mgrep "where is authentication configured?"
bunx @mixedbread/mgrep "how do we handle errors in API calls?" src/
bunx @mixedbread/mgrep "database connection setup" src/lib
| Option | Description |
|---|---|
-m <count> | Maximum results (default: 10) |
-c, --content | Display full result content |
-a, --answer | Generate AI-powered synthesis of results |
-s, --sync | Update index before searching |
--no-rerank | Disable relevance optimisation |
# Get more results
bunx @mixedbread/mgrep -m 25 "user authentication flow"
# Show full content of matches
bunx @mixedbread/mgrep -c "error handling patterns"
# Get an AI-synthesised answer
bunx @mixedbread/mgrep -a "how does the caching layer work?"
# Sync index before searching
bunx @mixedbread/mgrep -s "payment processing" src/services
Start watcher (once per session or when files change significantly):
bunx @mixedbread/mgrep watch
Search semantically:
bunx @mixedbread/mgrep "what you're looking for" [optional/path]
Refine as needed using path constraints or options:
bunx @mixedbread/mgrep -m 20 -c "refined query" src/specific/directory
Configure defaults via environment variables:
| Variable | Purpose |
|---|---|
MGREP_MAX_COUNT | Default result limit |
MGREP_CONTENT | Enable content display (1/true) |
MGREP_ANSWER | Enable AI synthesis (1/true) |
MGREP_SYNC | Pre-search sync (1/true) |
bunx @mixedbread/mgrep to run commands (not npm/npx or direct installation)bunx @mixedbread/mgrep watch before searching to ensure the index is current.gitignore patterns automatically.mgrepignore for additional exclusionsnpx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin intellectronica-agent-skills-5Performs semantic code searches in codebases using natural language queries to find concepts like authentication logic, error handling patterns, or database connections via sgrep CLI.
Searches codebases semantically with natural language queries to find implementations by concept (e.g., 'where is X', 'how does Y work'). Returns file paths, lines, and snippets.
Semantic codebase search — use for exploring code, finding implementations, and answering questions about any project. Searches using natural language queries, identifier names, or file paths. Returns ranked results using embedding-based similarity, BM25 keyword matching, symbol matching, import graph analysis, and git recency. Use this as the default exploration tool instead of grep when you don't know the exact text to search for.