vector-search

vector-search is a skill for Claude Code, Codex from eric-cielo/moflo. It costs 48 tokens per session (1,337 once invoked), scanned A, original, MIT.

A semantic search system for finding relevant passages in your own documents. It turns document sections into searchable representations so related text can be retrieved even when the search words are different.

In plain words
What is it for?
Use it to ingest document chunks, search them by meaning, and build retrieval-augmented generation systems, where retrieved documents provide context to an AI response.
Why use it?
It reduces the need to scan documents manually or rely only on exact keyword matches when assembling context for a chat or search feature.

Skill for Claude CodeCodex

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/eric-cielo/moflo/vector-search
Any agent
npx skills add eric-cielo/moflo --skill vector-search
Clone the repo
git clone --depth 1 https://github.com/eric-cielo/moflo

Made for: Claude Code, Codex.

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 vector-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/eric-cielo/moflo/vector-search.svg)](https://agentmods.dev/skills/eric-cielo/moflo/vector-search)
Your own site
<a href="https://agentmods.dev/skills/eric-cielo/moflo/vector-search"><img src="https://agentmods.dev/badge/skills/eric-cielo/moflo/vector-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00048 $0.01337
Opus 5 $0.00024 $0.00668
Sonnet 5 $0.00010 $0.00267
Haiku 4.5 $0.00005 $0.00134

Measured 3d ago against content hash fb0ff5946b2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

vector-search scanned grade A with 0 findings 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/vector-search/SKILL.md · 142 lines

How it starts

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

MoFlo Vector Search (RAG)

Semantic search over your own documents, backed by moflo's HNSW index in .moflo/moflo.db (node:sqlite, Node 22+ built-in). Small enough to ship in a devDependency; fast enough for interactive retrieval at 100k–1M vectors.

When to Use This vs memory-patterns

  • memory-patterns — structured, namespaced memory you own (sessions, learnings, patterns). Keys matter. Entries are conceptual units.
  • This skill (vector-search) — search over documents you've ingested for retrieval. Entries are content chunks. Keys are just stable IDs for dedupe.

Both use the same index; the difference is how you chunk and what you put in the value field.

Ingest

Two paths. Pick the one that matches your source of truth:

A. Ad-hoc ingest from Claude Code

for (const [id, text] of chunks) {
  await mcp.memory_store({
    namespace: 'docs',        // your RAG corpus
    key: id,                  // stable ID for this chunk (file path + offset, etc.)
    value: text,              // the chunk content — what gets embedded
    tags: ['doc', docType],
    upsert: true,
  });
}

B. Repeatable ingest from the filesystem

Use moflo's shipped indexers (cross-platform, skip unchanged chunks via a hash file):

# Guidance docs → namespace 'guidance'
node .claude/scripts/index-guidance.mjs

# Code structure → namespace 'code-map'
node .claude/scripts/generate-code-map.mjs

# Your own corpus — write a small indexer that loops over files and calls
# memory_store. Model it on bin/index-patterns.mjs.

Retrieve

const hits = await mcp.memory_search({
  namespace: 'docs',
  query: userQuestion,
  limit: 8,
  threshold: 0.35,   // drop irrelevant noise; tune per-corpus
});

// hits[] = [{ key, namespace, value, similarity, ... }]

Plug the retrieved value strings into your prompt as context. Filter or rerank higher up if needed.

Chunking Rules That Actually Matter

  1. One idea per chunk. 200–800 tokens. Smaller for code, larger for prose.
  2. Include enough context for the chunk to stand alone. A bare "it does X" chunk won't retrieve well because the embedding has no subject.
  3. Deduplicate by stable ID. Re-ingest is a no-op if key + value hash match. Cheap to re-run.
  4. Keep metadata minimal in value. The embedding is built from the full value — noisy prefixes dilute the vector. Put structured metadata in tags or a separate meta:${id} key.

Read the full file on GitHub · 142 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. 3d ago First seen · 142 lines · 48 tokens per session scan A fb0ff5946b2c

Subscribe to this mod's changes

vector-search is a skill published in the GitHub repository eric-cielo/moflo (18 stars, last pushed 6d ago), licensed MIT. It adds 48 tokens to every session and 1,337 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

documentation-search

Search the internal knowledge base for runbooks, architecture documentation, ADRs, best practices, and troubleshooting guides using RAG. Use when looking for internal documentation, deployment procedures, architecture decisions, or operational runbooks.

caipe-io/ai-platform-engineering · 46 tokens

rag-knowledge

RAG domain knowledge — architecture, component routing, rules, and reference tables. Use when working on any file under rag/.

redhat-community-ai-tools/UnifAI · 29 tokens

enrich

Use when the agent needs access to information beyond its training data — knowledge sources, RAG pipelines, or grounding data.

sharpdeveye/maestro · 27 tokens

always-on-agent-inputs

How to design contextual inputs for an always-on AI agent with episodic memory. Covers what data to feed the agent, how to structure observations and triggers, ambient context capture (screen, audio, calendar), context window budgeting, and retrieval strategies that keep the agent grounded in what's actually…

curiositech/windags-skills · 154 tokens

convex-agents

Building AI agents with the Convex Agent component including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration.

JStaRFilms/deprecated-Takomi_Code · 32 tokens

memory-fabric

Knowledge graph orchestration layer with entity extraction, natural language query parsing, deduplication (>85% similarity), and cross-reference boosting. Unifies search results ranked by recency, relevance, and authority. Use when designing memory retrieval, building entity graphs, or optimizing knowledge graph…

yonatangross/orchestkit · 61 tokens