Community生產力與協作github.com

mongodb/mongodb-natural-language-querying

使用自然語言生成唯讀的 MongoDB 查詢(find)或聚合管道,並提供集合結構描述與範例文件。

mongodb-natural-language-querying 是什麼?

此技能允許開發者以自然語言描述需求,自動產生對應的 MongoDB 唯讀查詢 (find) 或聚合管道 (aggregation pipeline)。它會利用集合的結構描述 (schema) 與範例文件作為上下文,提高生成查詢的準確性與相關性。支援的場景包括:撰寫新查詢、過濾/彙總資料、將 SQL 風格的請求轉換為 MongoDB 語法,或單純需要查詢語法建議。技能依賴 MongoDB MCP 伺服器來取得 schema 資訊。請注意,此技能不處理 Atlas Search ($search)、向量搜尋 ($vectorSearch)、模糊比對、自動完成索引或相關性評分,這些應使用 search-and-ai 技能;也不分析或最佳化現有查詢,這應使用 mongodb-query-optimizer 技能;亦不處理涉及寫入操作的聚合管道。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mongodb/agent-skills/tree/main/skills/mongodb-natural-language-querying

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

mongodb-natural-language-querying 是做什麼的?

使用自然語言產生唯讀的 MongoDB 查詢(find)或聚合管道,並提供集合結構描述與範例文件。當使用者要求撰寫、建立或產生 MongoDB 查詢,想要過濾/查詢/彙總 MongoDB 中的資料,詢問「我該如何查詢...」,需要查詢語法協助,或討論尋找/過濾/分組 MongoDB 文件時,請使用此技能。也可用於將類似 SQL 的請求轉換為 MongoDB 語法。不處理 Atlas Search($search 運算子)、向量/語意搜尋($vectorSearch 運算子)、模糊比對、自動完成索引或相關性評分 – 這些請使用 search-and-ai 技能。不分析或最佳化現有查詢 – 這些請使用 mongodb-query-optimizer 技能。不處理涉及寫入操作的聚合管道。需要 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-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".

mongodb/mongodb-search-and-ai

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.

相關技能