Search Hooks
Automatic semantic search enhancement for file searches
Search hooks automatically enhance file search tools with Noodlbox semantic context. When your AI agent searches for code, it gets architectural context alongside file matches.
How It Works
When your AI agent searches using Glob, Grep, or Bash (with grep/rg/find commands):
- The hook extracts the search pattern
- Queries Noodlbox for related processes and symbols
- Returns semantic context alongside the original search
The original tool still runs - the hook adds context, not replaces results.
Before vs After
Without hooks (file paths only):
> grep "validator"
→ src/auth/validator.ts
→ src/user/validator.ts
→ tests/validator.test.tsWith hooks (semantic context added):
> grep "validator"
→ TokenValidator (src/auth/validator.ts:45)
CALLS: verifyJWT(), checkExpiry()
CALLED_BY: AuthMiddleware, APIGateway
→ InputValidator (src/user/validator.ts:12)
CALLS: sanitizeInput(), validateSchema()
CALLED_BY: UserController, FormHandlerSetup
Search hooks are automatically configured when you install the Noodlbox plugin:
claude plugin install noodlbox@noodlboxUses the PreToolUse hook to intercept Glob, Grep, and Bash tool calls.
Search hooks are automatically configured when you run noodl configure:
noodl configureUses the beforeShellExecution hook to enhance shell searches with semantic context.
Supported Tools
| Tool | What's Enhanced |
|---|---|
Glob | File pattern searches |
Grep | Content pattern searches |
Bash | grep, rg, ag, ack, find commands |
Fallback Behavior
The hook gracefully falls back when:
- Repository is not indexed
- Search pattern is too short
- Any error occurs
This makes it safe to use across all projects - unindexed repos work normally.
See Also
- Session Hooks - Context at conversation start
- MCP Tools - Direct tool access