# Mongodb

> MongoDB with TypeScript document types and indexes. Use when the data model is document-oriented, not when the project already standardized on Postgres plus Drizzle.

- Skill: `vostrikovva/mongodb` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vostrikovva/mongodb`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vostrikovva/mongodb/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: vostrikovva (https://skillmd.com/u/vostrikovva)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/vostrikovva/mongodb

---


# MongoDB + TypeScript

Type documents (interface or schema). Do not pass `any` through the driver.

Collection/module paths are defaults. Real directories come from the `implement`/`tdd` recon of `package.json` and `tsconfig.json` (monorepo, `paths`).

## Defaults

- Indexes for fields you filter/sort on. Call out missing indexes when adding queries.
- Do not store secrets in documents. Do not print connection strings in chat.

## vs Postgres

If the repo already uses Drizzle/Postgres, do not add Mongo “for variety”. Split databases only when the user wants a document store for a defined bounded context.

