Agent skill · data analytics · intellectronica
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.
Why this skill is useful
Provides niche commands and workflows for semantic code search that enhance codebase exploration capabilities.
What it needs
Requires bunx installed locally. About 2k tokens when loaded. Last updated 2026-04-25. 281 stars on the source repository.
What this skill does
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: The watch command indexes the repository and maintains synchronisation with file changes. It respects .gitignore and .mgrepignore patterns. Searching Search Commands Basic Search 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 Workflow 1. Start watcher (once per session or when files change significantly): 2. Search semantically: 3. Refine as needed using path constraints or options: Environment Variables Configure defaults via environment variables: Variable Purpose ---------- --------- MGREPMAXCOUNT Default result limit MGREPCONTENT Enable content display (1/true) MGREPANSWER Enable AI synthesis (1/true) MGREPSYNC Pre-search sync (1/true) Important Notes Always use bunx @mixedbread/mgrep to run commands (not npm/npx or direct installation) Run bunx @mixedbread/mgrep watch before searching to ensure the index is current mgrep respects .gitignore patterns automatically Create .mgrepignore for additional exclusions
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills intellectronica/skills--430c09