Community生产力与协作github.com

mongodb/mongodb-search-and-ai

指导 MongoDB 用户实现并优化 Atlas 搜索(全文搜索)、向量搜索(语义搜索)和混合搜索方案。适用于需要构建基于文本的查询(自动补全、模糊匹配、分面搜索)、语义相似度(嵌入、RAG 应用)或组合方法的场景。

mongodb-search-and-ai 是什么?

该技能(Skill)旨在帮助 MongoDB 用户高效实现和优化搜索功能。它全面支持三种搜索类型:Atlas Search(全文搜索)适合文本查询,如自动补全、模糊匹配和分面搜索;Vector Search(向量搜索)基于嵌入实现语义相似度匹配,常用于 RAG(检索增强生成)等应用;Hybrid Search 则结合两者优势。此外,该技能也适用于文本包含、子串匹配(如 'contains'、'includes'、'appears in')、大小写不敏感或多字段文本搜索,以及需要跨多个字段使用不同组合进行过滤的场景。它提供了一套完整的工作流程,指导用户选择正确的搜索类型、创建索引、构建查询语句,并通过 MongoDB MCP 服务器进行性能优化,从而提升开发效率和搜索质量。支持的平台包括任何使用 MongoDB 的环境,尤其是与 AI 代理工具(如 Claude Code、Cursor 等)结合使用时最为有效。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mongodb/agent-skills/tree/main/skills/mongodb-search-and-ai

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

mongodb-search-and-ai 是做什么的?

指导 MongoDB 用户实现并优化 Atlas 搜索(全文搜索)、向量搜索(语义搜索)和混合搜索方案。当用户需要构建基于文本的查询(自动补全、模糊匹配、分面搜索)、语义相似度(嵌入、RAG 应用)或组合方法的搜索功能时,可使用此技能。当用户需要进行文本包含、子串匹配('contains'、'includes'、'appears in')、大小写不敏感或多字段文本搜索,或者需要跨多个字段以不同组合进行过滤时,也可使用此技能。该技能提供了一套工作流程,用于选择正确的搜索类型、创建索引、构建查询语句,并通过 MongoDB MCP 服务器优化性能。

Individual skills in this repo

This repo contains 5 individual skills — each has its own dedicated page.

mongodb/mongodb-connection

Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling `connect()`), configuring connection pools, troubleshooting connection errors (ECONNREFUSED, timeouts, pool exhaustion), optimizing performance issues related to connections. This includes scenarios like building serverless functions with MongoDB, creating API endpoints that use MongoDB, optimizing high-traffic MongoDB applications, creating long-running tasks and concurrency, or debugging connection-related failures.

mongodb/mongodb-mcp-setup

Guide users through configuring key MongoDB MCP server options. Use this skill when a user has the MongoDB MCP server installed but hasn't configured the required environment variables, or when they ask about connecting to MongoDB/Atlas and don't have the credentials set up.

mongodb/mongodb-natural-language-querying

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with query syntax, or discusses finding/filtering/grouping MongoDB documents. Also use for translating SQL-like requests to MongoDB syntax. Does NOT handle Atlas Search ($search operator), vector/semantic search ($vectorSearch operator), fuzzy matching, autocomplete indexes, or relevance scoring - use search-and-ai for those. Does NOT analyze or optimize existing queries - use mongodb-query-optimizer for that. Does NOT handle aggregation pipelines that involve write operations. Requires MongoDB MCP server.

mongodb/mongodb-query-optimizer

Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available.

mongodb/mongodb-schema-design

MongoDB schema design patterns and anti-patterns. Use when designing data models, reviewing schemas, migrating from SQL, or troubleshooting performance issues caused by schema problems. Triggers on "design schema", "embed vs reference", "MongoDB data model", "schema review", "unbounded arrays", "one-to-many", "tree structure", "16MB limit", "schema validation", "JSON Schema", "time series", "schema migration", "polymorphic", "TTL", "data lifecycle", "archive", "index explosion", "unnecessary indexes", "approximation pattern", "document versioning".

相关技能