Mern add feature
A collection of Claude Code skills for iOS, MERN, NEAN, and shared development workflows
npx -y skills add edfenton/claude-skills --skill mern-add-featureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Scaffold a new feature with API route, Zod schema, Mongoose model, and UI components.
SKILL.md
2.5 KB, as published. Nobody here has run it
Purpose
Add a complete feature slice to an existing MERN project with all layers wired up and tests included.
Arguments
feature-name— Feature name in kebab-case (e.g.,user-profile,invoice)--no-ui— Skip UI components (API-only feature)--no-api— Skip API route (frontend-only feature)--no-model— Skip Mongoose model (use existing model)
What gets created
Default (all layers)
packages/shared/schemas/<feature>.ts # Zod schemas + inferred types
apps/web/src/app/api/<feature>/route.ts # API route handler
apps/web/src/server/db/models/<feature>.ts # Mongoose model
apps/web/src/components/<feature>/ # UI components
<Feature>List.tsx
<Feature>Form.tsx
<Feature>Card.tsx
apps/web/src/components/<feature>/__tests__/
<Feature>Form.test.tsx
With flags
--no-ui: Only schema + API + model--no-api: Only schema + UI (for client-side-only features)--no-model: Only schema + API route + UI (uses existing model)
Conventions
Naming
- Feature name:
kebab-case(input) - Schema/types:
PascalCase(e.g.,UserProfile,CreateUserProfileInput) - Files:
kebab-case.tsfor utilities,PascalCase.tsxfor React - API routes:
/api/<feature>for collection,/api/<feature>/[id]for item
Schema location
All Zod schemas go in packages/shared/schemas/<feature>.ts:
Create<Feature>Schema— creation inputUpdate<Feature>Schema— partial update input<Feature>Schema— full entity shape- Inferred types exported alongside schemas
API route structure
GET /api/<feature>— list (paginated)POST /api/<feature>— createGET /api/<feature>/[id]— get onePATCH /api/<feature>/[id]— updateDELETE /api/<feature>/[id]— delete
Model conventions
- Timestamps enabled
- Indexes documented with reason
toJSONtransform to hide internal fields
Workflow
- Create Zod schemas in packages/shared
- Create Mongoose model (if not --no-model)
- Create API routes (if not --no-api)
- Create UI components (if not --no-ui)
- Create tests for each layer
- Run
pnpm lintandpnpm testto verify
Output
Summarize: files created, API endpoints available, components ready to use.
Reference
For templates and patterns, see reference/mern-add-feature-reference.md