
Mongoose Mongodb
Guide to MongoDB in Node.js with Mongoose for schemas, CRUD, relationships, and aggregation queries.
- skills.sh installs
- 702
- GitHub stars
- 2
- last updated
- Aug 21, 2026
What it does
- Covers connection setup, schema and model definition, CRUD operations, and population of related documents
- Includes examples for indexes, pre-save middleware, virtual properties, aggregation pipelines, and query operators
- Recommends schema-level validation,
lean()for read-only queries, and transactions for multi-document writes - Designed for Node.js applications that need a flexible, document-based data store
Install
$ npx -y skills add pluginagentmarketplace/custom-plugin-nodejs --skill mongoose-mongodb -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Mongoose & MongoDB Skill
Master MongoDB database integration in Node.js with Mongoose, the elegant object modeling library.
Quick Start
Connect and CRUD in 4 steps:
- Install -
npm install mongoose - Connect -
mongoose.connect(uri) - Define Schema - Create data models
- CRUD - Create, Read, Update, Delete
Core Concepts
Connection Setup
const mongoose = require('mongoose');
mongoose.connect(process.env.MONGODB_URI, {
useNewUrlParser: true,
useUnifiedTopology: true
});
mongoose.connection.on('connected', () => {
console.log('MongoDB connected');
});
Schema & Model
const userSchema = new mongoose.Schema({
name: {
type: String,
required: [true, 'Name is required'],
trim: true,
minlength: 3,
maxlength: 50
},
email: {
type: String,
required: true,
unique: true,
lowercase: true
},
age: {
type: Number,
min: 18,
max: 120
},
role: {
type: String,
enum: ['user', 'admin'],
default: 'user'
}
}, {
timestamps: true // createdAt, updatedAt
});
const User = mongoose.model('User', userSchema);
Details
- Repository
- github.com/pluginagentmarketplace/custom-plugin-nodejs
- Categories
- Databases, Backend & APIs
- First seen
- May 16, 2026
More from pluginagentmarketplace/custom-plugin-nodejs
All 4Similar to Mongoose Mongodb
More Databases
mongodbhoodini/ai-agents-skills1.7K installsPractical MongoDB and Mongoose guidance covering schema design, query operators, updates, and aggregation pipelines with production-minded defaults.
mongodb-developmentmindrally/skills930 installsMongoDB development guidelines for Payload CMS, Mongoose, aggregation pipelines, and strict TypeScript practices.
nosql-database-designaj-geddes/useful-ai-prompts493 installsSchema design guidance for MongoDB and DynamoDB covering document modeling, indexing, and query-driven denormalization.
mongodb-schema-designmongodb/agent-skills7.4K installsSchema design patterns and anti-patterns for MongoDB, covering when to embed versus reference data.
sequelizemindrally/skills997 installsGuidelines for building Node.js and TypeScript data layers with Sequelize across five SQL databases.