Mgrep Code Search

🌐Community
by intellectronica · vlatest · Repository

Quickly finds code snippets matching complex patterns across large repositories using advanced regular expressions.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add mgrep-code-search npx -- -y @trustedskills/mgrep-code-search
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "mgrep-code-search": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/mgrep-code-search"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

The mgrep-code-search skill enables AI agents to perform advanced code searches across repositories using grep-like patterns. It allows for filtering results by file type, line numbers, and specific context within the codebase.

When to use it

  • Locating specific functions or variables across a large monorepo quickly.
  • Finding all instances of a deprecated API usage before refactoring.
  • Searching for configuration patterns (e.g., environment variables) hidden in multiple files.
  • Identifying lines containing specific error codes or log messages within source code.

Key capabilities

  • Executes standard grep commands directly against code repositories.
  • Supports regex patterns for flexible and complex search queries.
  • Filters results by file extensions to narrow down relevant code.
  • Returns precise line numbers and surrounding context for matches.

Example prompts

  • "Find all occurrences of 'TODO' comments in Python files within the project."
  • "Search for any usage of the legacy_auth function and show me the line numbers."
  • "List all JavaScript files that import the axios library."

Tips & gotchas

Ensure the AI agent has read access to the target repository before initiating a search, as it cannot scan private or inaccessible codebases. For very large repositories, consider refining your regex patterns to avoid overwhelming the context window with excessive results.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
intellectronica
Installs
199

🌐 Community

Passed automated security scans.