Cloudflare Vectorize vector database for semantic search and RAG. Use for vector indexes, embeddings, similarity search, or encountering dimension mismatches, filter errors.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/cloudflare-vectorize/skills/cloudflare-vectorize/SKILL.md -a claude-code --skill cloudflare-vectorizeInstallation paths:
.claude/skills/cloudflare-vectorize/# Cloudflare Vectorize Complete implementation guide for Cloudflare Vectorize - a globally distributed vector database for building semantic search, RAG (Retrieval Augmented Generation), and AI-powered applications with Cloudflare Workers. **Status**: Production Ready ✅ **Last Updated**: 2025-11-21 **Dependencies**: cloudflare-worker-base (for Worker setup), cloudflare-workers-ai (for embeddings) **Latest Versions**: wrangler@4.50.0, @cloudflare/workers-types@4.20251014.0 **Token Savings**: ~65% **Errors Prevented**: 8 **Dev Time Saved**: ~3 hours ## What This Skill Provides ### Core Capabilities - ✅ **Index Management**: Create, configure, and manage vector indexes - ✅ **Vector Operations**: Insert, upsert, query, delete, and list vectors - ✅ **Metadata Filtering**: Advanced filtering with 10 metadata indexes per index - ✅ **Semantic Search**: Find similar vectors using cosine, euclidean, or dot-product metrics - ✅ **RAG Patterns**: Complete retrieval-augmented generation workflows - ✅ **Workers AI Integration**: Native embedding generation with @cf/baai/bge-base-en-v1.5 - ✅ **OpenAI Integration**: Support for text-embedding-3-small/large models - ✅ **Document Processing**: Text chunking and batch ingestion pipelines ### Templates Included 1. **basic-search.ts** - Simple vector search with Workers AI 2. **rag-chat.ts** - Full RAG chatbot with context retrieval 3. **document-ingestion.ts** - Document chunking and embedding pipeline 4. **metadata-filtering.ts** - Advanced filtering examples ## Critical Setup Rules ### ⚠️ MUST DO BEFORE INSERTING VECTORS ```bash # 1. Create the index with FIXED dimensions and metric bunx wrangler vectorize create my-index \ --dimensions=768 \ --metric=cosine # 2. Create metadata indexes IMMEDIATELY (before inserting vectors!) bunx wrangler vectorize create-metadata-index my-index \ --property-name=category \ --type=string bunx wrangler vectorize create-metadata-index my-index \ --property-name=timestamp \ --type=n