Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By 9tykeshav
Automate comprehensive code reviews for MERN stack projects, prioritizing health checks like builds and tests, then auditing security, maintainability, performance, architecture, and best practices. Generate Node.js backend tests for Express routes and MongoDB models using detected frameworks like Jest. Optimize Mongoose queries by refactoring for efficient data flow and batching.
npx claudepluginhub 9tykeshav/mern-ninja-marketplace --plugin mern-ninjaUse when generating tests for backend code (Express routes, MongoDB models, Node services) - analyzes file type, detects test framework from package.json, generates comprehensive tests with setup/teardown and edge case coverage
Use when asked to review MERN stack code - comprehensive code reviewer that checks project health, security, maintainability, performance, testing, and architecture. Combines general code quality analysis with MERN-specific expertise.
Use when writing ANY Mongoose query (.find, .findOne, .findById, .aggregate, .populate), adding database operations to services or controllers, wiring data between services, building endpoints that read or write to MongoDB, or reviewing code that chains service calls. TRIGGER especially when about to write a new findById or pass an ID where a document could be passed instead.
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Code quality enforcement, architecture skills, structural code graph, and impact-aware reviews.
Use this agent for comprehensive performance testing, profiling, and optimization recommendations. This agent specializes in measuring speed, identifying bottlenecks, and providing actionable optimization strategies for applications. Examples:\n\n<example>\nContext: Application speed testing
Comprehensive Mocha testing framework skills for JavaScript and Node.js projects with flexible assertion libraries.
Complete fullstack development toolkit: React, Express/FastAPI, PostgreSQL scaffolding with AI agents
15 specialized agents and 22 skills for TypeScript fullstack development with Fastify, Next.js, PostgreSQL, Redis, and more.
Use this agent when designing APIs, building server-side logic, implementing databases, or architecting scalable backend systems. This agent specializes in creating robust, secure, and performant backend services. Examples:\n\n<example>\nContext: Designing a new API\nuser: "We need an API for our social sharing feature"\nassistant: "I'll design a RESTful API with proper authentication and rate limiting. Let me use the backend-architect agent to create a scalable backend architecture."\n<commentary>\nAPI design requires careful consideration of security, scalability, and maintainability.\n</commentary>\n</example>\n\n<example>\nContext: Database design and optimization\nuser: "Our queries are getting slow as we scale"\nassistant: "Database performance is critical at scale. I'll use the backend-architect agent to optimize queries and implement proper indexing strategies."\n<commentary>\nDatabase optimization requires deep understanding of query patterns and indexing strategies.\n</commentary>\n</example>\n\n<example>\nContext: Implementing authentication system\nuser: "Add OAuth2 login with Google and GitHub"\nassistant: "I'll implement secure OAuth2 authentication. Let me use the backend-architect agent to ensure proper token handling and security measures."\n<commentary>\nAuthentication systems require careful security considerations and proper implementation.\n</commentary>\n</example>
MERN stack mastery tools for Claude Code
A plugin that supercharges Claude Code with specialized skills for MongoDB, Express, React, and Node.js development.
# Step 1: Add the marketplace (one-time)
/plugin marketplace add 9tykeshav/mern-ninja-marketplace
# Step 2: Install the plugin
/plugin install mern-ninja@mern-ninja-marketplace
mern-ninja:backend-test-writerGenerates comprehensive backend tests with smart defaults and zero config.
Just ask:
Generate tests for my user routes
Write tests for the auth service
Create tests for my User model
What it does:
| File Type | Test Type | Approach |
|---|---|---|
| Routes/Controllers | Integration | Supertest + mongodb-memory-server |
| Services | Unit | Mocked dependencies |
| Models | Unit | Validation, methods, toJSON |
| Middleware | Unit | Mock req/res/next |
| Utilities | Unit | Pure function tests |
Features:
mern-ninja:code-reviewerReviews MERN stack code for security, performance, and best practices.
Just ask:
Review my authentication code
Check this Express API for security issues
Audit this MongoDB schema
Review priorities:
| Priority | Focus |
|---|---|
| 1. Security | Injection, XSS, auth flaws, secrets, CORS |
| 2. Performance | N+1 queries, re-renders, blocking ops |
| 3. Best Practices | Error handling, async patterns, cleanup |
| 4. Architecture | API design, state sync, type safety |
Sample output:
# MERN Code Review
## Summary
- Files reviewed: 5
- Issues: 2 Critical, 3 Important, 5 Suggestions
## Critical (Must Fix)
### [C1] Security: NoSQL injection in login
**File:** `api/auth/login.js:24`
**Why:** User input passed directly to query
**Fix:** Use explicit field matching
## What's Good
- Proper JWT refresh flow
- Consistent error responses
mern-ninja:mongodb-query-patternsData-flow-first approach to writing MongoDB/Mongoose queries that scale.
Triggers automatically when you:
Write a new Mongoose query
Wire data between services
Build an endpoint that reads/writes to MongoDB
Pass an ID where a document could be passed instead
Core principle: The best query is the one you never make. Pass documents through the call stack — don't re-fetch what the caller already has.
Patterns covered:
| Pattern | What It Prevents |
|---|---|
| Pass data through services | Same document fetched 3-4x across service boundaries |
Batch with $in + Map | N+1 loops that fire one query per item |
.select() + .lean() | Full-document fetches with Mongoose overhead on read paths |
Avoid .populate() on lists | Hidden N+1 queries behind a clean API |
Direct updateOne | Fetch-modify-save round-trips for simple field updates |
bulkWrite | Sequential update loops |
| Hoist common queries | Duplicate queries across if/else branches |
| Index filter fields | Full collection scans (COLLSCAN) |
Includes: Pre-commit checklist, common mistakes table, and the "every query must justify its existence" decision framework.
The plugin includes ~1,500 lines of curated best practices:
| Guide | Coverage |
|---|---|
security.md | OWASP Top 10, MERN-specific vulnerabilities |
react.md | Hooks, re-renders, security, testing |
nodejs.md | Async patterns, event loop, memory |
express.md | Middleware, auth, error handling |
mongodb.md | Schema design, indexing, queries |
fullstack.md | API design, auth flows, state sync |
test-patterns.md | Complete test examples by file type |
test-setup.md | Jest config, fixtures, mocking |
mern-ninja:scaffolder – Generate MERN boilerplatemern-ninja:migrator – Database migration helpermern-ninja:frontend-test-writer – React component testsMIT