Search Interceptor logo

Search Interceptor

Organization
MadAppGang
search-interceptor

πŸ’‘ 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.

Overview

PublisherMadAppGang
Repositoryclaude-code
Skill namesearch-interceptor
Stars
281
Forks
26
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions β€” no extra files to sync.

  • Open source

    Published by MadAppGang on GitHub. Read the source before you install it.

Installation

Install the Search Interceptor AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder β€” it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins β†’ Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins β†’ Skills β†’ Add skill β†’ From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill β€” copy the folder into that agent's skills directory.

Claude Code β€” .claude/skills
git clone --depth 1 https://github.com/MadAppGang/claude-code.git /tmp/claude-code
mkdir -p .claude/skills
cp -r /tmp/claude-code/plugins/code-analysis/skills/search-interceptor .claude/skills/search-interceptor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Search Interceptor in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself β€” you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Search Interceptor on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Search Interceptor is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself β€” all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it β€” the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing β€” a skill is instructions your model will follow.

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

ScenarioToken CostAlternative
Read 5+ files~5000 tokensclaudemem search (~500 tokens)
Glob all *.ts files~3000+ tokensclaudemem --agent map
Sequential reads to understandVariableOne 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 PlanBetter Alternative
Read 5 auth filesclaudemem search "authentication login session"
Glob all servicesclaudemem search "service layer business logic"
Read mentioned pathsclaudemem 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

SituationIntercept?Action
Read 1-2 specific filesNoProceed with Read
Read 3+ files in investigationYESConvert to claudemem search
Glob for exact filenameNoProceed with Glob
Glob for pattern discoveryYESConvert to claudemem search
Grep for exact stringNoProceed with Grep
Grep for semantic conceptYESConvert to claudemem search
Files mentioned in promptYESSearch semantically first

Examples of Interception

Example 1: Auth Investigation

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

bash
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

Example 2: API Integration Audit

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

bash
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

Example 3: Pattern Discovery

❌ Original plan:

Glob("src/**/*.controller.ts")
Then read all 15 controllers to understand routing

βœ… After interception:

bash
claudemem search "HTTP controller endpoint route handler" -n 20
# Gets the most relevant routing code, not all controllers

Why Semantic Search Often Works Better

Native ToolsSemantic Search
No rankingRanked by relevance + PageRank
No relationshipsShows code connections
~5000 tokens for 5 files~500 tokens for ranked results
Only explicitly requested codeDiscovers related code

Tip: For investigation tasks, try claudemem search first to get a ranked view of relevant code.


Integration with Other Skills

This skill works with:

SkillRelationship
code-search-selectorSelector determines WHAT tool; Interceptor validates BEFORE execution
claudemem-searchInterceptor redirects to claudemem; this skill shows HOW to search
deep-analysisInterceptor prevents bad patterns; deep-analysis uses good patterns
Detective skillsInterceptor prevents duplicate work by trusting detective agents

Hook System Integration

The hook system may provide claudemem results proactively when the index is available:

  • Grep queries β†’ May receive claudemem search results instead
  • Bulk reads β†’ May receive suggestion to use semantic search
  • Broad globs β†’ May receive map results

Using the Bypass Flag

When you specifically need native tool behavior:

json
{ "pattern": "exact string", "_bypass_claudemem": true }

This tells hooks you intentionally want native tool output.


Quick Reference

Before bulk Read/Glob operations, consider:

  1. Is claudemem indexed? β†’ claudemem status
  2. Can this be one semantic query? β†’ Often yes
  3. Do you need exact matches? β†’ Use native tools with bypass flag

General guideline: For understanding/investigation, try semantic search first. For exact matches, use native tools.


Maintained by: MadAppGang Plugin: code-analysis v2.16.0 Purpose: Help optimize bulk file operations with semantic search alternatives

Frequently asked questions

What does the Search Interceptor AI skill do?

πŸ’‘ 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.

Why use Search Interceptor on TypingMind?

Because you install it once and use it with any model. Search Interceptor is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model β€” and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Search Interceptor in TypingMind?

Open Plugins β†’ Skills β†’ Install from GitHub in TypingMind and paste https://github.com/MadAppGang/claude-code/tree/main/plugins/code-analysis/skills/search-interceptor. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Search Interceptor?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Search Interceptor?

As many as you like. As long as a model supports skills, you can use Search Interceptor with it β€” GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more β€” all on TypingMind with your own API keys.

Is the Search Interceptor AI skill free?

Yes. It is published on GitHub by MadAppGang under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call β€” code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter πŸ‘‡