cloudflare-vectorize

cloudflare-vectorize is a skill for Claude Code, Codex from secondsky/claude-skills. It costs 37 tokens per session (3,201 once invoked), scanned A, original, MIT.

A guide for Cloudflare Vectorize, a vector database that finds similar pieces of information by meaning rather than exact words. It covers RAG, a method where an AI retrieves relevant documents before generating an answer.

In plain words
What is it for?
Use it to manage vector indexes, store and search embeddings, filter results, process documents, and connect searches to Cloudflare Workers AI or OpenAI embeddings.
Why use it?
It helps avoid common setup and query mistakes when building semantic search or document-aware AI features. It also explains how embeddings, metadata filters, and indexes fit together.

Skill for Claude CodeCodex

Part of the cloudflare-vectorize plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/secondsky/claude-skills/cloudflare-vectorize
Any agent
npx skills add secondsky/claude-skills --skill cloudflare-vectorize
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code, Codex.

Or install cloudflare-vectorize, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-vectorize

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-vectorize.svg)](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-vectorize)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-vectorize"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-vectorize.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,201 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.03201
Opus 5 $0.00018 $0.01600
Sonnet 5 $0.00007 $0.00640
Haiku 4.5 $0.00004 $0.00320

Measured yesterday against content hash 3242fef7cb64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-vectorize scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (templates/basic-search.ts, templates/document-ingestion.ts, templates/metadata-filtering.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request, env: Env): Promise<Response> {
plugins/cloudflare-vectorize/skills/cloudflare-vectorize/SKILL.md · 414 lines

How it starts

The opening of the file, as written. The whole thing — 414 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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: [email protected], @cloudflare/[email protected] 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

# 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=number

Read the full file on GitHub · 414 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 414 lines · 37 tokens per session scan A 3242fef7cb64

Subscribe to this mod's changes

cloudflare-vectorize is a skill published in the GitHub repository secondsky/claude-skills (214 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 3,201 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens

remember

Record why something is the way it is — a decision and its reasoning, a lesson that cost time, or a standing constraint. Use when the reasoning behind a choice would be expensive to reconstruct later.

ArcticFox2029/chamnan · 40 tokens

bootstrap

Set up chamnan in this repository for the first time — build the architecture index, measure how well the code describes itself, fill in missing file comments, and record a baseline. Run once per repo.

ArcticFox2029/chamnan · 41 tokens

milestone

Record a change that reshaped the repository — what moved, why it was worth doing, and which areas it touched. Use after a migration, a rewrite, or a decision that changed how part of the system works.

ArcticFox2029/chamnan · 44 tokens

resume

Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.

ArcticFox2029/chamnan · 36 tokens