Official agent skill

Mongodb Search And AI

by mongodb in mongodb/agent-skills

Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions.

OfficialApache-2.0Auto-check passedDatabases

Install Mongodb Search And AI

skills CLI
$ npx skills add mongodb/agent-skills --skill mongodb-search-and-ai -a claude-code

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

GitHub CLI
$ gh skill install mongodb/agent-skills mongodb-search-and-ai --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/mongodb/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mongodb-search-and-ai .claude/skills/mongodb-search-and-ai && 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
mongodb-search-and-ai
GitHub stars
189
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
830 words
Files
6 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions.

  • Works in 3 steps: Discovery Phase → Determine Search Type and Consult the… → Execution and Validation
  • Users need to build search functionality for text-based queries (autocomplete
  • SKILL.md covers Core Principles, Workflow, Anti-Patterns to Avoid and Handling Edge Cases
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mongodb Search And AI is an agent skill from mongodb/agent-skills, published by the product's own GitHub organization. Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG applications), or combined approaches. Also use when users need text containment, substring matching ('contains', 'includes', 'appears in'), case-insensitive or multi-field text search, or filtering across many…

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/automated-embedding.md`, `references/hybrid-search.md` and `references/lexical-search-indexing.md`).

It sits in Databases, covering NoSQL databases, Retrieval-augmented generation and Vector databases. It works with MongoDB and Model Context Protocol. The repository describes itself as: Use the official MongoDB Skills with your favorite coding agent to build faster. The licence is Apache-2.0.

When your agent uses it

  • Users need to build search functionality for text-based queries (autocomplete
  • Faceted search)
  • Semantic similarity (embeddings
  • RAG applications)

Example prompts

  • “contains”
  • “includes”
  • “appears in”
  • “/mongodb-search-and-ai”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Discovery Phase
  2. Determine Search Type and Consult the Reference File
  3. Execution and Validation

What it can do on your machine

Read from SKILL.md and the folder at commit c370a63. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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

Mongodb Search And AI loads about 1.7k tokens when it runs, and up to ~26k if it reads all its reference files. Until then it costs about 182 tokens; SKILL.md has 830 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~182
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~26k

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 passed

The automated check found no risky patterns in SKILL.md.

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 mongodb/agent-skills at commit c370a63, republished under its Apache-2.0 licence (© mongodb). 830 words, ~1,740 tokens.

Download SKILL.mdSave it as .claude/skills/mongodb-search-and-ai/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
mongodb-search-and-ai
description
Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG applications), or combined approaches. Also use when users need text containment, substring matching ('contains', 'includes', 'appears in'), case-insensitive or multi-field text search, or filtering across many fields with variable combinations. Provides workflows for selecting the right search type, creating indexes, constructing queries, and optimizing performance using the MongoDB MCP server.
license
Apache-2.0
metadata.version
1.0.0

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?
2. Determine Search Type and Consult the Reference File

Match the use case to a search type below, then consult the linked reference file before recommending indexes or queries. Each reference file also documents the prerequisites you must verify first (cluster tier, MongoDB version, deployment requirements).

Atlas Search (Lexical/Full-Text): Use when users need:

  • Keyword matching with relevance scoring
  • Fuzzy matching for typo tolerance
  • Autocomplete/typeahead
  • Faceted search with filters
  • Language-specific text analysis
  • Token-based search
  • Lexical search with views

→ Consult both references/lexical-search-indexing.md (index) and references/lexical-search-querying.md (query).

Automated Embedding (Semantic search, no embedding code): Use when users need:

  • Semantic / vector search without writing embedding code
  • No existing vector pipeline or embedding infrastructure
  • Quick setup: MongoDB auto-generates and manages embeddings using Voyage AI models
  • Text data already stored in Atlas that they want to search by meaning
  • RAG or AI agent memory with minimal setup

→ Consult references/automated-embedding.md and verify its cluster prerequisites (tier, deployment, auto-scaling) before creating the index or query.

Vector Search (Semantic, bring your own embeddings): Use when users need:

  • Semantic similarity with their own pre-generated embeddings
  • A specific embedding model not provided by Voyage AI
  • Image, audio, or multimodal embeddings (Automated Embedding is text-only)
  • Self-managed MongoDB without Voyage AI API key configured
  • Vector search with views

→ Consult references/vector-search.md.

Hybrid Search: Use when users need:

  • Combining multiple search approaches (e.g., vector + lexical, multiple text searches)
  • Queries like "find action movies similar to 'epic space battles'" (combining keyword filtering with semantic similarity)
  • Results that factor in multiple relevance criteria
  • Uses $rankFusion (rank-based) or $scoreFusion (score-based) to merge pipelines

→ Consult references/hybrid-search.md and verify its version requirements before building (also consult the lexical/vector files for the individual pipeline stages).

Show full SKILL.md (244 more words)Show less
3. Execution and Validation

Creating indexes:

  1. Explain the index configuration in plain language
  2. Show the JSON structure
  3. Ask what the user wants to name the index
  4. Get explicit approval: "Should I create this index?"
  5. Use MCP's create-index tool after approval
  6. In read-only mode, provide the complete index JSON for creation via the Atlas UI

Running queries:

  1. Show the aggregation pipeline
  2. Execute using MCP's aggregate tool
  3. Present results clearly

Refining existing queries:

  1. Ask the user to share their current query
  2. Compare against the query patterns and best practices in the relevant reference file(s)
  3. Propose specific improvements with before/after examples
  4. Run the revised query with aggregate to validate the results

Anti-Patterns to Avoid

NEVER recommend $regex or $text for search use cases. Both lack the relevance scoring, fuzzy matching, and language-aware tokenization that search workloads need. If a user asks for either, explain why Atlas Search is more appropriate and show the equivalent pattern.

Handling Edge Cases

User mentions fields you can't find:

  • Use collection-schema to inspect available fields
  • Suggest alternatives or ask for clarification

Required field doesn't exist:

  • Explain what needs to be added and how (e.g., embedding field for vector search)

Query fails or index missing:

  • Use collection-indexes to verify index exists
  • If missing, explain index needs to be created first

Multiple collections are relevant:

  • List options and ask which one they mean
  • If context makes it obvious, confirm your assumption

© mongodb, 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

SKILL.md and 5 other files (references) in skills/mongodb-search-and-ai of mongodb/agent-skills.

  • SKILL.md
  • references/automated-embedding.md
  • references/hybrid-search.md
  • references/lexical-search-indexing.md
  • references/lexical-search-querying.md
  • references/vector-search.md

Open the folder on GitHubat commit c370a63

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in mongodb/agent-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Mongodb Search And AI 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.

Mongodb Search And AI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mongodb Search And AI this skillmongodb/agent-skills1891 repos~1.7kAutomated safety check: PassApache-2.0
Mindsdb MCP SkillLeoYeAI/openclaw-master-skills2.2k—~2.5kAutomated safety check: PassMIT
Pgvector Semantic Searchtimescale/pg-aiguide1.9k—~3.8kAutomated safety check: PassApache-2.0
Postgres Hybrid Text Searchtimescale/pg-aiguide1.9k—~3.1kAutomated safety check: PassApache-2.0
Neon Postgresusenotra/notra260—~4.1kAutomated safety check: NotesAGPL-3.0
Neon Postgresneondatabase/agent-skills100—~4.1kAutomated safety check: NotesApache-2.0

Similar skills

  • Mindsdb MCP Skill

    LeoYeAI/openclaw-master-skills

    MindsDB MCP服务器交互技能,用于通过自然语言查询和操作200+企业级数据源。当用户需要查询数据库、分析数据、创建AI模型、连接数据源(MySQL、PostgreSQL、MongoDB、Excel、CSV、Gmail、Slack等)、执行SQL查询、进行数据预测、构建知识库(RAG)、智能问答、文档检索或任何与数据库交互的任务时使用此技能。即使没有明确提到MindsDB,只要涉及数据库操…

    2.2k GitHub stars~2.5k tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Pgvector Semantic Search

    timescale/pg-aiguide

    A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.

    1.9k GitHub stars~3.8k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Postgres Hybrid Text Search

    timescale/pg-aiguide

    A skill your agent uses to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF).

    1.9k GitHub stars~3.1k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Neon Postgres

    usenotra/notra

    Guides and best practices for working with Lakebase Postgres, the database behind Neon.

    260 GitHub stars~4.1k tokensUpdated today
    DatabasesAuto-check: notes
  • Neon Postgres

    neondatabase/agent-skills

    Official

    Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero, instant restore, read replicas, IP…

    100 GitHub stars~4.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Amazon Documentdb

    aws/agent-toolkit-for-aws

    Official

    Manages Amazon DocumentDB end-to-end — serverless-on-8.0 cluster setup, TLS/VPC/driver config, flexible-schema and vector-search data modeling, MongoDB compatibility assessment, DMS-based migration…

    2.8k GitHub stars~5.9k tokensUpdated yesterday
    DatabasesAuto-check passed

More from mongodb/agent-skills

All 9 skills in this repo
  • Mongodb Query Optimizer

    mongodb/agent-skills

    Official

    Help with MongoDB query optimization and indexing. An agent skill from mongodb/agent-skills.

    189 GitHub starsUsed in 2 repos~2.6k tokens
    Auto-check passed
  • Review Skill

    mongodb/agent-skills

    Official

    Review a proposed Agent Skill for structural validity and content quality before publishing.

    189 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check: notes
  • Mongodb MCP Setup

    mongodb/agent-skills

    Official

    Guide users through configuring key MongoDB MCP server options.

    189 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Mongodb Schema Design

    mongodb/agent-skills

    Official

    MongoDB schema design patterns and anti-patterns. An agent skill from mongodb/agent-skills.

    189 GitHub starsUsed in 2 repos~3.4k tokens
    Auto-check passed
  • Official

    Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents.

    189 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Mongodb Connection

    mongodb/agent-skills

    Official

    Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language.

    189 GitHub starsUsed in 1 repo~3.5k tokens
    Auto-check passed

Questions about Mongodb Search And AI

What does Mongodb Search And AI do?

Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Mongodb Search And AI is an agent skill from mongodb/agent-skills, published by the product's own GitHub organization. Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions.

When should I use Mongodb Search And AI?

Mongodb Search And AI fits situations like: users need to build search functionality for text-based queries (autocomplete; faceted search); semantic similarity (embeddings; RAG applications).

How do I install Mongodb Search And AI in Claude Code?

Run `npx skills add mongodb/agent-skills --skill mongodb-search-and-ai -a claude-code`. Or copy the skill folder (skills/mongodb-search-and-ai in mongodb/agent-skills) into .claude/skills/mongodb-search-and-ai in your project. Claude Code loads it when a task matches its description.

How do I install Mongodb Search And AI in Codex?

Run `npx skills add mongodb/agent-skills --skill mongodb-search-and-ai -a codex`. Or copy the skill folder (skills/mongodb-search-and-ai in mongodb/agent-skills) into .agents/skills/mongodb-search-and-ai in your project. Codex loads it when a task matches its description.

Can I use Mongodb Search And AI 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 mongodb/agent-skills --skill mongodb-search-and-ai -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mongodb-search-and-ai, .gemini/skills/mongodb-search-and-ai, .github/skills/mongodb-search-and-ai and .opencode/skills/mongodb-search-and-ai in your project.

What does Mongodb Search And AI need to run?

SKILL.md names no scripts, command-line tools or credentials: Mongodb Search And AI is instructions for the agent only.

Does Mongodb Search And AI 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 Mongodb Search And AI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mongodb Search And AI use?

Mongodb Search And AI is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mongodb Search And AI use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 24k tokens, read only when the agent opens those files.

What are the alternatives to Mongodb Search And AI?

Skills that share tags, products or a category with Mongodb Search And AI: Mindsdb MCP Skill (LeoYeAI/openclaw-master-skills, 2.2k stars), Pgvector Semantic Search (timescale/pg-aiguide, 1.9k stars), Postgres Hybrid Text Search (timescale/pg-aiguide, 1.9k stars) and Neon Postgres (usenotra/notra, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mongodb Search And AI?

mongodb (a GitHub organization, an official publisher) maintains it in mongodb/agent-skills, which has 189 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 10, 2026.

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