mgrep-code-search — скилл для Claude Code: как установить
Скилл подключает семантический поиск по кодовой базе через утилиту mgrep. Он находит нужные места по смысловому описанию задачи, если в проекте больше 30 файлов.
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a claude-codeЧто делает mgrep-code-search
Скилл добавляет в окружение агента семантический поиск по кодовой базе через утилиту mgrep. Инструмент ищет смысл реализации по запросам на естественном языке, когда точные названия функций неизвестны. Поиск охватывает код и сопутствующую документацию. Индексатор автоматически отсекает лишнее по правилам .gitignore и .mgrepignore.
Сначала запускается фоновый процесс bunx @mixedbread/mgrep watch. Он строит индекс и отслеживает правки в проекте. Затем агент выполняет поисковые команды вида bunx @mixedbread/mgrep "запрос" [путь]. Доступны флаги ограничения выдачи -m, вывода полного содержимого -c, генерации сводки -a и синхронизации -s.
Инструмент ориентирован на проекты со сложной структурой каталогов и объёмом более 30 файлов. Вызовы жёстко завязаны на среду Bun. Использовать npx или ставить пакет через npm нельзя, поэтому без рантайма Bun инструмент просто не запустится.
Какие задачи решает
- найти место настройки аутентификации без знания точных имён функций
- разобраться в незнакомой архитектуре с глубокой вложенностью папок
- найти обработку сетевых ошибок по смысловому описанию
- получить готовую сводку по логике работы кэша прямо из выдачи поиска
Примеры запросов агенту
- Найди через mgrep, где в проекте настраивается подключение к базе данных
- Запусти индексацию репозитория через mgrep watch
- Найди в папке src обработчики платежей с флагом -a для синтеза ответа
Как установить mgrep-code-search
1Через Skills CLI (Vercel)
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a claude-code2Вручную: положить файлы
~/.claude/skills/mgrep-code-search/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/mgrep-code-search/
1Через Skills CLI (Vercel)
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a codex2Вручную: положить файлы
.agents/skills/mgrep-code-search/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a cursor2Вручную: положить файлы
.cursor/skills/mgrep-code-search/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install intellectronica/agent-skills mgrep-code-search2Вручную: положить файлы
.github/skills/mgrep-code-search/SKILL.md1Через Skills CLI (Vercel)
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a gemini-cli2Командой платформы
gemini skills install https://github.com/intellectronica/agent-skills --path skills/mgrep-code-searchВручную: положить файлы
.devin/skills/mgrep-code-search/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add intellectronica/agent-skills --skill mgrep-code-search -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора20
Похожие
Рядом в теме «Настройка агента: память, контекст, субагенты»
Все скиллы по теме «Настройка агента: память, контекст, субагенты» →Вопросы о mgrep-code-search
Как установить mgrep-code-search в Claude Code?
Для добавления скилла выполните команду npx skills add intellectronica/agent-skills --skill mgrep-code-search -a claude-code.
Что делает скилл mgrep-code-search?
Он выполняет семантический поиск по коду и файлам проекта на основе естественного языка, помогая находить нужные компоненты без знания конкретных имён функций.
Можно ли запускать mgrep через npx или npm?
Нет, автор инструмента требует выполнять запуск строго через bunx @mixedbread/mgrep. Для работы поисковика в системе должен быть установлен рантайм Bun.
Исходный текст
SKILL.md · CC0-1.0
--- name: mgrep-code-search description: 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 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: ```bash bunx @mixedbread/mgrep watch ``` The `watch` command indexes the repository and maintains synchronisation with file changes. It respects `.gitignore` and `.mgrepignore` patterns. ### Searching ```bash bunx @mixedbread/mgrep "your natural language query" [path] ``` ## Search Commands ### Basic Search ```bash 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 ```bash # 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): ```bash bunx @mixedbread/mgrep watch ``` 2. **Search semantically**: ```bash bunx @mixedbread/mgrep "what you're looking for" [optional/path] ``` 3. **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/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
© intellectronica · CC0-1.0 · intellectronica/agent-skills