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 skills add surrealdb/agent-skills --skill surrealdb-vectorgit clone --depth 1 https://github.com/surrealdb/agent-skillsWrote 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/surrealdb/agent-skills/surrealdb-vector)<a href="https://agentmods.dev/skills/surrealdb/agent-skills/surrealdb-vector"><img src="https://agentmods.dev/badge/skills/surrealdb/agent-skills/surrealdb-vector/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/surrealdb/agent-skills/surrealdb-vector"><img src="https://agentmods.dev/badge/skills/surrealdb/agent-skills/surrealdb-vector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
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.1 | $0.00104 | $0.00632 |
| Opus 5 | $0.00052 | $0.00316 |
| Sonnet 5 | $0.00021 | $0.00126 |
| Haiku 4.5 | $0.00010 | $0.00063 |
Grade A, and why
surrealdb-vector 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 12d 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.
What it actually says
SurrealDB Vector Search
HNSW Index
Create a basic HNSW index:
DEFINE INDEX hnsw_idx ON pts FIELDS point HNSW DIMENSION 4;
With specific distance function and type:
DEFINE INDEX hnsw_idx ON pts FIELDS point HNSW DIMENSION 4 DIST EUCLIDEAN TYPE F64;
Available types: F64, F32, I64, I32, I16.
Full Table Example
DEFINE TABLE OVERWRITE document SCHEMALESS;
DEFINE FIELD OVERWRITE embedding ON document TYPE array<float>;
DEFINE INDEX OVERWRITE hnsw_idx_document ON document
FIELDS embedding
HNSW DIMENSION 384
DIST COSINE
TYPE F32
EFC 150 M 12 M0 24;
HNSW Parameters
| Parameter | Description |
|---|---|
| DIMENSION | Vector dimensionality (must match your embeddings) |
| DIST | Distance function: COSINE, EUCLIDEAN, etc. |
| TYPE | Numeric type: F64, F32, I64, I32, I16 |
| EFC | Construction search effort (higher = better index) |
| M | Max connections per node |
| M0 | Max connections at layer 0 |
Querying Vectors
The <|K, EF|> operator performs KNN search. K is the number of results,
EF is the search effort (higher = more accurate, slower).
Recommended effort values:
40— default, good accuracy17— fast but may miss some results
Basic KNN Query
SELECT
*,
vector::distance::knn() AS dist
FROM document
WHERE embedding <|10, 40|> $vector;
vector::distance::knn() uses the distance function defined by the index.
Scored Results with Threshold
SELECT *, score
FROM (
SELECT *, (1 - vector::distance::knn()) AS score
FROM document
WHERE embedding <|20, 40|> $vector
)
WHERE score >= $threshold
ORDER BY score DESC;
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.
- 12d ago First seen · 84 lines · 104 tokens per session scan A e7ef6d568866
surrealdb-vector is a skill published in the GitHub repository surrealdb/agent-skills (25 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 632 once invoked, about $0.0005 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
qdrant
Vector search engine for production RAG systems.
chroma
Embedding database for RAG and semantic search.
pinecone
Managed vector DB for production RAG and search.
embeddings
Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
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…