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/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/jtv4k/mongodb-memory-mcp/embedding-model-migration"><img src="https://agentmods.dev/badge/skills/jtv4k/mongodb-memory-mcp/embedding-model-migration.svg" alt="Reviewed on agentmods" width="80" 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.5 | $0.00036 | $0.01129 |
| Sonnet 5.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 2mo 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.
- 2mo 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 2mo ago), licensed Apache-2.0. It adds 91 tokens to every session and 2,822 once invoked, about $0.0004 per session on Opus 5.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.
embedding-model-migration compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| embedding-model-migrationjtv4k/mongodb-memory-mcp | Skill | 0 | 2mo ago | Apache-2.0 | A | 91 | Claude Code |
| embeddingsruvnet/ruflo | Skill | 81k | yesterday | MIT | A | 62 | Claude Code |
| agent-platform-rag-engine-managementgoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 85 | Claude Code, Codex |
| llm-app-patternsdavila7/claude-code-templates | Skill | 33k | yesterday | MIT | A | 54 | Claude Code, Codex |
| 9router-embeddingsdecolua/9router | Skill | 32k | 9d ago | MIT | A | 66 | Claude Code, Codex |
| embedding-strategiesforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 3d ago | Apache-2.0 | A | 37 | Claude Code, Codex |
| similarity-search-patternsforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 3d ago | Apache-2.0 | A | 30 | Claude Code, Codex |