Logo di Code Search Selector

Code Search Selector

Organizzazione
MadAppGang
code-search-selector

💡 Selettore di strumenti per le attività di ricerca nel codice. Aiuta a scegliere tra la ricerca semantica (claudemem) e gli strumenti nativi (Grep/Glob) in base al tipo di query. La ricerca semantica è consigliata per richieste come: «come funziona X», «trova tutto», «verifica», «indaga», «architettura».

Add to TypingMind

Panoramica

Pubblicato daMadAppGang
Repositoryclaude-code
Nome della skillcode-search-selector
Stelle
281
Fork
26
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da MadAppGang su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Code Search Selector in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/MadAppGang/claude-code/tree/main/plugins/code-analysis/skills/code-search-selector
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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/code-search-selector .claude/skills/code-search-selector
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Code Search Selector in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Code Search Selector non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Code Search Selector non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Code Search Tool Selector

This skill helps choose the most effective search tool for your task.

When Semantic Search Works Better

Claudemem provides better results for conceptual queries:

Query TypeExampleRecommended Tool
"How does X work?""How does authentication work?"claudemem search
Find implementations"Find all API endpoints"claudemem search
Architecture questions"Map the service layer"claudemem --agent map
Trace data flow"How does user data flow?"claudemem search
Audit integrations"Audit Prime API usage"claudemem search

When Native Tools Work Better

Query TypeExampleRecommended Tool
Exact string match"Find 'DEPRECATED_FLAG'"Grep
Count occurrences"How many TODO comments?"Grep -c
Specific symbol"Find class UserService"Grep
File patterns"Find all *.config.ts"Glob

Why Semantic Search is Often More Efficient

Token Efficiency: Reading 5 files costs ~5000 tokens; claudemem search costs ~500 tokens with ranked results.

Context Discovery: Claudemem finds related code you didn't know to ask for.

Ranking: Results sorted by relevance and PageRank, so important code comes first.

Example: Semantic Query

User asks: "How does authentication work?"

Less effective approach:

bash
grep -r "auth" src/
# Result: 500 lines of noise, hard to understand

More effective approach:

bash
claudemem status  # Check if indexed
claudemem search "authentication login flow JWT"
# Result: Top 10 semantically relevant code chunks, ranked

Quick Decision Guide

Classify the Task

User RequestCategoryRecommended Tool
"Find all X", "How does X work"Semanticclaudemem search
"Audit X integration", "Map data flow"Semanticclaudemem search
"Understand architecture", "Trace X"Semanticclaudemem map
"Find exact string 'foo'"Exact MatchGrep
"Count occurrences of X"Exact MatchGrep
"Find symbol UserService"Exact MatchGrep

Step 2: Check claudemem Status (MANDATORY for Semantic)

bash
# ALWAYS run this before semantic search
claudemem status

Interpret the output:

StatusWhat It MeansNext Action
Shows chunk count (e.g., "938 chunks")✅ IndexedUSE CLAUDEMEM (Step 3)
"No index found"❌ Not indexedOffer to index (Step 2b)
"command not found"❌ Not installedFall back to Detective agent

Step 2b: If Not Indexed, Offer to Index

typescript
AskUserQuestion({
  questions: [{
    question: "Claudemem is not indexed. Index now for better semantic search results?",
    header: "Index?",
    multiSelect: false,
    options: [
      { label: "Yes, index now (Recommended)", description: "Takes 1-2 minutes, enables semantic search" },
      { label: "No, use grep instead", description: "Faster but less accurate for semantic queries" }
    ]
  }]
})

If user says yes:

bash
claudemem index -y

Step 3: Execute the Search

IF CLAUDEMEM IS INDEXED (from Step 2):

bash
# Get role-specific guidance first
claudemem ai developer  # or architect, tester, debugger

# Then search semantically
claudemem search "authentication login JWT token validation" -n 15

IF CLAUDEMEM IS NOT AVAILABLE:

Use the detective agent:

typescript
Task({
  subagent_type: "code-analysis:detective",
  description: "Investigate [topic]",
  prompt: "Use semantic search to find..."
})

Tool Recommendations by Use Case

Use CaseLess EfficientMore Efficient
Semantic queriesgrep -r "pattern" src/claudemem search "concept"
Find implementationsGlob → Read allclaudemem search "feature"
Understand flowfind . -name "*.ts" | xargs...claudemem --agent map

Native tools (Grep, Glob, find) work well for exact matches but provide no semantic ranking.


When Hooks Redirect to Claudemem

If a hook provides claudemem results instead of native tool output:

  1. Use the provided results - They're ranked by relevance
  2. For more data - Run additional claudemem queries
  3. Bypass available - Use _bypass_claudemem: true for native tools when needed

The hook system provides claudemem results proactively when the index is available.


Task-to-Tool Mapping Reference

User RequestNative ApproachSemantic Approach (Recommended)
"Audit all API endpoints"grep -r "router|endpoint"claudemem search "API endpoint route handler"
"How does auth work?"grep -r "auth|login"claudemem search "authentication login flow"
"Find all database queries"grep -r "prisma|query"claudemem search "database query SQL prisma"
"Map the data flow"grep -r "transform|map"claudemem search "data transformation pipeline"
"What's the architecture?"ls -la src/claudemem --agent map "architecture"
"Find error handling"grep -r "catch|error"claudemem search "error handling exception"
"Trace user creation"grep -r "createUser"claudemem search "user creation registration"

When Grep IS Appropriate

✅ Use Grep for:

  • Finding exact string: grep -r "DEPRECATED_FLAG" src/
  • Counting occurrences: grep -c "import React" src/**/*.tsx
  • Finding specific symbol: grep -r "class UserService" src/
  • Regex patterns: grep -r "TODO:\|FIXME:" src/

❌ Never use Grep for:

  • Understanding how something works
  • Finding implementations by concept
  • Architecture analysis
  • Tracing data flow
  • Auditing integrations

Integration with Detective Skills

After using this skill's decision tree, invoke the appropriate detective:

Investigation TypeDetective Skill
Architecture patternscode-analysis:architect-detective
Implementation detailscode-analysis:developer-detective
Test coveragecode-analysis:tester-detective
Bug root causecode-analysis:debugger-detective
Comprehensive auditcode-analysis:ultrathink-detective

Quick Reference Card

┌─────────────────────────────────────────────────────────────────┐
│                    CODE SEARCH QUICK REFERENCE                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. ALWAYS check first:  claudemem status                       │
│                                                                  │
│  2. If indexed:          claudemem search "semantic query"       │
│                                                                  │
│  3. For exact matches:   Grep tool (only this case!)            │
│                                                                  │
│  4. For deep analysis:   Task(code-analysis:detective)          │
│                                                                  │
│  ⚠️ GREP IS FOR EXACT MATCHES, NOT SEMANTIC UNDERSTANDING       │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Pre-Investigation Checklist

Before ANY code investigation task, verify:

  • Ran claudemem status to check index
  • Classified task as SEMANTIC or EXACT MATCH
  • Selected appropriate tool based on classification
  • NOT using grep for semantic queries when claudemem is indexed

Multi-File Read Optimization

When reading multiple files, consider if a semantic search would be more efficient:

ScenarioOptimization
Read 3+ files in same directoryTry claudemem search first
Glob with broad patternsTry claudemem --agent map
Sequential reads to "understand"One semantic query may suffice

Quick check before bulk reads:

  1. Is claudemem indexed? (claudemem status)
  2. Can this be one semantic query instead of N file reads?

Interception Examples

❌ About to do:

Read src/services/auth/login.ts
Read src/services/auth/session.ts
Read src/services/auth/jwt.ts
Read src/services/auth/middleware.ts
Read src/services/auth/types.ts
Read src/services/auth/utils.ts

✅ Do instead:

bash
claudemem search "authentication login session JWT middleware" -n 15

❌ About to do:

Glob pattern: src/services/prime/**/*.ts
Then read all 12 matches sequentially

✅ Do instead:

bash
claudemem search "Prime API integration service endpoints" -n 20

❌ Parallelization trap:

"Let me Read these 5 files while the detective agent works..."

✅ Do instead:

Trust the detective agent to use claudemem.
Don't duplicate work with inferior Read/Glob.

Efficiency Comparison

ApproachToken CostResult Quality
Read 5+ files sequentially~5000 tokensNo ranking
Glob → Read all matches~3000+ tokensNo semantic understanding
claudemem search once~500 tokensRanked by relevance

Tip: Claudemem results include context around matches, so you often don't need to read full files.


Recommended Workflow

  1. Check index: claudemem status
  2. Search semantically: claudemem search "concept query" -n 15
  3. Read specific code: Use results to target file:line reads

This workflow finds relevant code faster than reading files sequentially.


Maintained by: MadAppGang Plugin: code-analysis v2.16.0 Purpose: Help choose the most efficient search tool for each task

Domande frequenti

Cosa fa la skill IA Code Search Selector?

💡 Selettore di strumenti per le attività di ricerca nel codice. Aiuta a scegliere tra la ricerca semantica (claudemem) e gli strumenti nativi (Grep/Glob) in base al tipo di query. La ricerca semantica è consigliata per richieste come: «come funziona X», «trova tutto», «verifica», «indaga», «architettura».

Perché usare Code Search Selector su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Code Search Selector è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Code Search Selector in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/MadAppGang/claude-code/tree/main/plugins/code-analysis/skills/code-search-selector. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Code Search Selector?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Code Search Selector?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Code Search Selector: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Code Search Selector è gratuita?

Sì. È pubblicata su GitHub da MadAppGang con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇