mongodb-memory-mcp: Skill for Claude Code

.claude/skills/indexed-text-matching/SKILL.md

indexed-text-matching is a skill for Claude Code from jtv4k/mongodb-memory-mcp. It costs 110 tokens per session (1,777 once invoked), scanned A, original, Apache-2.0.

A guide for finding text in MongoDB without falling back to slow scans. It explains case-insensitive matching, substring search, text indexes, wildcard fields, sorting, and counting.

In plain words
What is it for?
Use it when adding or reviewing browse search, especially searches that ignore letter case or match part of a string.
Why use it?
Common regular-expression searches can read every record instead of using an index, becoming slow as the database grows.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is jtv4k/mongodb-memory-mcp's own configuration. It tells Claude Code how to work on mongodb-memory-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mongodb-memory-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/jtv4k/mongodb-memory-mcp/main/.claude/skills/indexed-text-matching/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/jtv4k/mongodb-memory-mcp

Made for: Claude Code.

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 indexed-text-matching

README.md
[![agentmods](https://agentmods.dev/badge/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching/github.svg)](https://agentmods.dev/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching)
Your own site
<a href="https://agentmods.dev/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching"><img src="https://agentmods.dev/badge/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching/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 indexed-text-matching

Your own site · 80×15
<a href="https://agentmods.dev/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching"><img src="https://agentmods.dev/badge/skills/jtv4k/mongodb-memory-mcp/indexed-text-matching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00110 $0.01777
Opus 5.5 $0.00044 $0.00711
Sonnet 5.5 $0.00022 $0.00355
Haiku 4.5 $0.00011 $0.00178

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

Security

Grade A, and why

indexed-text-matching scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/indexed-text-matching/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Indexed text matching

Every text-matching decision in this repository is downstream of three facts about MongoDB indexes. Get these wrong and the query works — correctly, even — while silently scanning the collection on every call.

The three disqualifying facts

  1. A case-insensitive $regex can never use an index. Case folding defeats b-tree bounds even when the pattern is anchored: /^abc/i scans. The index stores Abc and abc in different places, and the regex engine cannot ask for both ranges.
  2. An unanchored $regex cannot use index bounds either, case-sensitive or not. /abc/ reads every key (a full index scan at best, a collection scan when the filtered fields are not covered).
  3. A collation index does not rescue a regex. $regex only uses an index whose collation is simple; a strength-2 (case-insensitive) collation helps equality and range queries, never regex.

The consequence: substring or case-insensitive matching belongs to MongoDB Search, or to a value normalised at write time. There is no third road. This repository learned that concretely — browse search originally shipped as an unanchored 'i' regex over title/sourceId/uri and was a collection scan on every keystroke until it moved onto the documents text index.

Choosing the mechanism

You need Use Notes
Exact match, case fixed at write time b-tree equality on a normalised value tags are lowercased on ingest for exactly this reason
Exact match, arbitrary case, in $search equals on a token field with the lowercase normalizer tokenEquals() in knowledge-service.ts; also how the text-leg filters work
Prefix, case-insensitive wildcard abc* on a keywordLowercase string field no leading-wildcard cost
Substring, case-insensitive wildcard *abc* on a keywordLowercase string field the browse-search recipe below
Words / relevance ranking text on a lucene.standard string field the chunks text index; this is search, not matching
Sorting inside $search token (strings), date, number mappings on every field you sort by unmapped fields cannot be sorted; _id cannot serve as a tie-break

Read the full file on GitHub · 132 lines

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. 2mo ago First seen · 132 lines · 110 tokens per session scan A 7e696f8eb959

Subscribe to this mod's changes

indexed-text-matching is a skill published in the GitHub repository jtv4k/mongodb-memory-mcp (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 110 tokens to every session and 1,777 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

indexed-text-matching compared with skills from other repositories

indexed-text-matching next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
indexed-text-matchingjtv4k/mongodb-memory-mcpSkill02mo agoApache-2.0A110Claude Code
dbxt8y2/dbxSkill29kyesterdayApache-2.0A74Claude Code, Codex
azure-mgmt-mongodbatlas-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA64Claude Code
nosqliPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A38Claude Code, Codex
byted-volcengine-mongodbbytedance/agentkit-samplesSkill484yesterdayApache-2.0A82Claude Code, Codex
commerce-app-storageadobe/skillsSkill319yesterdayApache-2.0A78Claude Code
mongodb-connectionfcakyon/claude-codex-settingsSkill1.2kyesterdayApache-2.0A122Claude Code