If you're building Node.js apps that need a database, this gets you productive with MongoDB fast. You'll learn schemas with built-in validation, CRUD operations, relationships with population, and query operators for filtering data. The progression makes sense: start with basic connects and models, move into indexes and middleware hooks, then tackle aggregation pipelines and transactions. Mongoose adds structure to MongoDB's flexibility, which is great until you need to fight the ODM layer, but for most CRUD apps it's the standard choice. The examples cover real patterns like password hashing in pre-save hooks and virtual properties, not just toy demos.

skills.sh installs
699
GitHub stars
2
last updated
Aug 21, 2026

Install

$ npx -y skills add pluginagentmarketplace/custom-plugin-nodejs --skill mongoose-mongodb --agent claude-code

Installs into .claude/skills of the current project.

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:

  1. Install - npm install mongoose
  2. Connect - mongoose.connect(uri)
  3. Define Schema - Create data models
  4. 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);

Sponsors

Details

Repository
github.com/pluginagentmarketplace/custom-plugin-nodejs
Categories
Design & UI/UX, Databases
First seen
May 16, 2026

More from pluginagentmarketplace/custom-plugin-nodejs

All 4
1donchitos avatarteam-narrativedonchitos/claude-code-game-studiosOrchestrate the narrative team: coordinates narrative-director, writer, world-builder, and level-designer to create cohesive story content, world lore, and narr697skills.sh installs
2joellewis avatarbooks-and-recordsjoellewis/finance_skillsGuide the design and maintenance of recordkeeping programs under SEC Rules 17a-3, 17a-4, and 204-2. Use when the user asks about document retention schedules, h697skills.sh installs
3digidai avatarproduct-manager-skillsdigidai/product-manager-skillsPM skill for Claude Code, Codex, Cursor, and Windsurf. Diagnoses SaaS metrics, critiques PRDs, plans roadmaps, runs discovery, coaches PM career transitions, pr695skills.sh installs
4luwill avatarmedical-imaging-reviewluwill/research-skillsUse when the user asks to plan, conduct, document, synthesize, or draft a medical imaging AI narrative review or method survey, scoping review, or systematic re695skills.sh installs
5joellewis avatarreference-datajoellewis/finance_skillsDesign and manage reference data systems — security master, client master, account master, identifier mapping, pricing data sources, golden source designation, 692skills.sh installs
6joellewis avatarcrm-client-lifecyclejoellewis/finance_skillsDesign and optimize CRM systems and client lifecycle workflows for advisory firms, covering segmentation, household management, service tiers, and retention ana691skills.sh installs