vector-db

vector-db is a skill for Claude Code, Codex from RightNow-AI/openfang. It costs 19 tokens per session (792 once invoked), scanned A, original, Apache-2.0.

A vector database guide for storing numeric representations of content and finding items by meaning or similarity. It covers embeddings, indexes, chunking, hybrid search, and retrieval-augmented generation (RAG), which lets an AI answer using retrieved documents.

In plain words
What is it for?
Use it to choose embedding models and distance measures, split documents for retrieval, select vector indexes, and design semantic search or RAG systems.
Why use it?
It helps improve search and AI retrieval by balancing relevance, speed, memory use, and the amount of context returned.

Skill for Claude CodeCodex

About the project

OpenFang is an open-source operating system for autonomous AI agents, built in Rust to run agents that perform scheduled work such as research, monitoring, lead generation, and reporting. It is for people who want agents to operate continuously rather than only respond to prompts. The catalogue add-ons extend workflows around the OpenFang agent system.

RightNow-AI/openfang · 18,162 stars · on GitHub

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/rightnow-ai/openfang/vector-db
Any agent
npx skills add RightNow-AI/openfang --skill vector-db
Clone the repo
git clone --depth 1 https://github.com/RightNow-AI/openfang

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-db

README.md
[![agentmods](https://agentmods.dev/badge/skills/rightnow-ai/openfang/vector-db.svg)](https://agentmods.dev/skills/rightnow-ai/openfang/vector-db)
Your own site
<a href="https://agentmods.dev/skills/rightnow-ai/openfang/vector-db"><img src="https://agentmods.dev/badge/skills/rightnow-ai/openfang/vector-db.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 792 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.00019 $0.00792
Opus 5 $0.00010 $0.00396
Sonnet 5 $0.00004 $0.00158
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

vector-db 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 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.

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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

crates/openfang-skills/bundled/vector-db/SKILL.md · 39 lines

How it starts

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

Vector Database Expert

A retrieval systems specialist with deep expertise in embedding models, vector indexing algorithms, and Retrieval-Augmented Generation (RAG) architectures. This skill provides guidance for designing and operating vector search systems that power semantic search, recommendation engines, and LLM knowledge augmentation, covering embedding selection, indexing strategies, chunking, hybrid search, and production deployment.

Key Principles

  • Choose the embedding model based on your domain and retrieval task; general-purpose models work well for broad use cases, but domain-specific fine-tuned embeddings significantly improve recall for specialized content
  • Select the distance metric that matches your embedding model's training objective: cosine similarity for normalized embeddings, dot product for magnitude-aware comparisons, and L2 (Euclidean) for spatial distance
  • Chunk documents thoughtfully; chunk size directly impacts retrieval quality because too-large chunks dilute relevance while too-small chunks lose context
  • Index choice determines the trade-off between search speed, memory usage, and recall accuracy; understand HNSW, IVF, and flat index characteristics before choosing
  • Combine dense vector search with sparse keyword search (hybrid retrieval) for production systems; neither approach alone handles all query types optimally

Techniques

  • Generate embeddings with models like OpenAI text-embedding-3-small, Cohere embed-v3, or open-source sentence-transformers (all-MiniLM-L6-v2, BGE, E5) depending on cost and quality requirements
  • Configure HNSW indexes with appropriate M (connections per node, typically 16-64) and efConstruction (build quality, typically 100-200) parameters; higher values improve recall at the cost of memory and build time
  • Implement chunking strategies: fixed-size with overlap (e.g., 512 tokens with 50-token overlap), semantic chunking at paragraph or section boundaries, or recursive splitting that respects document structure
  • Build hybrid search by executing both vector similarity and BM25/keyword queries, then combining results with Reciprocal Rank Fusion (RRF) or a learned reranker like Cohere Rerank or cross-encoder models
  • Filter results using metadata (date ranges, categories, access permissions) at query time; most vector databases support pre-filtering or post-filtering with different performance characteristics
  • Design the RAG pipeline: query embedding, retrieval (top-k candidates), optional reranking, context assembly with source citations, and LLM generation with the retrieved context in the prompt

Read the full file on GitHub · 39 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 · 39 lines · 19 tokens per session scan A c5ec0d448baa

Subscribe to this mod's changes

vector-db is a skill published in the GitHub repository RightNow-AI/openfang (18,162 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 792 once invoked, about $0.0001 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-09-03.