Install
$ agentstack add skill-intellectronica-agent-skills-mgrep-code-search ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
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 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 | 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):
``bash bunx @mixedbread/mgrep watch ``
- Search semantically:
``bash bunx @mixedbread/mgrep "what you're looking for" [optional/path] ``
- Refine as needed using path constraints or options:
``bash 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
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: intellectronica
- Source: intellectronica/agent-skills
- License: CC0-1.0
- Homepage: https://skills.sh/intellectronica/agent-skills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.