mern-add-feature

Scaffold MERN features with API routes, Zod schemas, Mongoose models, and UI components.

3|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/edfenton/claude-skills --skill mern-add-feature
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mern-add-feature
Source: https://github.com/edfenton/claude-skills/tree/main/mern/mern-add-feature
Command: npx skills add https://github.com/edfenton/claude-skills --skill mern-add-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolds a complete MERN feature by generating the data model, API, validation, and UI components, dramatically reducing boilerplate and setup time.

Core Features & Use Cases

  • Zod schemas and type-safe input validation for new features.
  • API routes and Mongoose models wired end-to-end with standard patterns.
  • Generated UI components and tests to validate the new feature in a Next.js app.

Quick Start

Run this skill with a kebab-case feature name to generate schema, API, model, UI, and tests across the MERN stack.

Frequently Asked Questions about mern-add-feature

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a MERN feature end-to-end in a Next.js monorepo?

To scaffold a MERN feature end-to-end, use a tool that generates the API route, Zod schema, Mongoose model, and UI components simultaneously. This enforces naming conventions and standard directory placements across server, data, and client layers.

What's the best way to reduce boilerplate when adding a new entity to a MERN stack?

Reducing boilerplate when adding a new entity to a MERN stack involves automated scaffolding that generates data models, API routes, and validation schemas. This eliminates manual setup time and ensures type-safe input validation with Zod across the generated files.

Does the MERN feature scaffolding support Next.js App Router directory structures?

Yes, the MERN feature scaffolding supports Next.js App Router by placing API routes in the src/app/api directory. It also places Mongoose models in the server/db/models directory and shared schemas in a dedicated packages/shared/schemas folder.

Can I generate only the Mongoose model and Zod schema without creating UI components?

Yes, you can generate only the Mongoose model and Zod schema without UI components by using the --no-ui flag. The scaffolding also supports --no-api and --no-model flags to selectively skip generating specific layers of the MERN feature.

What is included when scaffolding a complete MERN feature for a Next.js application?

Scaffolding a complete MERN feature for a Next.js application includes generating Zod schemas, API routes, Mongoose models, UI components, and tests. This provides a fully wired end-to-end implementation using standard patterns for the new entity.

When should I use selective generation flags like --no-api or --no-model during MERN scaffolding?

You should use selective generation flags like --no-api or --no-model during MERN scaffolding when you only need to update specific layers of an existing entity. This prevents overwriting existing API routes or database models while still generating the required UI or schema files.