# Documentdb Driver

> MongoDB driver and SDK best practices for Azure DocumentDB — singleton `MongoClient`, connection reuse, connection-pool fundamentals. Use when writing code that instantiates a MongoDB client, reviewing driver initialization, or diagnosing connection-related bugs. For full connection-pool tuning (serverless vs OLTP vs OLAP, timeouts, retries), see the `documentdb-connection` skill.

- Skill: `azure/documentdb-driver` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add azure/documentdb-driver`
- Raw SKILL.md: https://api.skillmd.com/api/skills/azure/documentdb-driver/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: Azure (https://skillmd.com/u/azure)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/azure/documentdb-driver

---


# Driver Best Practices — Azure DocumentDB

MongoDB driver usage patterns that apply across Node.js, Python, Java, Go, and .NET. For in-depth pool-size / timeout / retry tuning, see the `documentdb-connection` skill.

## Rules

- [driver-singleton-client](driver-singleton-client.md) — Reuse `MongoClient` as a process-wide singleton; never create a new client per request.

