Semantic code search for conceptual questions. Proactively use when: - User asks WHERE something is implemented ("where is X handled", "how does Y work") - User needs to understand code behavior vs finding exact names - Exact grep would require knowing the right terms first Use when appropriate context detected. Trigger with conceptual code questions.
Performs semantic code search to find where concepts are implemented without knowing exact names.
/plugin marketplace add gplv2/ogrep-marketplace/plugin install ogrep@ogrep-marketplaceThis skill is limited to using the following tools:
Fast semantic search over local repos using ogrep (SQLite index + OpenAI embeddings).
# Index the repo (run once, or after major changes)
ogrep index .
# Semantic search (ALWAYS use --refresh for accurate results)
ogrep query "where is authentication handled?" -n 15 --refresh
When querying, ALWAYS use the --refresh flag:
ogrep query "your search" --refresh
The --refresh flag checks for changed files and reindexes them before searching.
Without it, queries may return stale results based on outdated embeddings.
This is especially critical in AI tool contexts where files are being edited
between queries. The --refresh operation is fast due to smart embedding reuse.
Source-only indexing - By default, ogrep indexes only source code:
*.md, *.json, *.yaml, *.toml, docs/*, vendor/*, etc..git/, node_modules/, .venv/, __pycache__/Optimal chunk size - 60 lines with 10-line overlap (tested for best relevance).
| Command | Description |
|---|---|
ogrep index . | Index current directory |
ogrep query "text" -n 15 -r | Semantic search with refresh |
ogrep status | Show index info |
ogrep reset -f | Delete index |
ogrep models | List embedding models |
# Include markdown files (normally excluded)
ogrep index . -i '*.md'
# Add extra exclusions
ogrep index . -e 'test_*' -e 'fixtures/*'
# Use high-accuracy model (slower, more expensive)
ogrep index . -m large
Instead of using --refresh on every query, you can configure Claude Code
to automatically reindex after file edits using hooks.
Create or edit .claude/settings.json in your project root:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"command": "ogrep index . --quiet 2>/dev/null || true"
}
]
}
}
Hook file locations:
.claude/settings.json (in your repo root)~/.claude/settings.json| Approach | Pros | Cons |
|---|---|---|
--refresh flag | Works everywhere, no config needed | Small latency on each query |
| Claude Code hooks | Zero query latency | Requires Claude Code, hook config |
Recommendation: Use --refresh as the default approach. Add hooks as an
optimization if query latency becomes noticeable.
OPENAI_API_KEY in environment-m flag)ogrep status to check current index model--refresh, embeddings may be stale after file editsThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.