---
name: "sqlite-vec-embeddings-extension"
description: "Run vector similarity search in embedded SQLite databases using fast SIMD C implementations."
metadata:
  author: "Alex Garcia"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "use sqlite-vec extension"
  - "vector search in sqlite"
  - "create vec0 virtual table"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# sqlite-vec Fast Local Vector Search Extension

Embeds vector search directly in SQLite applications via sqlite-vec: creating virtual tables, indexing float and binary embeddings, computing cosine/L2/dot-product distances, and running fast local KNN queries.

## When to Invoke
Invoke this skill whenever you need to:
- use sqlite-vec extension
- vector search in sqlite
- create vec0 virtual table

## Execution SOP & Rules
1. Load compiled shared library: db.enable_load_extension(True); db.load_extension('vec0').
2. Create virtual table: CREATE VIRTUAL TABLE vec_items USING vec0(id INTEGER PRIMARY KEY, embedding float[768]).
3. Insert vector data using raw float32 byte buffers: INSERT INTO vec_items(id, embedding) VALUES (?, ?).
4. Query nearest neighbors: SELECT id, distance FROM vec_items WHERE embedding MATCH ? ORDER BY distance LIMIT 10.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
