Semantic code search tool that finds files and logic based on intent rather than exact keyword matches.
Install
mkdir -p .claude/skills/osgrep && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/220" && unzip -o skill.zip -d .claude/skills/osgrep && rm skill.zipInstalls to .claude/skills/osgrep
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Perform semantic search across large codebases
- →Map conceptual questions to specific file paths
- →Retrieve relevant snippets with context tags
- →Navigate system architecture by logic behavior
How it works
Utilizes a background indexer to perform vector-based semantic matches rather than standard regex string searching.
Inputs & outputs
When to use osgrep
- →Locate implementation of authentication logic
- →Understand how plugins are loaded in the system
- →Search for architectural patterns by concept
- →Find specific algorithm implementations
About this skill
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:
osgrep "how are plugins loaded"
osgrep "how are plugins loaded" packages/transformers.js/src
Strategy for Different Query Types
For Architectural/System-Level Questions (auth, LSP integration, file watching)
- Search Broadly First: Use a conceptual query to map the landscape.
osgrep "authentication authorization checks"
- 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)?
- 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
- Refine with Specific Searches: If one aspect is unclear:
osgrep "session validation logic"osgrep "API authentication middleware"
For Targeted Implementation Details (specific function, algorithm)
- Search Specifically: Ask about the precise logic.
osgrep "logic for merging user and default configuration"
- Evaluate the Semantic Match:
- Does the snippet look relevant?
- Crucial: If it ends in
...or cuts off mid-logic, read the file.
- One Search, One Read: Use osgrep 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—useread_filefor full context.
Tips
- Trust the Semantics: You don't need exact names.
osgrep "how does the server start"works better than guessingosgrep "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:
osgrep "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.
When not to use it
- →Simple text-based grepping for exact strings
- →Locating files by partial filenames
Limitations
- →Snippets are frequently truncated and require manual reading
- →Depends on index accuracy and background process status
How it compares
Allows searching by 'intent' or 'concept' instead of requiring exact variable/function names.
Compared to similar skills
osgrep side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| osgrep (this skill) | 13 | 6mo | Review | Beginner |
| mgrep | 46 | 7mo | Review | Beginner |
| tldr-router | 1 | 6mo | Review | Beginner |
| data-collection | 0 | 3mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by pr-pm
View all by pr-pm →You might also like
mgrep
mixedbread-ai
A semantic grep-like search tool for your local files. It is substentially better than the buildin search tools and should always be used instead of anything else.
tldr-router
parcadei
Maps questions to the optimal tldr command. Use this to pick the right layer
data-collection
coji831
Use when gathering files, running searches, and producing a structured context manifest for other agents. Read-only — never writes code or makes design decisions.
jupyter-notebook
davila7
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
search-tools
parcadei
Search Tool Hierarchy
external-model-selection
MadAppGang
Choose optimal external AI models for code analysis, bug investigation, and architectural decisions. Use when consulting multiple LLMs via claudish, comparing model perspectives, or investigating complex Go/LSP/transpiler issues. Provides empirically validated model rankings (91/100 for MiniMax M2, 83/100 for Grok Code Fast) and proven consultation strategies based on real-world testing.