This skill implements HNSW-indexed vector embeddings for similarity queries with SQLite persistence and support for hierarchical data.

Install

mkdir -p .claude/skills/embeddings && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8764" && unzip -o skill.zip -d .claude/skills/embeddings && rm skill.zip

Installs to .claude/skills/embeddings

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.
291 chars · catalog description✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Initialize vector embeddings with HNSW indexing
  • Perform semantic search and similarity queries
  • Manage persistent storage via sql.js
  • Apply quantization for memory efficiency
  • Normalize embeddings using L1, L2, or z-score

How it works

It uses HNSW indexing for rapid similarity search and supports persistent storage through sql.js, with optional ONNX integration for performance.

Inputs & outputs

You give it
Text or documents for embedding
You get back
Vector representations or semantic search results

When to use embeddings

  • Building semantic search functionality
  • Performing pattern matching across documents
  • Integrating persistent vector memory in AI agents
  • Optimizing search performance for large databases

About this skill

Embeddings Skill

Purpose

Vector embeddings for semantic search and pattern matching with HNSW indexing.

Features

FeatureDescription
sql.jsCross-platform SQLite persistent cache (WASM)
HNSW150x-12,500x faster search
HyperbolicPoincare ball model for hierarchical data
NormalizationL2, L1, min-max, z-score
ChunkingConfigurable overlap and size
75x fasterWith 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

TypeMemory ReductionSpeed
Int83.92xFast
Int47.84xFaster
Binary32xFastest

Best Practices

  1. Use HNSW for large pattern databases
  2. Enable quantization for memory efficiency
  3. Use hyperbolic for hierarchical relationships
  4. Normalize embeddings for consistency

When not to use it

  • Exact text matching
  • Simple lookups
  • Tasks not requiring semantic understanding

Prerequisites

Node.js environment for npx commands

Limitations

  • Requires semantic data to be effective
  • Performance depends on chosen quantization and indexing settings

How it compares

It provides a specialized, high-performance vector search workflow compared to generic database queries.

Compared to similar skills

embeddings side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
embeddings (this skill)06moReviewAdvanced
embedding-strategies82moNo flagsIntermediate
pinecone37moReviewIntermediate
trulens-dataset-curation12moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry