Skip to content
Back to skills

Step 1 Install Dependencies

ASecurity

Sub-skill of semantic-search-setup: Step 1: Install Dependencies (+5).

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
databasespythongobashsqldatabase

Works with

  • cursor

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill step-1-install-dependencies --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Step 1 Install Dependencies?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Step 1 Install Dependencies
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-step-1-install-dependencies/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-step-1-install-dependencies)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: semantic-search-setup-step-1-install-dependencies
description: 'Sub-skill of semantic-search-setup: Step 1: Install Dependencies (+5).'
version: 1.1.0
category: data
type: reference
scripts_exempt: true
---

# Step 1: Install Dependencies (+5)

## Step 1: Install Dependencies


```bash
pip install sentence-transformers numpy
# or
uv pip install sentence-transformers numpy
```

## Step 2: Database Schema


```python
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.*

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.