Receber por email
← Voltar para o catálogo

semantic-search

Primary code search — hybrid semantic + keyword + BM25 matching. Automatically intercepted as default search when Beacon index is healthy.

41estrelas
Atualizado há 7 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add sagarmk/beacon-plugin

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/semantic-search-sagarmk/svg)](https://www.skillteca.com.br/skills/semantic-search-sagarmk)

Skills relacionadas

Ver todas de Documentos →

Alerta por categoria

Receba novas skills de Documentos toda segunda

1 email curto, só com as skills novas de Documentos. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Hybrid Code Search (Beacon)

This repo has a Beacon hybrid search index combining semantic embeddings, BM25 keyword matching, and identifier boosting. Beacon is enforced as the default search — grep is automatically intercepted and redirected to Beacon for queries it handles better.

How to search

node ${CLAUDE_PLUGIN_ROOT}/scripts/search.js "<query>"

Options

  • --top-k N — number of results (default: 10)
  • --threshold F — minimum score cutoff (default: 0.35)
  • --no-hybrid — disable hybrid, use pure vector search only

Multi-query batch

node ${CLAUDE_PLUGIN_ROOT}/scripts/search.js "auth flow" "session handling" "token refresh"

Single HTTP round-trip for all queries. Returns grouped results.

Output

JSON array of matches, each with:

  • file — file path
  • lines — line range (e.g. "45-78")
  • similarity — vector cosine similarity
  • score — final hybrid score (when hybrid enabled)
  • preview — first 300 chars of matched chunk

Grep intercept behavior

Grep is denied and redirected to Beacon unless one of these conditions is met:

| Grep passes through when... | Example | |---|---| | Pattern has regex metacharacters | function\s+\w+ | | Targets a specific file | path: "src/lib/db.js" | | output_mode is "count" | Counting occurrences | | Pattern is <= 3 characters | fs, db | | Dotted identifier | fs.readFileSync, path.join | | Path-like pattern (contains / or \) | src/components | | output_mode is "content" | Viewing matching lines | | Quoted string literal | "use strict", 'Content-Type' | | Annotation/marker pattern | TODO, FIXME, @param, #pragma | | URL-like pattern | http://, localhost:3000 | | Beacon index is unhealthy | DB missing, empty, dimension mismatch | | Intercept disabled via config | intercept.enabled: false |

To disable interception entirely, set intercept.enabled: false in .claude/beacon.json.

Workflow

  1. Search with Beacon → get candidate files + line ranges with scores
  2. Read top 2-3 files at the indicated line ranges for full context
  3. If needed, grep within those files for specifics (imports, call sites)
  4. Answer the user with file:line citations
Compartilhar X LinkedIn