๐ก Bulk file read optimizer. Suggests semantic search alternatives when reading multiple files. Helps reduce token usage by using claudemem's ranked results instead of sequential file reads.
View on GitHubFebruary 5, 2026
Select agents to install to:
npx add-skill https://github.com/MadAppGang/claude-code/blob/main/plugins/code-analysis/skills/search-interceptor/SKILL.md -a claude-code --skill search-interceptorInstallation paths:
.claude/skills/search-interceptor/# Search Interceptor This skill helps optimize bulk file operations by suggesting semantic search alternatives when they would be more efficient. ## When Semantic Search is More Efficient | Scenario | Token Cost | Alternative | |----------|------------|-------------| | Read 5+ files | ~5000 tokens | `claudemem search` (~500 tokens) | | Glob all *.ts files | ~3000+ tokens | `claudemem --agent map` | | Sequential reads to understand | Variable | One semantic query | ## When to Consider Alternatives ### Multiple File Reads If planning to read several files, consider: ```bash # Instead of reading 5 files individually claudemem search "concept from those files" -n 15 # Gets ranked results with context ``` ### Broad Glob Patterns If using patterns like `src/**/*.ts`: ```bash # Instead of globbing and reading all matches claudemem --agent map "what you're looking for" # Gets structural overview with PageRank ranking ``` ### File Paths Mentioned in Task Even when specific paths are mentioned, semantic search often finds additional relevant code: ```bash claudemem search "concept related to mentioned files" ``` --- ## Interception Protocol ### Step 1: Pause Before Execution When you're about to execute bulk file operations, STOP and run: ```bash claudemem status ``` ### Step 2: Evaluate **If claudemem is indexed:** | Your Plan | Better Alternative | |-----------|-------------------| | Read 5 auth files | `claudemem search "authentication login session"` | | Glob all services | `claudemem search "service layer business logic"` | | Read mentioned paths | `claudemem search "[concept from those paths]"` | **If claudemem is NOT indexed:** ```bash claudemem index -y ``` Then proceed with semantic search. ### Step 3: Execute Better Alternative ```bash # Instead of reading N files, run ONE semantic query claudemem search "concept describing what you need" -n 15 # ONLY THEN read specific lines from results ``` --- ## Interception Decision Matrix | Situation