一键导入
mongodb-devrel-advisor
Always-on conventions advisor for MongoDB DevRel projects providing architecture guidance, branding rules, naming conventions, database patterns, and security best practices
菜单
Always-on conventions advisor for MongoDB DevRel projects providing architecture guidance, branding rules, naming conventions, database patterns, and security best practices
Generate conference talk proposals (CFPs), abstracts, and presentation outlines with slide structure and timing guidance
Generate workshop agendas and hands-on curriculum for customer developer days, technical training sessions, and field engagements
MongoDB schema design advisor focusing on embed vs reference decisions, relationship modeling, and performance optimization patterns
Generate scoring rubrics and constructive feedback for hackathon submissions with fair evaluation frameworks and actionable improvement suggestions
Generate Model Context Protocol (MCP) tool servers from API descriptions, enabling AI assistants to connect to external services
Add AI capabilities to a MongoDB app including LLM summarization, structured generation, RAG pipeline with Atlas Vector Search, Voyage AI embeddings, and usage tracking with cost estimation
| name | mongodb-devrel-advisor |
| description | Always-on conventions advisor for MongoDB DevRel projects providing architecture guidance, branding rules, naming conventions, database patterns, and security best practices |
| license | MIT |
| disable-model-invocation | true |
| metadata | {"version":"1.0.0","author":"Michael Lynn [mlynn.org](https://mlynn.org)","category":"mongodb-devrel","domain":"conventions","updated":"2026-03-01T00:00:00.000Z","tech-stack":"nextjs, mongodb, mui, mongoose"} |
Always active as background context. Use when making any architectural decision, choosing libraries, naming conventions, structuring code, or applying MongoDB branding in a DevRel project. This skill synthesizes the conventions from all other skills into a quick-reference guide.
This is the glue. It doesn't build anything — it just keeps Claude honest about naming conventions, branding, and architecture decisions across all the other skills. — ML
This is the meta-skill — a pattern-aware advisor grounded in the actual decisions made across the MongoDB Hackathon Platform. Instead of generic best practices, it provides specific conventions that the DevRel team has validated through production use.
This is a background context skill — it's always active and doesn't need to be explicitly invoked. Claude uses it automatically when making architectural decisions, choosing libraries, or applying MongoDB branding.
references/naming-conventions.md — Complete naming rules for models, schemas, routes, files, rolesreferences/decision-matrix.md — Which DB driver, auth lib, UI framework, LLM, embedding modelassets/architecture-checklist.md — Pre-flight checklist for new features(app) route group for layout isolationsrc/lib/ for all server-side business logicsrc/lib/db/models/ for Mongoose modelssrc/lib/db/schemas.ts for Zod validation schemassrc/lib/db/connection.ts for singleton DB connectionsrc/styles/ for theme filessrc/components/shared-ui/ for reusable UI componentssrc/contexts/ for React context providerssrc/types/ for TypeScript declarations"use client" when the component uses hooks (useState, useEffect, useSession) or browser APIs.@/lib/auth in middleware.ts. It pulls in Node.js-only modules.I prefix for interface (IUser, IEvent), Model suffix for export (UserModel, EventModel)createEventSchema, updateEventSchema)/api/admin/email-templates/[id]/test-send)admin-guard.ts, email-service.ts), PascalCase for components (ThemeRegistry.tsx)super_admin, organizer)| Token | Hex | Usage |
|---|---|---|
| Spring Green | #00ED64 | Accent/CTA only. NEVER as background fill in dark mode |
| Forest Green | #00684A | Primary in light mode |
| Evergreen | #023430 | Primary dark variant |
| Slate Blue | #001E2B | Dark mode page background, light mode text |
| Blue | #006EFF | Secondary / interactive elements |
| Purple | #B45AF2 | Accent (badges, highlights) |
| Warning Yellow | #FFC010 | Warnings |
| Error Red | #CF4520 | Errors |
#001E2B (Slate Blue)#0F2235 (dark navy, NOT green-tinted)rgba(0, 237, 100, 0.12) tint, not solid greenrgba(255, 255, 255, 0.08)textTransform: "none" (never uppercase)clamp() for responsive heading sizesconnectToDatabase() before any model operation in API routesbufferCommands: false to make connection failures explicit.lean() for read-only queries (returns plain objects, 3-5x faster).select("+fieldName") to include fields marked select: false.select("-fieldName") to exclude large fields (embeddings, long text).sort({ createdAt: -1 }) for reverse chronological by default$addToSet for array additions (prevents duplicates)$pull for array removals.partial() on Zod schemas for update operations{ timestamps: true } on all schemas for automatic createdAt/updatedAt{ tier: 1, status: 1 })sparse: true for optional unique fields (landingPage.slug)select: false + sparse indexes for security tokens2dsphere for geospatial coordinatesbcryptjs for Node.js compatibility)select: false in schema definitionscrypto.randomInt() for secure random generation (not Math.random())deletedAt (never hard-delete)banned, bannedAt, bannedReason fieldserrorResponse("Forbidden", 403) for unauthorized roleerrorResponse("Unauthorized", 401) for missing sessionAll expensive-to-create resources follow the same lazy initialization:
let instance: Type | null = null;
function getInstance(): Type {
if (!instance) {
instance = new Type(config);
}
return instance;
}
Applied to: Mongoose connection, Nodemailer transporter, OpenAI client, DigestFetch client.
try {
// auth check → connect → validate → operate → respond
} catch (error) {
console.error("METHOD /api/path error:", error);
return errorResponse("Internal server error", 500);
}
For non-critical operations (email, logging, embeddings):
sendEmail({...}).catch(() => {});
logAiUsage({...}); // Already never-throws internally
For multi-step operations (Atlas provisioning):
try {
// step 1, 2, 3...
} catch (error) {
// rollback: delete created resources
if (createdResource) {
try { await deleteResource(createdResource.id); } catch { /* log only */ }
}
throw error;
}
| Need | Use Skill |
|---|---|
| New project from scratch | mongodb-nextjs-scaffold |
| Authentication & roles | mongodb-rbac-middleware |
| Sending emails | mongodb-email-system |
| Atlas cluster management | mongodb-atlas-provisioning |
| AI summarization, RAG | mongodb-ai-features |
| Event/hackathon features | mongodb-event-platform |
| Sponsor management | mongodb-partner-portal |
"Which database driver?" → Mongoose. It provides schema validation, model guards for hot reload, middleware hooks, and population. The native driver is only better for raw aggregation-heavy workloads.
"Which auth library?" → NextAuth v5 (beta). JWT strategy for edge compatibility. Credential + magic link providers. Role embedded in JWT token.
"Which UI framework?" → MUI 7 with the MongoDB brand theme. Provides accessible components, dark mode via colorSchemes, and responsive breakpoints out of the box.
"Which embedding model?" → Voyage AI voyage-4-large for documents, same model (or voyage-4-lite) for queries. Same embedding space, different cost/quality tradeoffs.
"Which LLM for generation?" → OpenAI GPT-4-turbo for structured outputs. GPT-4o for general chat. Use the usage logger to track costs.
"How do I add a new role?" → Add to the UserRole type and schema enum in User model. Add to the appropriate role group in admin-guard.ts. Add route protection in middleware.ts. No migration needed — existing users won't have the new role.