
mgrep-code-search
Semantic code search via mgrep for natural-language exploration of large or deeply nested codebases.
- version
- 0.1.1768936949
- GitHub stars
- 302
What it does
- Covers natural-language queries for finding features, understanding intent, and exploring unfamiliar code
- Complements grep and ripgrep rather than replacing them for keyword-exact matches
- Targets projects with more than 30 non-gitignored files or nested directory structures
- Designed for Claude Code sessions where locating code by concept is faster than by literal string
Semantic code search using mgrep for efficient codebase exploration. This skill should be used when searching or exploring codebases with more than 30 non-gitignored files and/or nested directory structures. It provides natural language semantic search that complements traditional grep/ripgrep for finding features, understanding intent, and exploring unfamiliar code.
Add marketplace
/plugin marketplace add intellectronica/agent-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install mgrep-code-search@intellectronica-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourcemgrep 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 watch
The 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/lib
Search 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/services
Workflow
-
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
Environment 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
Readme
mgrep-code-search
Semantic code search using mgrep for efficient codebase exploration. This skill should be used when searching or exploring codebases with more than 30 non-gitignored files and/or nested directory structures. It provides natural language semantic search that complements traditional grep/ripgrep for finding features, understanding intent, and exploring unfamiliar code.
Installation
Claude Code / Cowork
claude plugin marketplace add intellectronica/agent-skills
claude plugin install mgrep-code-search@intellectronica-skills
npx skills
npx skills add intellectronica/agent-skills --skill mgrep-code-search
This plugin is auto-generated from skills/mgrep-code-search.
Details
- Marketplace
- intellectronica/agent-skills
- Source
- plugins/mgrep-code-search
- Category
- Development
- Listed since
- Apr 7, 2026
More from intellectronica/agent-skills
All 22- monologue-notes-apiv0.1.1776844761
- nano-banana-2v0.1.1772124957
- nano-banana-prov0.1.1768936949
- notion-apiv0.1.1769613281
- promptifyv0.1.1768936949
- raindrop-apiv0.1.1769629481
- ray-so-code-snippetv0.1.1769029639
- tavilyv0.1.1768936124
- todoist-apiv0.1.1770201261
- ultrathinkv0.1.1768936949
- upstash-redis-kvv0.1.1770038631
- youtube-transcriptv0.1.1768936949
- anki-connectv0.1.1768994658
- beautiful-mermaidv0.1.1769684732
- context7v0.1.1768935194
- copilot-sdkv0.1.1775555186
- gog-cliv0.1.1777131088
- gpt-image-1-5v0.1.1768936949
- here-be-gitv0.1.1771067284
- lorem-ipsumv0.1.1768936949
- markdown-converterv0.1.1768936949
Similar to mgrep-code-search
More Developer Tools
mgrep-code-searchSkillintellectronica/agent-skills630 installsSemantic natural-language code search via mgrep, complementing grep and ripgrep in larger, unfamiliar codebases.
file-searchPluginnetresearch/claude-code-marketplace92 starsEfficient code and file search using ripgrep, ast-grep, fd, rga, tokei, and scc. Provides tool selection guidance, targeting strategies, and progressive search
explorePluginrohitg00/awesome-claude-code-toolkit2.8K starsSmart codebase exploration with dependency mapping and structure analysis
code-intelligencePluginoaustegard/claude-skills415 starsCodebase exploration, navigation, mapping, and static analysis tools for understanding unfamiliar codebases.
ASTMCP serverast-grep500 starsStructural code search and rule testing over local codebases using ast-grep patterns and YAML rules.
grepai-search-basicsSkillyoanbernabeu/grepai-skills942 installsBeginner's guide to GrepAI semantic code search, matching by meaning rather than exact text.