local-embedding

local-embedding is a skill for Claude Code, Codex from matrixorigin/memoria. It costs 34 tokens per session (508 once invoked), scanned B, original, Apache-2.0.

A guide for running text-embedding models on your own computer with ONNX Runtime, a tool that runs machine-learning models locally.

In plain words
What is it for?
Use it when configuring offline, local embedding; it covers building the binary, choosing a model, and setting the model before first startup.
Why use it?
It lets Memoria create searchable text representations without sending text to an outside API or requiring an API key, but requires building the software and downloading a model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when configuring offline, local embedding; it covers building the binary, choosing a model, and setting the model before first startup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/matrixorigin/memoria/local-embedding
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.

Any agent
npx skills add matrixorigin/memoria --skill local-embedding
Clone the repo
git clone --depth 1 https://github.com/matrixorigin/memoria

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 local-embedding

README.md
[![agentmods](https://agentmods.dev/badge/skills/matrixorigin/memoria/local-embedding/github.svg)](https://agentmods.dev/skills/matrixorigin/memoria/local-embedding)
Your own site
<a href="https://agentmods.dev/skills/matrixorigin/memoria/local-embedding"><img src="https://agentmods.dev/badge/skills/matrixorigin/memoria/local-embedding/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.

agentmods 80×15 button for local-embedding

Your own site · 80×15
<a href="https://agentmods.dev/skills/matrixorigin/memoria/local-embedding"><img src="https://agentmods.dev/badge/skills/matrixorigin/memoria/local-embedding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 508 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 13
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.1 $0.00034 $0.00508
Opus 5.5 $0.00014 $0.00203
Sonnet 5.5 $0.00007 $0.00102
Haiku 4.5 $0.00003 $0.00051

Measured 1mo ago against content hash f963c2bfa1e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

local-embedding scanned grade B with 1 finding 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo cp memoria/target/release/memoria /usr/local/bin/
skills/local-embedding/SKILL.md · 65 lines

What it actually says

Build from Source

Pre-built binaries do NOT include local embedding.

cd Memoria
make build-local
sudo cp memoria/target/release/memoria /usr/local/bin/

Binary is ~50-80MB (bundles ONNX Runtime). Expected.

Configure

memoria init --tool kiro    # No --embedding-* flags needed

Leave EMBEDDING_* env vars empty in mcp.json → local embedding is the default.

How It Works

  1. First query → model downloads to ~/.cache/fastembed/ (~30MB default)
  2. Model loads via ONNX Runtime (~3-5s)
  3. Subsequent queries are fast (in-process)

Models

Model Dim Size Notes
all-MiniLM-L6-v2 384 ~30MB Default. Fast, English
BAAI/bge-m3 1024 ~1.2GB Best quality, multilingual

Change model in mcp.json env block:

{ "EMBEDDING_MODEL": "BAAI/bge-m3", "EMBEDDING_DIM": "1024" }

⚠️ Choose BEFORE first startup. Dimension is locked into schema.

When to Use

Local Remote (OpenAI/SiliconFlow)
Privacy ✅ Offline ⚠️ Text sent to API
Cost Free API key
First query ~3-5s Fast
Build From source Pre-built works
Offline ✅ ❌

Recommendation: Use remote unless you need offline/strict privacy.

Troubleshooting

Problem Fix
"compiled without local-embedding" Build from source: make build-local
Model download fails Set HF_ENDPOINT for mirror, or manually download to ~/.cache/fastembed/
High memory Default ~100MB. bge-m3 ~1-2GB. Choose based on available RAM
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. 1mo ago First seen · 65 lines · 34 tokens per session scan B f963c2bfa1e3

Subscribe to this mod's changes

local-embedding is a skill published in the GitHub repository matrixorigin/memoria (614 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 508 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). 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

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

dify

Use when building LLM applications with visual workflow — RAG knowledge bases, AI agents, chatbots with drag-and-drop orchestration. Dify: open-source LLM app platform supporting 30+ models (OpenAI, Claude, DeepSeek, Ollama, Qwen, GLM) with Docker deployment.

znlgis/opengis-skills · 66 tokens

ai-skills

Use when building LLM applications, RAG knowledge bases, AI agents, terminal coding agents, multi-model orchestration, plugin-based agent harnesses, or file translation. Index of 14 skills: Dify, LangChain, LlamaIndex, Ollama, Transformers, Hermes Agent, OpenClaw, OpenCode, Pi, DocuTranslate, DeepSeek Harness and more.

znlgis/opengis-skills · 81 tokens

vector-db-ops

Use when vector database operations — Pinecone, Weaviate, Qdrant, ChromaDB. Indexing, querying, filtering, and managing vector embeddings for RAG and similarity search. Use when working with vector db ops.

oyi77/1ai-skills · 52 tokens

Vector Databases

Guides retrieval-store design, indexing, and query behavior for embedding-backed systems without confusing storage with application truth.

agentic-in/elephant-agent · 26 tokens

vector-databases

Vector database operations — embed, store, search, and build RAG pipelines.

furkangonel/cowrangler · 21 tokens