Use sgrep for semantic code search. Use when you need to find code by meaning rather than exact text matching. Perfect for finding concepts like "authentication logic", "error handling patterns", or "database connection pooling".
Uses sgrep for semantic code search by meaning rather than exact text matching. Triggers when you need to find code concepts like "authentication logic" or "error handling patterns" across the codebase.
/plugin marketplace add Rika-Labs/sgrep/plugin install sgrep@sgrepThis skill is limited to using the following tools:
Use sgrep to search code semantically using natural language queries. sgrep understands code meaning, not just text patterns.
Ensure sgrep is installed:
curl -fsSL https://raw.githubusercontent.com/rika-labs/sgrep/main/scripts/install.sh | sh
sgrep search "your natural language query"
Find functionality:
sgrep search "where do we handle user authentication?"
Search with filters:
sgrep search "error handling" --filters lang=rust
sgrep search "API endpoints" --glob "src/**/*.rs"
Get more results:
sgrep search "database queries" --limit 20
Show full context:
sgrep search "retry logic" --context
--limit <n> or -n <n>: Maximum results (default: 10)--context or -c: Show full chunk content instead of snippet--path <dir> or -p <dir>: Repository path (default: current directory)--glob <pattern>: File pattern filter (repeatable)--filters key=value: Metadata filters like lang=rust (repeatable)--threads <n>: Maximum threads for parallel operations--cpu-preset <preset>: CPU usage preset (auto|low|medium|high|background)If no index exists, sgrep will automatically create one on first search. To manually index:
sgrep index # Index current directory
sgrep index --force # Rebuild from scratch
The plugin automatically manages sgrep watch during Claude sessions. For manual watch:
sgrep watch # Watch current directory
sgrep watch --debounce-ms 200
sgrep uses local embeddings by default:
sgrep config # Show current configuration
sgrep config --init # Create default config file
sgrep config --show-model-dir # Show model cache directory
sgrep config --verify-model # Check if model files are present
If HuggingFace is blocked, set HTTPS_PROXY environment variable or see the offline installation guide.
Find authentication code:
sgrep search "how do we authenticate users?"
Find error handling:
sgrep search "error handling patterns" --filters lang=rust
Search specific file types:
sgrep search "API rate limiting" --glob "src/**/*.rs"
Get detailed results:
sgrep search "database connection pooling" --context --limit 5
Results show:
--filters lang=rust to narrow by language--glob "src/**/*.rs" to search specific directories--context when you need full function/class definitionsWhen Claude needs to find code:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.