Back to skills
SKILL.md
Mk React Patterns
ASecurityGuides React and Next.js code: hooks, re-renders, bundle size; use on .tsx or .jsx.
- 17 stars
- 0 votes
- 0 copies
- 4 views
- Added September 6, 2026
Works with
Security analysis
100/100Pro scans all 6 files and shows the line behind each finding
npx -y skills add ngocsangyem/MeowKit --skill mk-react-patterns --agent claude-codeAre you the author of Mk React Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ngocsangyem-mk-react-patterns)---
name: "mk-react-patterns"
description: "Guides React and Next.js code: hooks, re-renders, bundle size; use on .tsx or .jsx."
---
# React Patterns
React and Next.js performance optimization — curated rules across priority categories drawn from framework docs and production practice.
Complements `mk-typescript` (type safety) and `mk-vue` (Vue patterns). This skill covers React-specific performance patterns.
## When to Use
- Writing or reviewing React/Next.js components
- Optimizing bundle size or render performance
- Fixing re-render issues
- Server vs client component decisions
- Data fetching patterns
## Rule Categories (by priority)
Load the relevant reference when working in that area:
| Priority | Category | Reference | Key rules |
| -------- | ---------------------- | ------------------------------------- | ----------------------------------------------------- |
| CRITICAL | Eliminating waterfalls | `references/async-patterns.md` | Defer await, parallel promises, Suspense boundaries |
| CRITICAL | Bundle size | `references/bundle-optimization.md` | No barrel imports, dynamic imports, defer third-party |
| HIGH | Server performance | `references/server-patterns.md` | React.cache(), LRU cache, parallel fetching, after() |
| MEDIUM | Re-render optimization | `references/rerender-optimization.md` | Derived state, functional setState, memo, transitions |
| MEDIUM | Rendering perf | `references/rendering-patterns.md` | content-visibility, hoist JSX, conditional render |
## Process
1. Identify the performance concern (waterfall? bundle? re-render? server?)
2. Load the matching reference file
3. Apply rules — each rule has: problem, solution, code example
4. Verify improvement (Lighthouse, bundle analyzer, React DevTools)
## Gotchas
- **Premature optimization**: optimizing re-renders before measuring → measure first with React DevTools Profiler
- **Over-memoizing**: wrapping everything in useMemo/React.memo → memo only when profiler shows expensive re-renders
- **Barrel file trap**: importing from index.ts pulls entire module → always import directly from source file
## Workflow Integration
Auto-activates during Phase 3 (Build) when React/Next.js project detected. Loaded by `developer` agent alongside `mk-typescript`.Files in this skill
- SKILL.md
- references/async-patterns.md
- references/bundle-optimization.md
- references/rendering-patterns.md
- references/rerender-optimization.md
- references/server-patterns.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.