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.
$npx -y skills add mongodb/agent-skills --skill mongodb-connectionInstalls into the current project.
Run `npx skills use "https://github.com/mongodb/agent-skills" --skill "mongodb/agent-skills/mongodb-connection"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/mongodb/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/mongodb/agent-skills"` and select the relevant skills, then follow their instructions.