Community生产力与协作github.com

mongodb/mongodb-connection

优化任何受支持驱动语言中的 MongoDB 客户端连接配置(连接池、超时、模式)。在处理实例化或配置 MongoDB 客户端的函数(如调用 `connect()`)、配置连接池、排查连接错误(ECONNREFUSED、超时、连接池耗尽)以及与连接相关的性能问题时使用此技能。

mongodb-connection 是什么?

此技能专注于优化 MongoDB 客户端连接配置,支持所有受支持的驱动语言,包括 Node.js、Python、Java 等。它覆盖了从连接池大小、超时设置到连接错误排查的全方位场景,如 `ECONNREFUSED`、超时或连接池耗尽。该技能特别适用于构建无服务器函数、创建 API 端点、优化高流量应用以及管理长时间运行任务或并发场景。它基于 SKILL.md 文档提供最佳实践和配置建议,帮助开发者避免常见陷阱,提升应用稳定性与性能。

兼容平台~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.

相关技能