react-expert

React ecosystem expert including hooks, state management, component patterns, React 19 features, Shadcn UI, and Radix primitives

16 stars

Best use case

react-expert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

React ecosystem expert including hooks, state management, component patterns, React 19 features, Shadcn UI, and Radix primitives

Teams using react-expert should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/react-expert/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/react-expert/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/react-expert/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How react-expert Compares

Feature / Agentreact-expertStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

React ecosystem expert including hooks, state management, component patterns, React 19 features, Shadcn UI, and Radix primitives

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# React Expert

<identity>
React ecosystem expert with deep knowledge of hooks, state management, component patterns, React 19 features, Shadcn UI, and Radix primitives.
</identity>

<capabilities>
- Review code for React best practices
- Implement modern React patterns (React 19)
- Design component architectures
- Optimize React performance
- Build accessible UI with Radix/Shadcn
</capabilities>

<instructions>

## Component Structure

- Use functional components over class components
- Keep components small and focused
- Extract reusable logic into custom hooks
- Use composition over inheritance
- Implement proper prop types with TypeScript
- Split large components into smaller, focused ones

## Hooks

- Follow the Rules of Hooks
- Use custom hooks for reusable logic
- Keep hooks focused and simple
- Use appropriate dependency arrays in useEffect
- Implement cleanup in useEffect when needed
- Avoid nested hooks

## State Management

- Use useState for local component state
- Implement useReducer for complex state logic
- Use Context API for shared state
- Keep state as close to where it's used as possible
- Avoid prop drilling through proper state management
- Use state management libraries only when necessary

## Performance

- Implement proper memoization (useMemo, useCallback)
- Use React.memo for expensive components
- Avoid unnecessary re-renders
- Implement proper lazy loading
- Use proper key props in lists
- Profile and optimize render performance

## React 19 Features

- Use `use` hook for consuming Promises and Context directly
- Leverage `useFormStatus` hook for form state management
- Use `useActionState` for form actions and state management
- Implement Document Metadata API for better SEO
- Use Actions for client-side mutations with automatic loading states
- Leverage compiler optimizations like automatic memoization
- Use `ref` as a prop directly without needing `forwardRef`
- Use `useOptimistic` hook for optimistic UI updates
- Use `startTransition` for non-urgent state updates
- Use `useDeferredValue` for deferring UI updates
- Use `useId` for generating unique IDs in server components
- Use `useSyncExternalStore` for subscribing to external stores

## Radix UI & Shadcn

- Implement Radix UI components according to documentation
- Follow accessibility guidelines for all components
- Use Shadcn UI conventions for styling
- Compose primitives for complex components

## Forms

- Use controlled components for form inputs
- Implement proper form validation
- Handle form submission states properly
- Show appropriate loading and error states
- Use form libraries for complex forms
- Implement proper accessibility for forms

## Error Handling

- Implement Error Boundaries
- Handle async errors properly
- Show user-friendly error messages
- Implement proper fallback UI
- Log errors appropriately

## Testing

- Write unit tests for components
- Implement integration tests for complex flows
- Use React Testing Library
- Test user interactions
- Test error scenarios

## Accessibility

- Use semantic HTML elements
- Implement proper ARIA attributes
- Ensure keyboard navigation
- Test with screen readers
- Handle focus management
- Provide proper alt text for images

## Templates

<template name="component">
import React, { memo } from 'react'

interface {{Name}}Props {
className?: string
children?: React.ReactNode
}

export const {{Name}} = memo<{{Name}}Props>(({
className,
children
}) => {
return (

<div className={className}>
{children}
</div>
)
})

{{Name}}.displayName = '{{Name}}'
</template>

<template name="hook">
import { useState, useEffect, useCallback } from 'react'

interface Use{{Name}}Result {
data: {{Type}} | null
loading: boolean
error: Error | null
refresh: () => void
}

export function use{{Name}}(): Use{{Name}}Result {
const [data, setData] = useState<{{Type}} | null>(null)
const [loading, setLoading] = useState(true)
const [error, setError] = useState<Error | null>(null)

const fetchData = useCallback(async () => {
try {
setLoading(true)
setError(null)
// Add fetch logic here
} catch (err) {
setError(err instanceof Error ? err : new Error('Unknown error'))
} finally {
setLoading(false)
}
}, [])

useEffect(() => {
fetchData()
}, [fetchData])

return { data, loading, error, refresh: fetchData }
}
</template>

## Validation

<validation>
forbidden_patterns:
  - pattern: "useEffect\\([^)]*\\[\\]\\s*\\)"
    message: "Empty dependency array may cause stale closures"
    severity: "warning"
  - pattern: "dangerouslySetInnerHTML"
    message: "Avoid dangerouslySetInnerHTML; sanitize if necessary"
    severity: "warning"
  - pattern: "document\\.(getElementById|querySelector)"
    message: "Use React refs instead of direct DOM access"
    severity: "warning"
</validation>

</instructions>

<examples>
<usage_example>
**Component Review**:
```
User: "Review this React component for best practices"
Agent: [Analyzes hooks, memoization, accessibility, and provides feedback]
```
</usage_example>
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Related Skills

react-patterns

16
from diegosouzapw/awesome-omni-skill

Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.

react-observability

16
from diegosouzapw/awesome-omni-skill

Logging, error messages, and debugging patterns for React. Use when adding logging, designing error messages, debugging production issues, or improving code observability. Works for both React web and React Native.

react-nextjs-development

16
from diegosouzapw/awesome-omni-skill

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

react-native-architecture

16
from diegosouzapw/awesome-omni-skill

Build production React Native apps with Expo, navigation, native modules, offline sync, and cross-platform patterns. Use when developing mobile apps, implementing native integrations, or architecti...

react-modernization

16
from diegosouzapw/awesome-omni-skill

Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing React codebases, migrating to React Hooks, or upgrading to...

react

16
from diegosouzapw/awesome-omni-skill

React/Next.jsのプロジェクトで、UI=計算モデル(コンポーネント/状態/レンダリング)を軸に、設計・実装・レビュー・性能改善の判断を整理する。doc/input/rdd.md に「技術スタック React」または「技術スタック Next.js」があるリポジトリ、あるいはReactの状態管理/レンダリング/Server Components/SSR/Streaming/バンドル/パフォーマンス相談で使う。

react-guidelines

16
from diegosouzapw/awesome-omni-skill

React coding guidelines and best practices. MUST follow these rules. Use when reviewing or writing React code or tasks.

react-gradual-architecture

16
from diegosouzapw/awesome-omni-skill

Incremental React code organization guidelines. Start small, then extract when scanning and responsibilities start to blur. Use when creating features, organizing files, refactoring components, or deciding when to extract hooks, UI, or utils.

react-grab

16
from diegosouzapw/awesome-omni-skill

Installs and configures React Grab for visual UI element selection in React/Electron apps. Use when user wants to edit UI visually, select components by hovering, or capture element context.

react-frontend

16
from diegosouzapw/awesome-omni-skill

React components for Chat, Evaluation, Report, Admin with TypeScript, Tailwind, hooks

React Frontend Architecture

16
from diegosouzapw/awesome-omni-skill

Comprehensive guidelines and standards for building scalable React applications, including project structure, component design, state management, and styling.

react-flow-node-ts

16
from diegosouzapw/awesome-omni-skill

Create React Flow node components with TypeScript types, handles, and Zustand integration. Use when building custom nodes for React Flow canvas, creating visual workflow editors, or implementing no...