osgrep-reference

Document osgrep CLI commands, options, and index-management workflows.

55|10|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/tdimino/bg3se-macos --skill osgrep-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: osgrep-reference
Source: https://github.com/tdimino/bg3se-macos/tree/main/tools/skills/osgrep-reference
Command: npx skills add https://github.com/tdimino/bg3se-macos --skill osgrep-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

osgrep provides semantic, AI-assisted code search that finds concepts and patterns in codebases, not just exact strings. It helps you understand architecture, locate related logic, and accelerate code understanding.

Core Features & Use Cases

  • Skeleton search & fast summaries: Compress files to function signatures and quickly browse structure.
  • Trace & symbols: Build a view of call graphs and indexed symbols to understand dependencies.
  • Health & maintenance: doctor checks ensure indexes stay healthy and up-to-date.
  • Use Case: Explore a large mono-repo to map how a core module interacts with downstream components.

Quick Start

Inside your repository, run osgrep with a semantic query, e.g. osgrep "authentication check" to locate related files and cross-references. Then use osgrep trace or symbols to inspect call graphs and symbol definitions.

Frequently Asked Questions about osgrep-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search code semantically instead of using string matching?

Semantic code search finds concepts and patterns beyond exact strings. osgrep uses AI-assisted indexing to locate related logic, architecture patterns, and cross-references by meaning. Run osgrep with a natural query like osgrep "authentication check" to search your codebase semantically.

What CLI commands does osgrep provide for exploring code architecture?

osgrep offers skeleton to compress files into function signatures, trace to build call graphs, symbols to inspect indexed definitions, and doctor to verify index health. These commands support both architectural exploration of mono-repos and targeted dependency analysis.

How do I set up and maintain per-project osgrep indexes?

osgrep creates per-project .osgrep indexes that require index management via the index command and health checks through doctor. Use list to view indexed symbols and run doctor periodically to ensure indexes stay current with your codebase.

Can osgrep help me understand how modules interact in a large codebase?

Yes. osgrep's skeleton and trace commands map function signatures and call graphs across large mono-repos. This reveals how a core module connects to downstream components and accelerates understanding of cross-module dependencies.

Does osgrep support advanced query refinement with reranking?

osgrep integrates with ColBERT reranking to refine search results. Use targeted queries with options like -m and -s to narrow semantic searches, and apply --per-file filtering to control result scope and relevance.

What should I do if my osgrep index becomes out of sync?

Run osgrep doctor to diagnose index health issues. If problems are found, use the --reset option to refresh the index. The doctor command identifies stale entries and helps restore synchronization with your current codebase.