The MCP-server form of osgrep (osgrep mcp / osgrep serve) is intentionally
NOT used by this skill. It spawns multiple worker processes that consume
gigabytes of RAM and pin every CPU core, which has caused thermal throttling
and OOM pressure in practice. The CLI is the supported interface.
Do NOT use osgrep when:
- You already know the exact symbol or file → use
Read/rg - You want a structural code pattern → use
ast-grep - You only want filename discovery → use
rg --filesorfd - The repo has no index and indexing would take longer than a manual search
| Command | Purpose |
|---|---|
osgrep index |
One-time / refresh index for current repo |
osgrep search <pattern> |
Semantic search — the main verb |
osgrep symbols [pattern] |
List indexed symbols + defining files |
osgrep skeleton <target> |
Show signatures without implementation |
osgrep trace <symbol> |
Call-graph trace for a symbol |
osgrep list |
Show the project's .osgrep index contents |
osgrep doctor |
Diagnose install / index health |
Always pass --plain for machine-readable output when capturing into agent
context.
osgrep list
If empty or stale, build one:
osgrep index
osgrep search "where we validate the auth header" --plain
osgrep search "rate limit token bucket" src/api --plain
If too narrow, drop constraints and rephrase more generally.
osgrep symbols UserService --plain
osgrep skeleton src/auth/login.ts
osgrep trace verifyToken