mongodb-search-and-ai

mongodb-search-and-ai is a skill for Claude Code from mongodb/agent-skills. It costs 132 tokens per session (1,439 once invoked), scanned A, a copy of mongodb-search-and-ai, Apache-2.0.

A guide for building MongoDB Atlas search, including exact word matching, meaning-based search, and a combination of both.

In plain words
What is it for?
Use it to plan, build, optimize, or troubleshoot features such as autocomplete, fuzzy matching, filters, semantic similarity, and retrieval-augmented generation (RAG), where retrieved documents provide context to an AI model.
Why use it?
It helps you choose suitable indexes and queries for your search needs, after checking your data structure and existing indexes.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mongodb-atlas plugin — 6 skills shipped together

Good fit Use it to plan, build, optimize, or troubleshoot features such as autocomplete, fuzzy matching, filters, semantic similarity, and retrieval-augmented generation (RAG), where retrieved documents provide context to an AI model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mongodb/agent-skills/mongodb-search-and-ai
About the project

MongoDB Agent Skills is an official collection of skills and plugins that help AI coding agents work with MongoDB databases, including Atlas and self-managed deployments. Developers use it for query writing, schema design, query optimization, Atlas Search, and vector search. The catalogue entries are MongoDB’s own agent skills, plugins, and setup instructions.

mongodb/agent-skills · 182 stars · on GitHub

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 mongodb/agent-skills --skill mongodb-search-and-ai
Clone the repo
git clone --depth 1 https://github.com/mongodb/agent-skills

Made for: Claude Code.

Or install mongodb-atlas, the plugin that ships this one along with the rest of its 6 skills.

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 mongodb-search-and-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-search-and-ai/github.svg)](https://agentmods.dev/skills/mongodb/agent-skills/mongodb-search-and-ai)
Your own site
<a href="https://agentmods.dev/skills/mongodb/agent-skills/mongodb-search-and-ai"><img src="https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-search-and-ai/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 mongodb-search-and-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/mongodb/agent-skills/mongodb-search-and-ai"><img src="https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-search-and-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,439 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. Third-party audits
  • Socket pass 20 May 2026
  • Snyk pass 20 May 2026
How audits are shown
Origin 100% copy Near-identical to another mod 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.00132 $0.01439
Opus 5 $0.00066 $0.00720
Sonnet 5 $0.00026 $0.00288
Haiku 4.5 $0.00013 $0.00144

Measured today against content hash d0eb391ce192, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mongodb-search-and-ai 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 today.

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.

Origin

This is a copy

100% identical to mongodb-search-and-ai — 65 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/mongodb-atlas/.agy-plugin/skills/mongodb-search-and-ai/SKILL.md · 134 lines

How it starts

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

MongoDB Search and AI Recommendations Skill

You are helping MongoDB users implement, optimize, and troubleshoot Atlas Search (lexical), Vector Search (semantic), and Hybrid Search (combined) solutions. Your goal is to understand their use case, recommend the appropriate search approach, and help them build effective indexes and queries.

Core Principles

  1. Understand before building - Validate the use case to ensure you recommend the right solution
  2. Always inspect first - Check existing indexes and schema before making recommendations
  3. Explain before executing - Describe what indexes will be created and require explicit approval
  4. Optimize for the use case - Different use cases require different index configurations and query patterns
  5. Handle read-only scenarios - If you do not have access to create, update, or delete operation tools, you are in read-only mode. Provide the complete index configuration JSON so the user can create it themselves, including via the Atlas UI.
  6. Explain in accessible language - Describe technical concepts and map business requirements to technical implementations in terms the user can follow.

Workflow

1. Discovery Phase

Check the environment:

  • Use list-databases and list-collections to understand available data
  • If the user mentions a collection, use collection-schema to inspect field structure
  • Use collection-indexes to see existing indexes
  • Use atlas-inspect-cluster to determine the cluster's MongoDB version

Understand the use case: If the user's request is vague:

  • Ask clarifying questions about their needs
  • Infer likely collection and fields from schema
  • Confirm understanding before proceeding

Common questions to ask:

  • What are users searching for? (products, movies, documents, etc.)
  • What fields contain the searchable content?
  • Are they searching by free text, or by similarity to an existing item (e.g. "given movie A, find similar movies")?
  • Do they need exact matching, fuzzy matching, or semantic similarity?
  • Do they need filters (price ranges, categories, dates)?
  • Do they need autocomplete/typeahead functionality?
  • Do they already generate vector embeddings, or do they want MongoDB to handle that automatically?

Read the full file on GitHub · 134 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed · -9 lines d0eb391ce192
  2. 11d ago First seen · 143 lines · 132 tokens per session scan A 551d1669ab85

Subscribe to this mod's changes

mongodb-search-and-ai is a skill published in the GitHub repository mongodb/agent-skills (182 stars, last pushed yesterday), licensed Apache-2.0. It adds 132 tokens to every session and 1,439 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to mongodb-search-and-ai, differing in 65 lines, and is treated as a copy.

Related

Other skills, from other repositories

create-app

Build a Crowdin app end to end and leave the user with a published app they can click - scaffold it with @crowdin/serverless-apps-cli, write the UI with @crowdin/serverless-apps-sdk, publish it into their Crowdin or Crowdin Enterprise organization, and open it for them. Reach for this whenever someone wants something…

crowdin/skills · 214 tokens

i18n-setup

Takes a project from hardcoded strings to internationalized, connected to Crowdin, and translating continuously. Use when someone wants to add i18n or multi-language support, internationalize an app, extract hardcoded strings, set up Lingui (or another i18n library), or connect Crowdin to a repository - including…

crowdin/skills · 175 tokens

github-action

Sets up and debugs the Crowdin GitHub Action (crowdin/github-action), which syncs a repository with a Crowdin project and opens the translation pull request. Use whenever the user wires Crowdin into GitHub Actions, writes or reviews a .github/workflows/crowdin.yml step, tunes its inputs (uploadsources…

crowdin/skills · 137 tokens

crowdin-cli

Guides correct usage of Crowdin CLI - the crowdin command that syncs localization files between a local project and Crowdin. Use whenever the user runs, scripts, or debugs crowdin commands, creates or edits a crowdin.yml configuration, uploads sources, downloads translations, checks translation status, auto-translates…

crowdin/skills · 114 tokens

glossary-generation

Generates a starting glossary for a Crowdin project from the project's own source strings and uploads it with the Crowdin CLI. Use when someone wants to create a glossary, extract key terms or terminology from an app's strings, mark product and feature names as do-not-translate, or seed a Crowdin project with…

crowdin/skills · 136 tokens

context-extraction

Writes meaningful aicontext values in Crowdin JSONL files for strings that need translator context. Use when extracting context, filling aicontext fields, adding context to ambiguous strings, or working with Crowdin JSONL context files.

crowdin/skills · 48 tokens