mongodb-development — MongoDB skill
MongoDB development rules: schemas, indexes, aggregation pipelines, Mongoose and Payload CMS. Useful when the agent writes a TypeScript backend.
npx skills add Mindrally/skills --skill mongodb-development -a claude-codeWhat mongodb-development does
The skill tells the agent to act as a MongoDB expert working with Payload CMS, Mongoose and Node.js. It covers project layout: collections grouped by domain under src/collections/, globals in src/globals/, hooks for extending behaviour, migrations for schema changes.
A separate block deals with the database itself — indexes chosen for real queries, aggregation pipelines for heavier transformations, validation at both the application and database layer, transactions for atomic operations, pagination on large result sets. TypeScript standards are spelled out too: types over interfaces, no any, few assertions with as or !.
There is no code here, just instructions the agent reads. Installation goes through npx skills add or gh skill install, and the file lands in the skills directory of whichever tool you use. On a project that does not run MongoDB, the collection and hook rules have nothing to attach to.
What it helps with
- lay out Payload CMS collections by domain
- pick indexes for the queries you actually run
- build an aggregation pipeline for a complex transform
- add validation at the application and database layer
- drop
anyand stray type assertions from TypeScript
Example prompts for the agent
- Organize the Payload CMS collections by domain in
src/collections/ - Write an aggregation pipeline for the orders report
- Review this schema for indexes and document size
How to install mongodb-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill mongodb-development -a claude-code2Manually: put the files in place
~/.claude/skills/mongodb-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mongodb-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill mongodb-development -a codex2Manually: put the files in place
.agents/skills/mongodb-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill mongodb-development -a cursor2Manually: put the files in place
.cursor/skills/mongodb-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills mongodb-development2Manually: put the files in place
.github/skills/mongodb-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill mongodb-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path mongodb-developmentManually: put the files in place
.devin/skills/mongodb-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill mongodb-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mongodb-development
How do I install mongodb-development in Claude?
Run npx skills add Mindrally/skills --skill mongodb-development -a claude-code. The file lands at ~/.claude/skills/mongodb-development/SKILL.md.
What does mongodb-development do?
It gives the agent MongoDB development rules: Payload CMS structure, indexing, aggregation pipelines, transactions and TypeScript standards.
Which platforms support the skill?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each one takes its own flag in the install command.
Source text
SKILL.md · Apache-2.0
--- name: mongodb-development description: MongoDB development guidelines with Payload CMS, Mongoose, aggregation pipelines, and TypeScript best practices. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # 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
© Mindrally · Apache-2.0 · Mindrally/skills