osgrep

Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.

View on GitHub
Author Ryan D'Onofrio
Namespace @Ryandonofrio3/osgrep
Category general
Version 0.2.0
Stars 997
Downloads 13
self.md verified
Table of content

Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.

Installation

npx claude-plugins install @Ryandonofrio3/osgrep/osgrep

Contents

Folders: hooks, skills

Files: hooks.json

Included Skills

This plugin includes 1 skill definition:

osgrep

Semantic code search. Use alongside grep - grep for exact strings, osgrep for concepts.

View skill definition

What osgrep does

Finds code by meaning. When you’d ask a colleague “where do we handle auth?”, use osgrep.

Primary command

osgrep "where do we validate user permissions"

Returns ~10 results with code snippets (15+ lines each). Usually enough to understand what’s happening.

Output explained

ORCHESTRATION src/auth/handler.ts:45
Defines: handleAuth | Calls: validate, checkRole, respond | Score: .94

export async function handleAuth(req: Request) {
  const token = req.headers.get("Authorization");
  const claims = await validateToken(token);
  if (!claims) return unauthorized();
  const allowed = await checkRole(claims.role, req.path);
  ...

When to Read more

The snippet often has enough context. But if you need more:

# osgrep found src/auth/handler.ts:45-90 as ORCH
Read src/auth/handler.ts:45-120

Read the specific line range, not the whole file.

Other commands

# Trace call graph (who calls X, what X calls)
osgrep trace handleAuth

# Skeleton of a huge file (to find which ranges to read)
osgrep skeleton src/giant-2000-line-file.ts

# Just file paths when you only need locations
osgrep "authentication" --compact

…(truncated)

Source

View on GitHub

Tags: general