noodlbox

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):

  1. The hook extracts the search pattern
  2. Queries Noodlbox for related processes and symbols
  3. 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.ts

With 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, FormHandler

Setup

Search hooks are automatically configured when you install the Noodlbox plugin:

claude plugin install noodlbox@noodlbox

Uses the PreToolUse hook to intercept Glob, Grep, and Bash tool calls.

Supported Tools

ToolWhat's Enhanced
GlobFile pattern searches
GrepContent pattern searches
Bashgrep, 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

On this page