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.
When to Use
Use this to find code by concept or behavior (e.g., "where is auth validated", "how are plugins loaded").
osgrep "how are plugins loaded"
osgrep "how are plugins loaded" packages/transformers.js/src
Strategy for Different Query Types
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"
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
[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. osgrep "how does the server start" works better than guessing osgrep "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.
1---2name: osgrep-skill3description: osgrep4---5# osgrep67Semantic 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.89## When to Use1011### Use this to find code by **concept** or **behavior** (e.g., "where is auth validated", "how are plugins loaded").1213```bash14osgrep "how are plugins loaded"15osgrep "how are plugins loaded" packages/transformers.js/src16```171819## Strategy for Different Query Types2021- **Search Broadly First:** Use a conceptual query to map the landscape.22- `osgrep "authentication authorization checks"`23- **Survey the Results:** Look for patterns across multiple files:24- Are checks in middleware? Decorators? Multiple services?25- Do file paths suggest different layers (gateway, handlers, utils)?26- **Read Strategically:** Pick 2-4 files that represent different aspects:27- Read the main entry point28- Read representative middleware/util files29- Follow imports if architecture is unclear30- **Refine with Specific Searches:** If one aspect is unclear:31- `osgrep "session validation logic"`32- `osgrep "API authentication middleware"`33- **Search Specifically:** Ask about the precise logic.34- `osgrep "logic for merging user and default configuration"`35- **Evaluate the Semantic Match:**36- Does the snippet look relevant?37- **Crucial:** If it ends in `...` or cuts off mid-logic, **read the file**.38- **One Search, One Read:** Use osgrep to pinpoint the best file, then read it fully.3940## Output Format4142- `[Definition]`: Semantic search detected a class/function here. High relevance.43- `...`: **Truncation Marker**. Snippet is incomplete—use `read_file` for full context.4445## Tips4647- **Trust the Semantics:** You don't need exact names. `osgrep "how does the server start"` works better than guessing `osgrep "server.init"`.48- **Watch for Distributed Patterns:** If results span 5+ files in different directories, the feature is likely architectural—survey before diving deep.49- **Scope When Possible:** Use path constraints to focus: `osgrep "auth" src/server/`50- **Don't Over-Rely on Snippets:** For architectural questions, snippets are signposts, not answers. Read the key files.51- **"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.
Run npx skillmds@latest add pr-pm/osgrep-skill in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
osgrep It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
pr-pm (@pr-pm) published this skill. Their other Agent Skills are listed on their SkillMD profile.