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.
npx agentmods add skills/null-shot/cloudflare-skills/vectorizenpx skills add null-shot/cloudflare-skills --skill vectorizegit clone --depth 1 https://github.com/null-shot/cloudflare-skillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.03074 |
| Opus 5 | $0.00023 | $0.01537 |
| Sonnet 5 | $0.00009 | $0.00615 |
| Haiku 4.5 | $0.00005 | $0.00307 |
Grade A, and why
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.
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(req: Request, env: Env): Promise<Response> { How it starts
The opening of the file, as written. The whole thing — 484 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Vectorize
Store and query high-dimensional vector embeddings at the edge for RAG (Retrieval Augmented Generation), semantic search, and similarity matching.
FIRST: Create Index
# Create with preset (auto-configures dimensions and metric)
wrangler vectorize create my-index --preset @cf/baai/bge-base-en-v1.5
# Or create with explicit dimensions
wrangler vectorize create my-index --dimensions 768 --metric cosine
# List indexes
wrangler vectorize list
Add to wrangler.jsonc:
{
"vectorize": [
{ "binding": "SEARCH_INDEX", "index_name": "my-index" }
]
}
When to Use
| Use Case | Description |
|---|---|
| RAG Pipelines | Store document embeddings for context retrieval with LLMs |
| Semantic Search | Find similar content by meaning, not keywords |
| Recommendation Systems | Match users/items based on embedding similarity |
| Duplicate Detection | Find near-duplicate content using vector distance |
| Content Classification | Group similar items by vector clustering |
Quick Reference
| Operation | API |
|---|---|
| Insert vectors | await env.INDEX.insert([{ id, values, metadata }]) |
| Query similar vectors | await env.INDEX.query(vector, { topK: 5 }) |
| Upsert (insert or update) | await env.INDEX.upsert([{ id, values, metadata }]) |
| Delete by IDs | await env.INDEX.deleteByIds(["id1", "id2"]) |
| Get by IDs | await env.INDEX.getByIds(["id1", "id2"]) |
Basic RAG Example
interface Env {
SEARCH_INDEX: Vectorize;
AI: Ai;
}
export default {
async fetch(req: Request, env: Env): Promise<Response> {
const url = new URL(req.url);
// Index documents with embeddings
if (url.pathname === "/index" && req.method === "POST") {
const { text, id } = await req.json<{ text: string; id: string }>();
// Generate embedding using Workers AI
const { data } = await env.AI.run("@cf/baai/bge-base-en-v1.5", {
text: [text],
});
const embedding = data[0];
// Insert into Vectorize
await env.SEARCH_INDEX.insert([{
id,
values: embedding,
metadata: { text }
}]);
return Response.json({ success: true, id });
}
// Search similar documents
if (url.pathname === "/search" && req.method === "POST") {
const { query } = await req.json<{ query: string }>();
// Generate query embedding
const { data } = await env.AI.run("@cf/baai/bge-base-en-v1.5", {
text: [query],
});
const queryEmbedding = data[0];
// Find similar vectors
const results = await env.SEARCH_INDEX.query(queryEmbedding, {
topK: 5,
returnMetadata: true
});
return Response.json({
matches: results.matches.map(match => ({
id: match.id,
score: match.score,
text: match.metadata?.text
}))
});
}
return new Response("Not found", { status: 404 });
}
};
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday First seen · 484 lines · 45 tokens per session scan A b6b24fcc1201
vectorize is a skill published in the GitHub repository null-shot/cloudflare-skills (0 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 3,074 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It comes from a forked repository.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
agent-host-chat-contributions
Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.