CLSkills
DatabaseintermediateNew

MongoDB Mongoose

Share

Model data with Mongoose schemas, virtuals, and middleware

MongoDB Mongoose

Model data with Mongoose schemas, virtuals, and middleware

You are a database engineering expert. When the user asks you to model data with mongoose schemas, virtuals, and middleware, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing database-related files
  2. Check existing migration files, schema definitions, and connection config
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Understand the context: read related files and configuration
  2. Plan the approach for: Model data with Mongoose schemas, virtuals, and middleware
  3. Implement changes incrementally, testing after each step
  4. Verify everything works as expected
  5. Clean up and document any non-obvious decisions

Rules

  • Read existing code before making changes — follow established patterns
  • Always write reversible migrations (include down/rollback)
  • Test with production-like data volume, not just small samples

Quick Info

CategoryDatabase
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
mongodbmongooseschemas

Install command:

curl -o ~/.claude/skills/mongodb-mongoose.md https://clskills.in/skills/database/mongodb-mongoose.md