senior-mongodb
Skill2 starsChanged 6 days agoMITView on GitHub
Use when designing, reviewing, tuning, migrating, securing, or troubleshooting MongoDB data models, documents and schemas, indexes, queries and aggregation pipelines, explain plans, transactions, Mongoose or driver code, sharding, replication, or backups.
In this repository50 other files it gives its agents.
- angular-standardSkill
- business-analyst-standardSkill
- execute-browser-verifySkill
- execute-build-testSkill
- execute-debug-evidenceSkill
- execute-implementationSkill
- jira-ba-dev-test-flowSkill
- nestjs-standardSkill
- professional-slidesSkill
- python-standardSkill
- senior-angularSkill
- senior-api-designSkill
- senior-backend-engineerSkill
- senior-business-analystSkill
- senior-cicdSkill
- senior-cloud-serverSkill
- senior-code-reviewSkill
- senior-delivery-orchestratorSkill
- senior-designSkill
- senior-dockerSkill
- senior-dotnetSkill
- senior-flutterSkill
- senior-frontend-engineerSkill
- senior-git-workflowSkill
- senior-goSkill
- senior-java-springSkill
- senior-kubernetesSkill
- senior-manual-testingSkill
- senior-mysqlSkill
- senior-nestjsSkill
- senior-nextjsSkill
- senior-nodejsSkill
- senior-observabilitySkill
- senior-performanceSkill
- senior-postgresqlSkill
- senior-python-backendSkill
- senior-react-nativeSkill
- senior-reactSkill
- senior-redisSkill
- senior-refactoringSkill
- senior-securitySkill
- senior-sql-serverSkill
- senior-tech-leadSkill
- senior-technical-writingSkill
- senior-terraformSkill
- senior-test-automationSkill
- senior-test-engineerSkill
- senior-vueSkill
- solution-architect-standardSkill
- tester-standardSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Never run destructive operations or index builds on production without authorization and a plan.
- Very specific: line 21
Create compound indexes following equality, sort, range order.
- Very specific: line 23
Use multi-document transactions only when invariants span documents.
- Very specific: line 29
Check explain output for changed queries and aggregations, run tests against a real MongoDB (container) rather than mocks for query logic, …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Senior MongoDB
Role
Model MongoDB data around access patterns, back every frequent query with an index, keep documents bounded, and change schemas without breaking existing documents.
Before Editing
- Inspect server version, deployment (replica set, sharded, Atlas), driver or ODM (Mongoose, Motor, official drivers), schema validation rules, existing indexes, and migration approach.
- List the read and write patterns affected and get
explain("executionStats")for changed queries. - Never run destructive operations or index builds on production without authorization and a plan.
Implementation Rules
- Embed data that is read together and bounded; reference data that grows without limit or is shared. Never let arrays grow unbounded inside a document (16 MB limit, update cost).
- Create compound indexes following equality, sort, range order; verify queries are covered or use
IXSCAN, notCOLLSCAN. Remove unused indexes. - Validate input before building queries; never pass user-controlled objects directly as filters (operator injection such as
$where,$ne). Use projections to return only needed fields. - Use multi-document transactions only when invariants span documents; keep them short. Prefer atomic single-document updates (
$set,$inc,$pushwith$slice). - Evolve schemas with a version field or tolerant readers; backfill in batches; add
$jsonSchemavalidation for new invariants. - Choose read/write concerns deliberately; for sharded clusters pick shard keys with high cardinality and even distribution.
Testing and Verification
Check explain output for changed queries and aggregations, run tests against a real MongoDB (container) rather than mocks for query logic, and verify migrations on a copy of production-shaped data.
Review Checklist
- Does the model match access patterns, with bounded documents?
- Is every hot query index-backed?
- Is user input sanitized against operator injection?
- Can old and new document shapes coexist during rollout?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

