Borrowing it
Nothing to install: this file belongs to jtv4k/mongodb-memory-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jtv4k/mongodb-memory-mcp/main/.claude/skills/embedding-model-migration/SKILL.mdgit clone --depth 1 https://github.com/jtv4k/mongodb-memory-mcpWrote 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/jtv4k/mongodb-memory-mcp/embedding-model-migration)<a href="https://agentmods.dev/skills/jtv4k/mongodb-memory-mcp/embedding-model-migration"><img src="https://agentmods.dev/badge/skills/jtv4k/mongodb-memory-mcp/embedding-model-migration.svg" alt="Measured on agentmods" height="20"></a>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.00091 | $0.02822 |
| Opus 5 | $0.00046 | $0.01411 |
| Sonnet 5 | $0.00018 | $0.00564 |
| Haiku 4.5 | $0.00009 | $0.00282 |
Grade A, and why
embedding-model-migration scanned grade A 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 6d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sS http://localhost:3000/api/embedding-coverage \ How it starts
The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrating the embedding model or provider
Changing the embedding model invalidates every vector in the corpus. Done in the wrong order it strands the knowledge base — search returns nothing, and the reason is invisible. Done in this order it is a background backfill during which search keeps working.
Why nothing gets orphaned
Every chunk records who embedded it, as flat, indexed, filterable fields:
embeddingProvider 'voyage'
embeddingModel 'voyage-context-3'
embeddingDimensions 1024
embeddedAt <Date>
Plus a matching stamp on the parent document (document.embedding) for the
management views. Two of those fields — embeddingModel and
embeddingDimensions — are declared filter paths in
src/db/index-definitions/chunks.vector.json, and that is what the whole
migration story rests on:
- Search is always constrained to the configured model.
buildVectorFilter()insrc/services/knowledge-service.tsunconditionally addsembeddingModel == config.embedding.modelandembeddingDimensions == config.embedding.dimensionsto every$vectorSearch.buildTextFilter()pins the model too (embeddingDimensionsis not inchunks.text.json, which is fine — the vector leg pins both, and two configs sharing a model name but differing in width is pathological). So a half-migrated corpus returns fewer results, never a ranking that silently mixes two incompatible vector spaces. That failure mode — confidently wrong answers — is far worse than temporarily thin recall. - The backfill knows exactly what is left. "Stale" is
embeddingModel != target OR embeddingDimensions != target, served by thechunks_embeddingModel_dimensionsindex. storeContentnotices too. An unchanged content hash whose chunks were embedded by a different model is re-ingested rather than skipped (eventingest.repair), so ordinary traffic helps the migration along.
Before you start
Answer these:
- Does the vector width change?
voyage-context-3→voyage-3.5at the same 1024 dims is the easy case. Any change toEMBEDDING_DIMENSIONSmeans the vector index must be dropped and recreated (see step 3) and there is an unavoidable window where the old vectors are unmatchable. - Is the new model contextual?
CONTEXTUAL_MODELSinsrc/config/env.tsdrivesconfig.embedding.contextual. Moving from contextual to non-contextual is legal — the provider interface is the same either way — but retrieval characteristics change, so re-check quality by hand, not just by test. - Does the width the model supports match? The env schema rejects an
EMBEDDING_DIMENSIONSthe model does not offer (2048 | 1024 | 512 | 256for the known Voyage Matryoshka models). Add the model toKNOWN_MODEL_DIMENSIONSif it is new. - How big is the corpus?
GET /api/embedding-coverage(bearer token required) gives chunk and document counts per model. Multiply by your provider's rate limit to get a realistic wall-clock estimate before you start.
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.
- 6d ago First seen · 272 lines · 91 tokens per session scan A 427078f85439
embedding-model-migration is a skill published in the GitHub repository jtv4k/mongodb-memory-mcp (0 stars, last pushed 2d ago), licensed Apache-2.0. It adds 91 tokens to every session and 2,822 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
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.
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
9router-embeddings
Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.
azure-search-documents-dotnet
Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…
embedding-strategies
Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.