plugins/code-analysis/skills/search-interceptor/SKILL.md
⛔ INTERCEPT TRIGGER: Automatically invoked BEFORE Read 3+ files OR Glob with broad patterns. Validates whether bulk file operations should be replaced with semantic search. Prevents token waste from sequential file reads.
npx skillsauth add involvex/involvex-claude-marketplace search-interceptorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ ⛔ INTERCEPT TRIGGERS: ║
║ ║
║ • About to Read 3+ files in same directory ║
║ • About to Glob with **/*.ts, **/*.py, or similar broad pattern ║
║ • Planning sequential file reads to "understand" something ║
║ • Rationalizing "let me read while agents work" ║
║ ║
║ WHEN TRIGGERED: Validate if claudemem search is better ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════╝
This skill intercepts bulk file operations before they execute, validating whether semantic search would be more efficient.
YOU ARE ABOUT TO:
Read file1.ts
Read file2.ts
Read file3.ts
Read file4.ts
...
STOP. Ask: Can this be ONE claudemem query?
YOU ARE ABOUT TO:
Glob("src/services/**/*.ts")
Then read all N matches
STOP. Ask: What am I looking for SEMANTICALLY?
YOU ARE THINKING:
"Let me read these files while the agent works..."
STOP. This is tool familiarity bias.
PROMPT MENTIONS:
src/services/prime/internal_api/client.ts
src/services/prime/api.ts
...
YOUR INSTINCT: Read them directly
STOP. Search semantically first for context.
When you're about to execute bulk file operations, STOP and run:
claudemem status
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:
claudemem index -y
Then proceed with semantic search.
# 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
| Situation | Intercept? | Action | |-----------|-----------|--------| | Read 1-2 specific files | No | Proceed with Read | | Read 3+ files in investigation | YES | Convert to claudemem search | | Glob for exact filename | No | Proceed with Glob | | Glob for pattern discovery | YES | Convert to claudemem search | | Grep for exact string | No | Proceed with Grep | | Grep for semantic concept | YES | Convert to claudemem search | | Files mentioned in prompt | YES | Search semantically first |
❌ Original plan:
I see the task mentions auth, let me read:
- src/services/auth/login.ts
- src/services/auth/session.ts
- src/services/auth/jwt.ts
- src/services/auth/middleware.ts
- src/services/auth/utils.ts
✅ After interception:
claudemem status # Check if indexed
claudemem search "authentication login session JWT token validation" -n 15
# Now I have ranked, relevant chunks instead of 5 full files
❌ Original plan:
Audit mentions Prime API files:
- src/services/prime/internal_api/client.ts
- src/services/prime/api.ts
Let me just Read these directly...
✅ After interception:
claudemem search "Prime API integration endpoints HTTP client" -n 20
# This finds ALL Prime-related code, ranked by relevance
# Not just the 2 files mentioned
❌ Original plan:
Glob("src/**/*.controller.ts")
Then read all 15 controllers to understand routing
✅ After interception:
claudemem search "HTTP controller endpoint route handler" -n 20
# Gets the most relevant routing code, not all controllers
BEFORE: "I need to understand X, let me Read files..."
AFTER: "I need to understand X, let me claudemem search for X concepts..."
This skill works with:
| Skill | Relationship |
|-------|-------------|
| code-search-selector | Selector determines WHAT tool; Interceptor validates BEFORE execution |
| claudemem-search | Interceptor redirects to claudemem; this skill shows HOW to search |
| deep-analysis | Interceptor prevents bad patterns; deep-analysis uses good patterns |
| Detective skills | Interceptor prevents duplicate work by trusting detective agents |
┌─────────────────────────────────────────────────────────────────┐
│ INTERCEPTION QUICK CHECK │
├─────────────────────────────────────────────────────────────────┤
│ │
│ BEFORE bulk Read/Glob, ask: │
│ │
│ 1. Is claudemem indexed? → claudemem status │
│ 2. Can this be ONE query? → Usually YES │
│ 3. Am I rationalizing? → "While agents work" = BAD │
│ 4. Files in prompt? → Search first, not Read │
│ │
│ DEFAULT: Use claudemem search. EXCEPTION: Exact string match. │
│ │
└─────────────────────────────────────────────────────────────────┘
Maintained by: MadAppGang Plugin: code-analysis v2.2.0 Purpose: Intercept and redirect bulk file operations to semantic search
development
Technical SEO audit methodology including crawlability, indexability, and Core Web Vitals analysis. Use when auditing pages or sites for technical SEO issues.
content-media
SERP analysis techniques for intent classification, feature identification, and competitive intelligence. Use when analyzing search results for content strategy.
data-ai
Schema.org markup implementation patterns for rich results. Use when adding structured data to content for enhanced SERP appearances.
development
Correlate content attributes with performance metrics across GA4, GSC, and SE Ranking. Identify what drives performance and build optimization hypotheses.