smithery.ai

smgrep

Semantic code search using natural language queries. Use when users ask "where is X implemented", "how does Y work", "find the logic for Z", or need to locate code by concept rather than exact text. Returns file paths with line numbers and code snippets.

First seen Apr 14, 2026

Installation

$ npx skills add https://smithery.ai

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0
Allowed toolsBash(smgrep:*), Read

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,928 B
  • docs SUMMARY.md 268 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

When to Use

Use this to find code by concept or behavior (e.g., "where is auth validated", "how are plugins loaded"). Note: This tool prioritizes finding the right files and locations in the code. Snippets are truncated (max 16 lines) and are often just previews.

Example:

smgrep "how are plugins loaded"
smgrep "how are plugins loaded" packages/transformers.js/src

Strategy for Different Query Types

For Architectural/System-Level Questions (auth, LSP integration, file watching)

  1. Search Broadly First: Use a conceptual query to map the landscape.

* smgrep "authentication authorization checks"

  1. Survey the Results: Look for patterns across multiple files:

Are checks in middleware? Decorators? Multiple services? Do file paths suggest different layers (gateway, handlers, utils)?

  1. Read Strategically: Pick 2-4 files that represent different aspects:

Read the main entry point Read representative middleware/util files * Follow imports if architecture is unclear

  1. Refine with Specific Searches: If one aspect is unclear:

smgrep "session validation logic" smgrep "API authentication middleware"

For Targeted Implementation Details (specific function, algorithm)

  1. Search Specifically: Ask about the precise logic.

* smgrep "logic for merging user and default configuration"

  1. Evaluate the Semantic Match:

Does the snippet look relevant? Crucial: If it ends in ... or cuts off mid-logic, read the file.

  1. One Search, One Read: Use smgrep to pinpoint the best file, then read it fully.

Output Format

Returns: path/to/file:line [Tags] Code Snippet

  • [Definition]: Semantic search detected a class/function here. High relevance.
  • ...: Truncation Marker. Snippet is incomplete—use read_file for full context.

Tips

  • Trust the Semantics: You don't need exact names. smgrep "how does the server start" works better than guessing smgrep "server.init".
  • Watch for Distributed Patterns: If results span 5+ files in different directories, the feature is likely architectural—survey before diving deep.
  • Scope When Possible: Use path constraints to focus: smgrep "auth" src/server/
  • Don't Over-Rely on Snippets: For architectural questions, snippets are signposts, not answers. Read the key files.
  • "Still Indexing...": If you see this, please stop, alert the user that the index is ongoing and ask them if they wish to proceed. Results will be partial until the index is complete.