vector-embed — Claude Code skill: what it does, how to install
Turns a string or a file into a 384-dimension vector with ruvector and keeps it in an HNSW index for semantic search.
npx skills add ruvnet/ruflo --skill vector-embed -a claude-codeWhat vector-embed does
The skill runs npx -y [email protected] embed text on a string, or on whatever the Read tool pulled out of a file, and hands back a 384-dimension vector. The package bundles ONNX all-MiniLM-L6-v2 and HNSW indexing; its own description claims 52,000+ inserts per second and search around 0.045ms. Good for semantic search, similarity scoring, clustering.
No separate script ships with it, just an ordered procedure. Confirm that [email protected] resolves, embed the input, optionally write it to -o vec.json, then report dimension, norm and the output path. An adaptive variant exists: --adaptive --domain code. Vector metadata can go into AgentDB via memory_store under the vector-patterns namespace.
One limit matters before you install. --batch and --glob do not exist in 0.3.3, and embed text takes a single string, --stdin, or --input-file <path>, so a folder of files means a shell loop. When the command complains about ONNX WASM files not bundled, an older 0.2.x got resolved, so pin the version on every call. Failures get diagnosed by npx -y [email protected] doctor.
What it helps with
- embed a paragraph of text and save the vector to JSON
- score two code snippets for semantic similarity
- store embedding metadata in AgentDB under a chosen key
- walk a directory and embed each file in a loop
- track down an
embed textfailure blamed on ONNX WASM files
Example prompts for the agent
- Embed `README.md` and report the dimension and the norm.
- Vectorize the text "HNSW index for code search" and write it to `vec.json`.
- Embed every file in `docs/`, one call per file.
How to install vector-embed
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill vector-embed -a claude-code2Manually: put the files in place
~/.claude/skills/vector-embed/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/vector-embed/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill vector-embed -a codex2Manually: put the files in place
.agents/skills/vector-embed/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill vector-embed -a cursor2Manually: put the files in place
.cursor/skills/vector-embed/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo vector-embed2Manually: put the files in place
.github/skills/vector-embed/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill vector-embed -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-ruvector/skills/vector-embedManually: put the files in place
.devin/skills/vector-embed/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill vector-embed -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about vector-embed
How do I install vector-embed in Claude Code?
Run npx skills add ruvnet/ruflo --skill vector-embed -a claude-code. The skill file lands at ~/.claude/skills/vector-embed/SKILL.md.
What does vector-embed do?
It turns text or file contents into a 384-dimension vector through ruvector, reports dimension and norm, and can save the result to a file or push metadata into AgentDB.
Which ruvector version does it need?
0.3.3, which bundles the ONNX runtime. Older 0.2.x builds fail with an ONNX WASM files not bundled message, so the version is pinned in every command.
Source text
SKILL.md · MIT
--- name: vector-embed description: Generate embeddings via npx [email protected] embed text (ONNX all-MiniLM-L6-v2, 384-dim), normalize, and store in HNSW index argument-hint: "<text-or-file>" allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search --- # Vector Embed Generate and store vector embeddings using the `ruvector` npm package. ## When to use Use this skill to embed text, code, or documents into 384-dimensional vectors for semantic search, similarity comparison, or clustering. ruvector uses ONNX all-MiniLM-L6-v2 with HNSW indexing (52,000+ inserts/sec, ~0.045ms search). ## Steps 1. **Ensure [email protected] is available**: ```bash npm ls ruvector 2>/dev/null | grep '0.3.3' || npm install [email protected] ``` ruvector 0.3.3 bundles the ONNX runtime; no add-on is needed. If `embed text` reports `ONNX WASM files not bundled`, an older ruvector (0.2.x) is being resolved — rerun with the pinned `npx -y [email protected]`. 2. **Embed the input** (use the `text` subcommand, with text as a positional arg): - Single string: `npx -y [email protected] embed text "your text here"` - With output file: `npx -y [email protected] embed text "your text here" -o vec.json` - For a file: read its content via the Read tool, then pass it as the positional argument. - For batch: loop over files in shell — [email protected] has no built-in `--batch`/`--glob` flags. 3. **Adaptive (LoRA) variant**: `npx -y [email protected] embed text "..." --adaptive --domain code` 4. **Confirm** — report vector dimension (384), norm, and any output path written. 5. **Store metadata** in AgentDB if needed: `mcp__plugin_ruflo-core_ruflo__memory_store({ key: "embed-SOURCE", value: "VECTOR_METADATA", namespace: "vector-patterns" })` ## MCP alternative Register the MCP server once with the pinned version: ```bash claude mcp add ruvector -- npx -y [email protected] mcp start ``` Then call MCP tools directly: `hooks_rag_context` (semantic context), `brain_search` (collective brain), `hooks_ast_analyze`, `hooks_route`. ## Caveats - The `embed --batch --glob` flags do **not** exist in [email protected]. `embed text` accepts one text, `--stdin`, or `--input-file <path>` (keeps sensitive text off argv); call it per file. - If embedding fails, run `npx -y [email protected] doctor` to diagnose.
© ruvnet · MIT · ruvnet/ruflo