About embeddings
An embeddings skill for semantic search and pattern matching, aimed at workflows using claude-flow. It combines HNSW indexing, configurable text chunking, normalization, and quantization with SQLite persistence.
Key features
- 01HNSW-indexed semantic search
- 02SQLite persistent cache
- 03Configurable text chunking
- 04L1, L2, min-max and z-score normalization
- 05Int8, Int4 and binary quantization
Use cases
- 01Search document collections by meaning
- 02Match related patterns in memory
- 03Reduce embedding storage with quantization
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill embeddingsAfter installing, type/embeddingsin Claude Code to confirm it loaded.
Details
From the project READMEEmbeddings Skill
Purpose
Vector embeddings for semantic search and pattern matching with HNSW indexing.
Features
| Feature | Description |
|---|---|
| sql.js | Cross-platform SQLite persistent cache (WASM) |
| HNSW | 150x-12,500x faster search |
| Hyperbolic | Poincare ball model for hierarchical data |
| Normalization | L2, L1, min-max, z-score |
| Chunking | Configurable overlap and size |
| 75x faster | With agentic-flow ONNX integration |
Commands
Initialize Embeddings
npx claude-flow embeddings init --backend sqlite
Embed Text
npx claude-flow embeddings embed --text "authentication patterns"
Batch Embed
npx claude-flow embeddings batch --file documents.json
Semantic Search
npx claude-flow embeddings search --query "security best practices" --top-k 5
Memory Integration
# Store with embeddings
npx claude-flow memory store --key "pattern-1" --value "description" --embed
# Search with embeddings
npx claude-flow memory search --query "related patterns" --semantic
Quantization
| Type | Memory Reduction | Speed |
|---|---|---|
| Int8 | 3.92x | Fast |
| Int4 | 7.84x | Faster |
| Binary | 32x | Fastest |
Best Practices
- Use HNSW for large pattern databases
- Enable quantization for memory efficiency
- Use hyperbolic for hierarchical relationships
- Normalize embeddings for consistency
Comments
Markdown supported