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/eric-cielo/moflo/vector-searchnpx skills add eric-cielo/moflo --skill vector-searchgit clone --depth 1 https://github.com/eric-cielo/mofloWrote 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.
[](https://agentmods.dev/skills/eric-cielo/moflo/vector-search)<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>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.
| Model | Per session | Once 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 |
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.
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
- One idea per chunk. 200–800 tokens. Smaller for code, larger for prose.
- 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.
- Deduplicate by stable ID. Re-ingest is a no-op if
key+valuehash match. Cheap to re-run. - Keep metadata minimal in
value. The embedding is built from the full value — noisy prefixes dilute the vector. Put structured metadata intagsor a separatemeta:${id}key.
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.
- 3d ago First seen · 142 lines · 48 tokens per session scan A fb0ff5946b2c
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.
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.
rag-knowledge
RAG domain knowledge — architecture, component routing, rules, and reference tables. Use when working on any file under rag/.
enrich
Use when the agent needs access to information beyond its training data — knowledge sources, RAG pipelines, or grounding data.
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…
convex-agents
Building AI agents with the Convex Agent component including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration.
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…