osgrep
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 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
Quick Install
/plugin add https://github.com/pr-pm/prpm/tree/main/osgrep-skillCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
subagent-driven-development
DevelopmentThis 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.
algorithmic-art
MetaThis 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.
executing-plans
DesignUse 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.
cost-optimization
OtherThis 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.
