Skip to content
Join free
intellectronica

Mgrep Code Search skill

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.

$npx alyn-cli add mgrep-code-search
View this skill on GitHubintellectronica/agent-skills/skills/mgrep-code-search/SKILL.md
Pack stars
305
Pack installs
146k
Alyn Score
40/99
Updated
7 months ago
License
CC0-1.0

intellectronica

Mgrep Code Search

What is the Mgrep Code Search skill?

Mgrep Code Search is a coding skill by intellectronica for Claude Code, Cursor, Codex and other AI coding agents. 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.

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.

What the SKILL.md covers

  • Overview
  • When to Use This Skill
  • Quick Start
  • Indexing
  • Searching
  • Search Commands
  • Basic Search
  • Search Options
  • Examples with Options
  • Workflow
Author
intellectronica
Pack
intellectronica/agent-skills (22 skills)
Category
Coding, #1789 of 1826
Alyn Score
40 / 99
Files
1
License
CC0-1.0
Last updated
7 months ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Mgrep Code Search compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Mgrep Code Search · intellectronica403057 months ago
Codebase Design · vinvcn726.1k34 h ago
Huashu Info Search · alchaincyf522.3k3 days ago
Scaffold Exercises · Matt Pocock98332k31 h ago

Install Mgrep Code Search

Pick your agent. Every command is ready to paste.

$npx alyn-cli add mgrep-code-search

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add intellectronica/agent-skills --skill mgrep-code-search

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads mgrep-code-search when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the mgrep-code-search skill”. In Codex, type $mgrep-code-search.

The skill itself

SKILL.md

FolderGitHub

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

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

  1. Start watcher (once per session or when files change significantly):

    bunx @mixedbread/mgrep watch
    
  2. 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/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/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

Tips for Mgrep Code Search

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Mgrep Code Search

What does the Mgrep Code Search skill do?

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.

How do I install Mgrep Code Search?

Run "npx alyn-cli add mgrep-code-search" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Mgrep Code Search work in Cursor and Codex?

Yes. Mgrep Code Search uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

What is inside the Mgrep Code Search skill?

The SKILL.md covers Overview, When to Use This Skill, Quick Start, Indexing, Searching, Search Commands.

What is a good alternative to Mgrep Code Search?

Codebase Design by vinvcn is the highest-ranked similar skill from another creator, with an Alyn Score of 72 compared to 40 for Mgrep Code Search.

Is Mgrep Code Search free?

Mgrep Code Search is open source on GitHub under the CC0-1.0 license. It is free to install; check the license before commercial use.

Who made Mgrep Code Search?

Mgrep Code Search is published by intellectronica in the intellectronica/agent-skills repository, together with 21 other skills.

Similar skills. From other creators.