
Osgrep
Find code by concept using natural language semantic search
What You Can Do
You can locate code by describing what it does rather than searching for specific syntax. Ask questions like "where is auth validated", "how are plugins loaded", or "find the retry logic" and get back file paths with line numbers and relevant code snippets. This works across large codebases to help you understand system architecture, trace implementation details, and discover how features are built.
Features
describe code behavior and get semantic matches across your codebase
find code by what it does, not by exact text or variable names
pinpoint exact locations in your project structure
see up to 16-line code samples to validate matches before diving deep
optionally narrow searches to specific directories or packages
map system-level patterns like authentication flows, plugin loading, or middleware chains
identify how similar logic is implemented across different parts of your codebase
Example Output
Query: osgrep "where is user authentication validated"
Results:
gateway/middleware/auth.js:42-58 — Validates session tokens and user roles
services/auth/validator.js:18-34 — Checks JWT signature and expiration
utils/security.js:105-120 — Core validation logic with permission checks
Query: osgrep "how are plugins loaded and initialized"
Results:
plugins/loader.js:1-16 — Plugin discovery and registration
core/plugin-registry.js:45-62 — Initialization sequence
config/plugin-config.json:1-30 — Plugin configuration structure
What's Included
- SKILL.md: Complete osgrep reference with query strategies and best practices
- Query Strategy Framework: Guidance for architectural vs. targeted implementation searches
- Output Interpretation Guide: How to read results and when to drill deeper into full files
- Real-World Query Examples: Authentication, plugin systems, middleware, configuration patterns
Who It's For
- Backend engineers navigating unfamiliar codebases or microservices architectures
- Full-stack developers learning how features are implemented across layers
- DevOps engineers tracing logging, monitoring, or deployment logic
- Tech leads conducting code reviews and understanding system design decisions
- Onboarding developers discovering where core functionality lives
Best For
- Finding where specific features or business logic are implemented
- Understanding authentication, authorization, and security flows
- Tracing how configuration is loaded and applied
- Discovering plugin architectures and middleware chains
- Mapping error handling and retry patterns across codebases
- Locating database queries, API endpoints, or service integrations







