Community生產力與協作github.com

mongodb/mongodb-connection

為任何支援的驅動程式語言最佳化 MongoDB 用戶端連線配置(連線池、逾時、模式)。

mongodb-connection 是什麼?

此技能專注於最佳化 MongoDB 用戶端的連線配置,適用於所有支援的驅動程式語言。其主要用途包括在初始化或配置 MongoDB 用戶端(例如呼叫 `connect()`)時、設定連線池、疑難排解連線錯誤(如 ECONNREFUSED、逾時、連線池耗盡),以及解決與連線相關的效能問題。支援的應用場景包括建構使用 MongoDB 的無伺服器函數、建立 API 端點、最佳化高流量 MongoDB 應用程式、處理長時間執行的任務與並發操作,以及偵錯連線相關的故障。此技能能協助開發者避免常見的連線陷阱,並確保 MongoDB 應用程式在各種環境下都能穩定且高效地運作。

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

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

在你喜歡的 AI 中提問

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

說明文件

mongodb-connection 是做什麼的?

為任何支援的驅動程式語言最佳化 MongoDB 用戶端連線配置(連線池、逾時、模式)。在處理/更新/檢視實例化或配置 MongoDB 用戶端的函數(例如呼叫 connect() 時)、設定連線池、疑難排解連線錯誤(ECONNREFUSED、逾時、連線池耗盡)、解決與連線相關的效能問題時,請使用此技能。這包括建構使用 MongoDB 的無伺服器函數、建立使用 MongoDB 的 API 端點、最佳化高流量 MongoDB 應用程式、建立長時間執行的任務與並發操作,或偵錯連線相關的故障等情境。

Individual skills in this repo

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

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".

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.

相關技能