Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

osgrep-reference

БесплатноБез исполняемых скриптовНе проверен

Comprehensive CLI reference and search strategies for osgrep semantic code search. Use for detailed CLI options, index management commands, search strategy…

tdiminoот tdimino★ 68 звёзд на GitHub15 установок в других каталогах

Об этом скилле

osgrep: Semantic Code Search

ALWAYS prefer osgrep over grep/rg for code exploration. It finds concepts, not just strings.

Overview

osgrep is a natural-language semantic code search tool that finds code by concept rather than keyword matching. Unlike grep which matches literal strings, osgrep understands code semantics using local AI embeddings.

Version 0.5.16 (Dec 2025) highlights:

  • skeleton command: Compress files to function/class signatures (~85% token reduction)
  • trace command: Show who calls/what calls for any symbol (call graph)
  • symbols command: List all indexed symbols with definitions
  • doctor command: Health/integrity verification
  • list command: Display all indexed repositories
  • Per-project .osgrep/ directories (no longer global ~/.osgrep/data)
  • V2 architecture with improved performance (~20% token savings, ~30% speedup)
  • Go language support
  • --reset flag for clean re-indexing
  • ColBERT reranking for better result relevance
  • Role detection: distinguishes orchestration logic from type definitions
  • Split searching: separate "Code" and "Docs" indices

When to use osgrep:

  • Exploring unfamiliar codebases ("where is the auth logic?")
  • Finding conceptual patterns ("show me error handling")
  • Locating cross-cutting concerns ("all database migrations")
  • User explicitly asks to search code semantically

When to use traditional tools:

  • Searching for exact strings or identifiers (use Grep)
  • Finding files by name pattern (use Glob)
  • Already know the exact location (use Read)

Quick Start

IMPORTANT: You must cd into the project directory before running osgrep commands. osgrep uses per-project .osgrep/ indexes, so it only searches the repo you're currently in.

cd /path/to/project      # REQUIRED: cd into the project first
osgrep "your query"      # Now search works

Basic Search

osgrep "your semantic query"
osgrep search "your query" path/to/scope    # Scope to subdirectory
osgrep skeleton src/file.py                 # Compress file to signatures
osgrep trace functionName                   # Show call graph
osgrep symbols                              # List all symbols

Examples:

osgrep "user registration flow"
osgrep "webhook signature validation"
osgrep "database transaction handling"
osgrep "how are plugins loaded" packages/src

Output Format

Returns results in this format:

IMPLEMENTATION path/to/file:line
Score: 0.95

Preamble:
[code snippet or content preview]
...
  • IMPLEMENTATION: Tag indicating the type of match
  • Score: Relevance score (0-1, higher is better)
  • ...: Truncation marker—snippet is incomplete, use Read for full context

Search Strategy

For Architectural/System-Level Questions

Use for: auth, integrations, file watching, cross-cutting concerns

  1. Search broadly first to map the landscape:

    osgrep "authentication authorization checks"
    
  2. Survey the results - look for patterns across multiple files:

    • Are checks in middleware? Decorators? Multiple services?
    • Do file paths suggest different layers (gateway, handlers, utils)?
  3. Read strategically - pick 2-4 files that represent different aspects:

    • Read the main entry point
    • Read representative middleware/util files
    • Follow imports if architecture is unclear
  4. Refine with specific searches if one aspect is unclear:

    osgrep "session validation logic"
    osgrep "API authentication middleware"
    

For Targeted Implementation Details

Use for: specific function, algorithm, single feature

  1. Search specifically about the precise logic:

    osgrep "logic for merging user and default configuration"
    
  2. Evaluate the semantic match:

    • Does the snippet look relevant?
    • If it ends in ... or cuts off mid-logic, read the file
  3. One search, one read: Use osgrep to pinpoint the best file, then read it fully.

CLI Reference

Search Options

Control result count:

osgrep "validation logic" -m 20           # Max 20 results total (default: 10)
osgrep "validation logic" --per-file 3    # Up to 3 matches per file (default: 1)

Output formats:

osgrep "API endpoints" --compact           # File paths only
osgrep "API endpoints" --content           # Full chunk content (not just snippets)
osgrep "API endpoints" --scores            # Show relevance scores
osgrep "API endpoints" --plain             # Disable ANSI colors

Sync before search:

osgrep "validation logic" -s               # Sync files to index before searching
osgrep "validation logic" -d               # Dry run (show what would sync)

Index Management

osgrep index                    # Incremental update
osgrep index -r                 # Full re-index from scratch (--reset)
osgrep index -p /path/to/repo   # Index a specific directory
osgrep index -d                 #
Полный SKILL.md на GitHub

Установить osgrep-reference в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(osgrep:*)
Read

FAQ

Что делает скилл osgrep-reference?

Comprehensive CLI reference and search strategies for osgrep semantic code search. Use for detailed CLI options, index management commands, search strategy guidance (architectural vs targeted queries), and troubleshooting. Complements the osgrep plugin which handles daemon lifecycle.

Как установить скилл osgrep-reference?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл osgrep-reference запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить osgrep-reference с