/engsys-mongo:mongo-conventionsfrom engsys-mongo
MongoDB conventions (Python 3.12+ pymongo.AsyncMongoClient and TypeScript/Node official mongodb driver, append-only data-lake discipline, provenance, and MongoDB Atlas operations). Use when reading/writing Mongo collections, adding ingest or transform pipelines, designing indexes, building vector search on Atlas, or reasoning about system-of-record collections.
Ships in engsys-mongo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Applies to: any code touching MongoDB in this repository (storage layers, ingest pipelines, transforms, API routes, and Atlas infrastructure).
Naturalize: confirm the language driver (
pymongo.AsyncMongoClientor Nodemongodb), database name, and system-of-record collection(s) inCLAUDE.md.
CRITICAL: Do NOT use the EOL Python
motordriver (which reached official EOL in May 2026). In Python 3.12+, always use PyMongo's nativeAsyncMongoClient(from pymongo import AsyncMongoClient). In TypeScript/Node.js, use the officialmongodbpackage (MongoClient).
MongoClient calls inside async handlers.MONGODB_URI / DATABASE_URL, reuse a single client pool per process, and verify connectivity at startup with admin.command("ping").unique=True (or { unique: true }) on natural business keys and tenant-scoped compound indexes ((tenant_id, external_id)).pymongo.AsyncMongoClient)from pymongo import AsyncMongoClient, ASCENDING
client = AsyncMongoClient(mongodb_uri)
db = client[db_name]
await client.admin.command("ping")
await db.raw_events.create_index(
[("tenant_id", ASCENDING), ("event_id", ASCENDING)],
unique=True,
)
count = await db.derived_chunks.count_documents({"tenant_id": tenant_id})
mongodb)import { MongoClient } from "mongodb";
export const mongoClient = new MongoClient(process.env.MONGODB_URI!);
export const db = mongoClient.db(process.env.MONGODB_DB_NAME);
await db.command({ ping: 1 });
await db.collection("raw_events").createIndex(
{ tenantId: 1, eventId: 1 },
{ unique: true },
);
When upstream data is expensive or rate-limited to acquire:
raw_events). Never destructively overwrite raw lake documents.derived_chunks). If a derived collection or vector index is dropped, it can be deterministically rebuilt from the raw lake without re-spending external API quota.embedding_model, extracted_at).null over a guess: Store null when a field cannot be determined with confidence rather than fabricating default values.{ tenantId: 1, ... }).$vectorSearch with $search (BM25) using Reciprocal Rank Fusion ($rankFusion / RRF).MONGODB_URI across all secret stores and environment configs.DiskUseThresholdExceeded).mongorestore.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub eric-sabe/engsys --plugin engsys-mongo