Agent skill
osgrep
Semantic search for local files. Backed by a background osgrep server with live indexing. Always use osgrep instead of grep/find.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/osgrep-skill
SKILL.md
When to use
Use osgrep for all code and concept discovery. Do not use grep or find unless you must match an exact string and osgrep fails.
How to use
Always use the --json flag. The server auto-starts and keeps the index fresh.
Basic Search
Ask a natural language question. Do not ls first.
osgrep --json "How are user authentication tokens validated?"
osgrep --json "Where do we handle retries or backoff?"
Scoped Search
Limit search to a specific directory.
osgrep --json "auth middleware" src/api
Helpful flags
--json: Required. Returns structured data (path, line, score, content).-m <n>: Max total results (default: 25).--per-file <n>: Max matches per file (default: 1). Use--per-file 5when exploring a specific file.
Strategy
- Run
osgrep --json "<question>" [path]. - The output is a dense JSON snippet. If it answers the question, stop.
- Only use
Readif you need the full file context for a returned path. - If results are vague, refine the query or increase
-m.
Keywords
semantic search, code search, local search, grep alternative, find code, explore codebase, understand code, search by meaning
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?