/cloudflare-vm:vectorizefrom cloudflare-vm
Cloudflare Vectorize: Globally distributed vector database for AI applications. Store and query vector embeddings for semantic search, recommendations, RAG, and classification.
Ships in cloudflare-vm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Vendored from themusebook/skills (derived from cloudflare/skills, Apache-2.0). This snapshot may be outdated: confirm limits, pricing, API signatures and config options against https://developers.cloudflare.com/ before you cite them. When this file and the docs disagree, trust the docs.
When invoked: read every file in this skill's directory before answering, so you have the full reference: api.md, configuration.md, gotchas.md, patterns.md. Then answer the user's question (or, if none was given, summarise the product: what it is, config, API, patterns and gotchas). Related products are sibling skills, linked as ../<product>/.
Globally distributed vector database for AI applications. Store and query vector embeddings for semantic search, recommendations, RAG, and classification.
Status: Generally Available (GA) | Last Updated: 2026-01-27
// 1. Create index
// npx wrangler vectorize create my-index --dimensions=768 --metric=cosine
// 2. Configure binding (wrangler.jsonc)
// { "vectorize": [{ "binding": "VECTORIZE", "index_name": "my-index" }] }
// 3. Query vectors
const matches = await env.VECTORIZE.query(queryVector, { topK: 5 });
| Task | Files to Read |
|---|---|
| New to Vectorize | README only |
| Implement feature | README + api + patterns |
| Setup/configure | README + configuration |
| Debug issues | gotchas |
| Integrate with AI | README + patterns |
| RAG implementation | README + patterns |
Choose based on your use case:
What are you building?
├─ Text/semantic search → cosine (most common)
├─ Image similarity → euclidean
├─ Recommendation system → dot-product
└─ Pre-normalized vectors → dot-product
| Metric | Best For | Score Interpretation |
|---|---|---|
cosine | Text embeddings, semantic similarity | Higher = closer (1.0 = identical) |
euclidean | Absolute distance, spatial data | Lower = closer (0.0 = identical) |
dot-product | Recommendations, normalized vectors | Higher = closer |
Note: Index configuration is immutable. Cannot change dimensions or metric after creation.
How many tenants?
├─ < 50K tenants → Use namespaces (recommended)
│ ├─ Fastest (filter before vector search)
│ └─ Strict isolation
├─ > 50K tenants → Use metadata filtering
│ ├─ Slower (post-filter after vector search)
│ └─ Requires metadata index
└─ Per-tenant indexes → Only if compliance mandated
└─ 50K index limit per account (paid plan)
// 1. Generate embedding
const result = await env.AI.run("@cf/baai/bge-base-en-v1.5", { text: [query] });
// 2. Query Vectorize
const matches = await env.VECTORIZE.query(result.data[0], {
topK: 5,
returnMetadata: "indexed"
});
// 1. Generate query embedding
const embedding = await env.AI.run("@cf/baai/bge-base-en-v1.5", { text: [query] });
// 2. Search Vectorize
const matches = await env.VECTORIZE.query(embedding.data[0], { topK: 5 });
// 3. Fetch full documents from R2/D1/KV
const docs = await Promise.all(matches.matches.map(m =>
env.R2.get(m.metadata.key).then(obj => obj?.text())
));
// 4. Generate LLM response with context
const answer = await env.AI.run("@cf/meta/llama-3-8b-instruct", {
prompt: `Context: ${docs.join("\n\n")}\n\nQuestion: ${query}\n\nAnswer:`
});
See gotchas.md for details. Most important:
"indexed" returns first 64 bytes onlyWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vmaia00/claude-specs --plugin cloudflare-vm64 skills in this plugin
/agents-sdkCloudflare Agents SDK: Cloudflare Agents SDK enables building AI-powered agents on Durable Objects with state, WebSockets, SQL, scheduling, and AI integration./ai-gatewayCloudflare AI Gateway: Expert guidance for implementing Cloudflare AI Gateway - a universal gateway for AI model providers with analytics, caching, rate limiting, and routing capabilities./ai-searchCloudflare AI Search Reference: Expert guidance for implementing Cloudflare AI Search (formerly AutoRAG), Cloudflare's managed semantic search and RAG service.Other plugins' skills for the same job