semantic-search-setup
Setup vector embeddings and semantic search for document collections. Use for AI-powered similarity search, finding related documents, and preparing knowledge bases for RAG systems.
npx skills add majiayu000/claude-skill-registry --skill semantic-search-setup --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Semantic Search Setup Skill ## Overview This skill sets up vector embedding infrastructure for semantic search. Unlike keyword search (FTS5), semantic search finds conceptually similar content even without exact word matches. ## Quick Start ```python from sentence_transformers import SentenceTransformer import numpy as np model = SentenceTransformer('all-MiniLM-L6-v2') # Generate embeddings texts = ["How to fix a bug", "Debugging software issues"] embeddings = model.encode(texts, normalize_embeddings=True) # Compute similarity similarity = np.dot(embeddings[0], embeddings[1]) print(f"Similarity: {similarity:.3f}") # ~0.85 ``` ## When to Use - Adding AI-powered search to document collections - Finding conceptually related documents - Preparing knowledge bases for RAG Q&A systems - Building recommendation systems - Enabling "more like this" functionality ## How Semantic Search Works ``` Text Chunk Query | | v v +---------+ +---------+ | Embed | | Embed | | Model | | Model | +----+----+ +----+----+ | | v v [0.12, -0.34, ...] [0.15, -0.31, ...] | | +------------+------------+ | v Cosine Similarity | v 0.847 (similar!) ``` ## Model Selection | Model | Dimensions | Speed | Quality | Us
- Overview
- Quick Start
- When to Use
- How Semantic Search Works
- Model Selection
- Implementation
- Step 1: Install Dependencies
- Step 2: Database Schema
- Step 3: Embedding Generator
- Step 4: Batch Processing
- Step 5: Semantic Search
- Step 6: Background Service
- Execution Checklist
- Error Handling
pip install sentence-transformers numpy or uv pip install sentence-transformers numpy embed-service.sh - Background embedding service if [ -f "$PID_FILE" ] && kill -0 $(cat "$PID_FILE") 2>/dev/null; then echo "Already running (PID: $(cat $PID_FILE))" return fi export CUDA_VISIBLE_DEVICES="" nohup python3 embed.py --db "$DB_PATH" --batch "$BATCH_SIZE" \
What does the semantic-search-setup skill do?
Setup vector embeddings and semantic search for document collections. Use for AI-powered similarity search, finding related documents, and preparing knowledge bases for RAG systems.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill semantic-search-setup --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
