Agent skill
mern-stack
Stack decisions for MERN apps (Next.js, pnpm monorepo). Reference before scaffolding or architecture work.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/mern-stack
SKILL.md
Locked decisions
| Layer | Decision |
|---|---|
| Monorepo | pnpm workspaces |
| Frontend | Next.js (app router), TypeScript required |
| API | Next.js route handlers (app/api/) by default |
| Database | MongoDB + Mongoose |
| Validation | Zod (shared schemas in packages/shared) |
| Environments | local → non-prod → prod |
| Secrets | .env.local for dev; AWS for production |
| Containers | Not required unless deployment target forces it |
Project layout
apps/web/ # Next.js app
app/api/ # API route handlers
src/server/ # Server-only code
packages/shared/ # Zod schemas, types, utilities
.github/workflows/ # CI/CD
(root configs) # eslint, prettier, tsconfig
When to add a separate API service
Only justified if:
- Long-running jobs exceed serverless timeouts
- WebSocket/persistent connections required
- Shared API serves multiple non-Next.js clients
- Compliance requires API isolation
Default: keep API in Next.js route handlers.
Reference
For versions, env setup, and deployment patterns, see reference/mern-stack-reference.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?