install
source · Clone the upstream repo
git clone https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills-
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills- "$T" && mkdir -p ~/.claude/skills && cp -r "$T/Skills/External_Collections/React_Best_Practices" ~/.claude/skills/mdbabumiamssm-llms-universal-life-science-and-clinical-skills-react-best-practic && rm -rf "$T"
manifest:
Skills/External_Collections/React_Best_Practices/SKILL.mdsource content
<!--
# COPYRIGHT NOTICE
# This file is part of the "Universal Biomedical Skills" project.
# Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
# All Rights Reserved.
#
# This code is proprietary and confidential.
# Unauthorized copying of this file, via any medium is strictly prohibited.
#
# Provenance: Authenticated by MD BABU MIA
-->
name: 'react-performance-optimizer' description: 'Analyzes React/Next.js code for performance bottlenecks, focusing on waterfalls, bundle size, and rendering efficiency.' measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
React Performance Optimization Skill
This skill assists in identifying and resolving common performance issues in React and Next.js applications. It applies rules from Vercel's engineering best practices.
When to Use This Skill
- When a user asks to "optimize" a React component or page.
- When a user mentions "slow loading", "waterfalls", or "large bundle size".
- When reviewing code for production readiness.
Core Capabilities
- Waterfall Detection: Identifies nested data fetching patterns that block rendering.
- Bundle Size Analysis: Suggests dynamic imports (
,next/dynamic
) for heavy components.React.lazy - Render Optimization: Checks for unnecessary re-renders and suggests
,useMemo
, or composition patterns.useCallback - Image Optimization: Verifies usage of
and proper sizing attributes.next/image - Server Components: Recommends moving logic to Server Components (RSC) where appropriate to reduce client JS.
Workflow
- Analyze Imports: Check for heavy libraries (e.g., moment.js, lodash) that could be tree-shaken or replaced.
- Check Data Fetching:
- Look for
inside loops or sequentialawait
calls that could beawait
.Promise.all - Identify Client Components fetching data that could be Server Components.
- Look for
- Inspect Rendering Logic:
- Look for expensive computations directly in the render body.
- Check for
usage that triggers cascading updates.useEffect
- Review References: Consult
for specific patterns to avoid.references/performance_rules.md
Example Usage
User: "Why is my dashboard loading so slowly?"
Agent:
- Read
and components.src/app/dashboard/page.tsx - Identify multiple sequential
calls.await fetch(...) - Suggest using
or moving data fetching up to a layout/parent RSC.Promise.all - Suggest wrapping the Chart component with
.next/dynamic
References
: detailed explanation of the rules.references/performance_rules.md