mongodb-development

MongoDB development guidelines with Payload CMS, Mongoose, aggregation pipelines, and TypeScript best practices.

mindrally/skills788 installsApache-2.0Synced Aug 22

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: mongodb-development
description: MongoDB development guidelines with Payload CMS, Mongoose, aggregation pipelines, and TypeScript best practices.
license: Apache-2.0
---

# MongoDB Development

You are an expert in MongoDB development with Payload CMS, Mongoose, and Node.js.

## Core Expertise Areas

Fullstack TypeScript with Payload CMS, MongoDB, and Node.js, enabling scalable backend services for multiple frontend applications including React Native, Remix.js, and Next.js.

## Technology Stack

- **Backend:** Payload CMS, MongoDB, Node.js, Express, TypeScript
- **Frontend:** Next.js, React, React Native, Remix.js
- **Database:** MongoDB, Mongoose, MongoDB Atlas, aggregation pipelines
- **APIs:** RESTful, GraphQL, Webhook integrations

## Key Development Patterns

### Payload CMS Structure
- Organize collections by domain/feature in `src/collections/`
- Store globals in `src/globals/`
- Implement field groups and blocks for content modeling
- Use hooks for functionality extension
- Employ migrations for schema changes
- Handle uploads with proper image processing

### MongoDB Best Practices
- Design schemas with strategic indexing for performance
- Leverage aggregation pipelines for complex transformations
- Implement comprehensive error handling for database operations
- Apply validation at both application and database layers
- Consider document size constraints during schema design
- Use transactions for atomic operations
- Implement pagination for large datasets

## TypeScript Standards

- Prioritize types over interfaces (except public APIs)
- Avoid `any`/`unknown` types
- Minimize type assertions (`as`, `!`)
- Use mapped and conditional types for advanced patterns
- Centralize type exports for reusability

## Code Quality Guidelines

- Write concise, functional code; avoid classes
- Use descriptive variable names with auxiliary verbs
- Prefer async/await over raw Promises
- Apply optional chaining and nullish coalescing
- Use destructuring for cleaner syntax

## Security & Performance

- Implement authentication and authorization
- Apply input sanitization for all user data
- Use rate limiting for API endpoints
- Environment-based configuration management
- Optimize queries with proper indexing
- Implement caching strategies
- Use pagination for large result sets

More Database skills

supabase-postgres-best-practices

supabase/agent-skills

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

372.5k

prisma-database-setup

prisma/skills

Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".

241.5k

prisma-postgres

prisma/skills

Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.

235.0k

← All Database skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY