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.
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: ```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
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.