Back to Skills

osgrep

pr-pm
Updated Today
75 views
62
9
62
View on GitHub
Developmentgeneral

About

osgrep provides semantic search across local files using a background server with live indexing. Developers should always use it instead of grep/find for code and concept discovery with natural language queries. Key features include structured JSON output, scoped directory searches, and automatic server management.

Documentation

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 5 when exploring a specific file.

Strategy

  1. Run osgrep --json "<question>" [path].
  2. The output is a dense JSON snippet. If it answers the question, stop.
  3. Only use Read if you need the full file context for a returned path.
  4. 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

Quick Install

/plugin add https://github.com/pr-pm/prpm/tree/main/osgrep-skill

Copy and paste this command in Claude Code to install this skill

GitHub 仓库

pr-pm/prpm
Path: .claude/skills/osgrep-skill
claudeclaude-codecursorcursor-ai-editcursorrulespackage-manager

Related Skills

subagent-driven-development

Development

This skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.

View skill

algorithmic-art

Meta

This Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.

View skill

executing-plans

Design

Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.

View skill

cost-optimization

Other

This Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.

View skill