semantic-search-setup-step-1-install-dependencies
Sub-skill of semantic-search-setup: Step 1: Install Dependencies (+5).
от vamseeachanta★ 21 звезда на GitHub
Установить semantic-search-setup-step-1-install-dependencies в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Step 1: Install Dependencies (+5)
Step 1: Install Dependencies
pip install sentence-transformers numpy
# or
uv pip install sentence-transformers numpy
Step 2: Database Schema
import sqlite3
def create_embeddings_table(db_path):
conn = sqlite3.connect(db_path, timeout=30)
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS embeddings (
id INTEGER PRIMARY KEY,
*See sub-skills for full details.*
## Step 3: Embedding Generator
```python
from sentence_transformers import SentenceTransformer
import numpy as np
import os
class EmbeddingGenerator:
def __init__(self, model_name='all-MiniLM-L6-v2'):
# Force CPU for stability
os.environ['CUDA_VISIBLE_DEVICES'] = ''
*See sub-skills for full details.*
## Step 4: Batch Processing
```python
def generate_all_embeddings(db_path, batch_size=100):
"""Generate embeddings for all chunks."""
conn = sqlite3.connect(db_path, timeout=30)
cursor = conn.cursor()
generator = EmbeddingGenerator()
# Get chunks without embeddings
cursor.execute('''
*See sub-skills for full details.*
## Step 5: Semantic Search
```python
def semantic_search(db_path, query, top_k=10):
"""Find most similar chunks to query."""
conn = sqlite3.connect(db_path, timeout=30)
cursor = conn.cursor()
generator = EmbeddingGenerator()
query_embedding = generator.embed_text(query)
# Get all embeddings
*See sub-skills for full details.*
## Step 6: Background Service
```bash
#!/bin/bash
# embed-service.sh - Background embedding service
DB_PATH="${1:-./knowledge.db}"
BATCH_SIZE="${2:-100}"
LOG_FILE="/tmp/embed.log"
PID_FILE="/tmp/embed.pid"
start() {
*See sub-skills for full details.*
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл semantic-search-setup-step-1-install-dependencies?
Sub-skill of semantic-search-setup: Step 1: Install Dependencies (+5).
Как установить скилл semantic-search-setup-step-1-install-dependencies?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл semantic-search-setup-step-1-install-dependencies запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…