
Mgrep Code Search
- 568 installs
- 281 repo stars
- Updated April 25, 2026
- intellectronica/agent-skills
mgrep-code-search is a Claude Code skill that runs mgrep natural-language semantic search across large codebases for developers exploring repositories with more than 30 non-gitignored files.
About
mgrep-code-search is a semantic code exploration skill from intellectronica/agent-skills built around the mgrep CLI. It enables natural-language queries across code, text, PDFs, and images, complementing grep and ripgrep when pattern matching cannot surface intent or feature location. The skill recommends use when a repository has more than 30 non-gitignored files or nested directory structures that make manual path guessing slow. Developers and agents reach for mgrep-code-search to find where features live, understand unfamiliar modules, and explore large monorepos without writing precise regex first. It pairs traditional exact search with embedding-based retrieval for codebase onboarding and architecture discovery.
- Semantic natural language search over code, text, PDFs and images
- Recommended for codebases with more than 30 non-gitignored files
- Complements traditional grep/ripgrep for concept and intent queries
- Automatic indexing via watcher that respects .gitignore and .mgrepignore
- Efficient exploration of unfamiliar codebases and nested directory structures
Mgrep Code Search by the numbers
- 568 all-time installs (skills.sh)
- +9 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #1,637 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/intellectronica/agent-skills --skill mgrep-code-searchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 568 |
|---|---|
| repo stars | ★ 281 |
| Last updated | April 25, 2026 |
| Repository | intellectronica/agent-skills ↗ |
How do you search large codebases with natural language?
Perform natural language semantic search across large, nested codebases instead of relying solely on grep.
Who is it for?
Developers exploring unfamiliar monorepos or nested projects with more than 30 tracked files.
Skip if: Tiny repositories where ripgrep exact matches suffice or environments without mgrep installed.
When should I use this skill?
A developer needs to explore a large nested codebase, find feature implementations by intent, or complement grep with semantic search.
What you get
Semantic search hits across code, text, and documents with feature locations and relevant excerpts.
- Semantic search results
- Feature location excerpts
By the numbers
- Recommended for codebases with more than 30 non-gitignored files
- Queries code, text, PDFs, and images via mgrep semantic search
Files
mgrep Code Search
Overview
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.
When to Use This Skill
Use mgrep when:
- The codebase contains more than 30 non-gitignored files
- There are nested directory structures
- Searching for concepts, features, or intent rather than exact strings
- Exploring an unfamiliar codebase
- Need to understand "where" or "how" something is implemented
Use traditional grep/ripgrep when:
- Searching for exact patterns or symbols
- Regex-based refactoring
- Tracing specific function or variable names
Quick Start
Indexing
Before searching, start the watcher to index the repository:
bunx @mixedbread/mgrep watchThe watch command indexes the repository and maintains synchronisation with file changes. It respects .gitignore and .mgrepignore patterns.
Searching
bunx @mixedbread/mgrep "your natural language query" [path]Search Commands
Basic Search
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/libSearch Options
| 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 |
Examples with Options
# 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/servicesWorkflow
1. Start watcher (once per session or when files change significantly):
bunx @mixedbread/mgrep watch2. Search semantically:
bunx @mixedbread/mgrep "what you're looking for" [optional/path]3. Refine as needed using path constraints or options:
bunx @mixedbread/mgrep -m 20 -c "refined query" src/specific/directoryEnvironment Variables
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) |
Important Notes
- Always use
bunx @mixedbread/mgrepto run commands (not npm/npx or direct installation) - Run
bunx @mixedbread/mgrep watchbefore searching to ensure the index is current - mgrep respects
.gitignorepatterns automatically - Create
.mgrepignorefor additional exclusions
Related skills
How it compares
Use mgrep-code-search for intent-based exploration; keep ripgrep for exact symbol or string matches.
FAQ
When should mgrep-code-search be used over grep?
mgrep-code-search should be used when repositories have more than 30 non-gitignored files or nested structures where grep patterns cannot express intent. mgrep adds natural-language semantic retrieval across code and documents.
What content types does mgrep-code-search query?
mgrep-code-search queries code, plain text, PDFs, and images through the mgrep CLI. The skill helps agents find features, understand modules, and explore unfamiliar large codebases.