Agent skill

Local Embedding

by matrixorigin in matrixorigin/memoria

Run embedding on-device with ONNX Runtime. An agent skill from matrixorigin/memoria.

Apache-2.0Auto-check: notesAI & LLM Engineering

Install Local Embedding

skills CLI
$ npx skills add matrixorigin/memoria --skill local-embedding -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install matrixorigin/memoria local-embedding --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/matrixorigin/memoria.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/local-embedding .claude/skills/local-embedding && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-embedding
GitHub stars
607
Token cost
~444 tokens
SKILL.md length
155 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run embedding on-device with ONNX Runtime. An agent skill from matrixorigin/memoria.

  • Works in 3 steps: First query → model downloads to… → Model loads via ONNX Runtime (~3-5s) → Subsequent queries are fast (in-process)
  • Setting up local embedding without an API key
  • SKILL.md covers Build from Source, Configure, How It Works and Models, plus 2 more sections
  • Calls make

What it does

Local Embedding is an agent skill from matrixorigin/memoria. Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key.

Its SKILL.md is about 440 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Embeddings. It works with ONNX. The repository describes itself as: Secure memory management for AI Agents • Ensures data integrity • Reduces hallucinations • Maintains consistent long-term context. The licence is Apache-2.0.

When your agent uses it

  • Setting up local embedding without an API key
  • Tasks that involve Embeddings

Example prompts

  • “/local-embedding”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  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)

What it can do on your machine

Read from SKILL.md and the folder at commit 81c5cc6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local Embedding loads about 444 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 155 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~444

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:13
    sudo cp memoria/target/release/memoria /usr/local/bin/

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from matrixorigin/memoria at commit 81c5cc6, republished under its Apache-2.0 licence (© matrixorigin). 155 words, ~444 tokens.

Download SKILL.mdSave it as .claude/skills/local-embedding/SKILL.md (or your agent's skills folder).
name
local-embedding
description
Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key.

Build from Source

Pre-built binaries do NOT include local embedding.

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

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

Configure

bash
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

ModelDimSizeNotes
all-MiniLM-L6-v2384~30MBDefault. Fast, English
BAAI/bge-m31024~1.2GBBest quality, multilingual

Change model in mcp.json env block:

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

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

When to Use

LocalRemote (OpenAI/SiliconFlow)
Privacy✅ Offline⚠️ Text sent to API
CostFreeAPI key
First query~3-5sFast
BuildFrom sourcePre-built works
Offline✅❌

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

Troubleshooting

ProblemFix
"compiled without local-embedding"Build from source: make build-local
Model download failsSet HF_ENDPOINT for mirror, or manually download to ~/.cache/fastembed/
High memoryDefault ~100MB. bge-m3 ~1-2GB. Choose based on available RAM

© matrixorigin, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/local-embedding of matrixorigin/memoria.

Open the folder on GitHubat commit 81c5cc6

Compare with similar skills

Local Embedding next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local Embedding compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Embedding this skillmatrixorigin/memoria607—~444Automated safety check: NotesApache-2.0
Memory Bridgeruvnet/ruflo74k—~601Automated safety check: NotesMIT
Vector Embedruvnet/ruflo74k—~591Automated safety check: NotesMIT
Tao Finetune ClipNVIDIA/skills3.5k—~4kAutomated safety check: NotesApache-2.0
Backend Export OptimizationVectorSpaceLab/AREX-Skill328—~766Automated safety check: PassApache-2.0
Re AI Modeldslsdzc/rev-skills117—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Memory Bridge

    ruvnet/ruflo

    Bridge Claude Code auto-memory into AgentDB with ONNX embeddings, deduplicate, and enable unified cross-project search

    74k GitHub stars~601 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Vector Embed

    ruvnet/ruflo

    Generate embeddings via npx ruvector@0.2.25 embed text (ONNX all-MiniLM-L6-v2, 384-dim), normalize, and store in HNSW index

    74k GitHub stars~591 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Tao Finetune Clip

    NVIDIA/skills

    Official

    CLIP vision-language model for image-text retrieval, zero-shot classification, embedding extraction, ONNX export, and TensorRT deployment.

    3.5k GitHub stars~4k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Backend Export Optimization

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when selecting Sentence Transformers inference backends or exporting/optimizing models for PyTorch, ONNX, or OpenVINO.

    328 GitHub stars~766 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Re AI Model

    dslsdzc/rev-skills

    AI 模型文件逆向与静态分析:ONNX/PyTorch/Safetensors/TFLite 格式解析、 网络结构还原、权重提取、文件级水印分析(权重 pattern/metadata/tensor hash/embedding 异常)。

    117 GitHub stars~2.4k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed

More from matrixorigin/memoria

All 9 skills in this repo
  • Thememoria

    matrixorigin/memoria

    Use Memoria as OpenClaw's durable memory slot. An agent skill from matrixorigin/memoria.

    607 GitHub stars~728 tokensUpdated today
    Auto-check passed
  • API Reference

    matrixorigin/memoria

    Memoria REST API endpoints, request/response formats, auth, rate limits.

    607 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Architecture

    matrixorigin/memoria

    Memoria codebase structure, workspace layout, key traits, database tables, config patterns, and testing conventions.

    607 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Deployment

    matrixorigin/memoria

    Deploy Memoria with Docker Compose or Kubernetes. An agent skill from matrixorigin/memoria.

    607 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • Plugin Development

    matrixorigin/memoria

    Create, test, sign, and publish Memoria governance plugins. An agent skill from matrixorigin/memoria.

    607 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Release

    matrixorigin/memoria

    Cut a Memoria release. An agent skill from matrixorigin/memoria.

    607 GitHub stars~494 tokensUpdated today
    Auto-check passed

Works with

Questions about Local Embedding

What does Local Embedding do?

Run embedding on-device with ONNX Runtime. An agent skill from matrixorigin/memoria. Local Embedding is an agent skill from matrixorigin/memoria. Run embedding on-device with ONNX Runtime.

When should I use Local Embedding?

Local Embedding fits situations like: setting up local embedding without an API key; tasks that involve Embeddings.

How do I install Local Embedding in Claude Code?

Run `npx skills add matrixorigin/memoria --skill local-embedding -a claude-code`. Or copy the skill folder (skills/local-embedding in matrixorigin/memoria) into .claude/skills/local-embedding in your project. Claude Code loads it when a task matches its description.

How do I install Local Embedding in Codex?

Run `npx skills add matrixorigin/memoria --skill local-embedding -a codex`. Or copy the skill folder (skills/local-embedding in matrixorigin/memoria) into .agents/skills/local-embedding in your project. Codex loads it when a task matches its description.

Can I use Local Embedding in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add matrixorigin/memoria --skill local-embedding -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-embedding, .gemini/skills/local-embedding, .github/skills/local-embedding and .opencode/skills/local-embedding in your project.

What does Local Embedding need to run?

Going by SKILL.md and its folder, Local Embedding needs the command-line tools its instructions call (make).

Does Local Embedding access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Local Embedding safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Local Embedding use?

Local Embedding is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local Embedding use?

About 444 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Local Embedding?

Skills that share tags, products or a category with Local Embedding: Memory Bridge (ruvnet/ruflo, 74k stars), Vector Embed (ruvnet/ruflo, 74k stars), Tao Finetune Clip (NVIDIA/skills, 3.5k stars) and Backend Export Optimization (VectorSpaceLab/AREX-Skill, 328 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Embedding?

matrixorigin (a GitHub organization) maintains it in matrixorigin/memoria, which has 607 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: matrixorigin/memoria on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.