react-skills
Implements React 18 standards and LlamaFarm-specific patterns for component architecture.
Install
mkdir -p .claude/skills/react-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7412" && unzip -o skill.zip -d .claude/skills/react-skills && rm skill.zipInstalls to .claude/skills/react-skills
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
React 18 patterns for LlamaFarm Designer. Covers components, hooks, TanStack Query, and testing.Key capabilities
- →Compose React 18 components using Radix UI primitives
- →Implement server state management via TanStack Query v5
- →Apply TypeScript patterns for React composition
- →Structure tests with Vitest/React Testing Library
- →Use style utilities for Tailwind class merging
How it works
It applies strict organizational and coding protocols defined for the Designer subsystem when generating or editing React files.
Inputs & outputs
When to use react-skills
- →Build components using Radix UI primitives
- →Manage server state with TanStack Query
- →Apply React 18 strict mode patterns
- →Structure tests with Vitest
About this skill
React Skills for LlamaFarm Designer
Best practices and patterns for React 18 development in the Designer subsystem.
Tech Stack
- React 18.2 with StrictMode
- TypeScript 5.2+ for type safety
- TanStack Query v5 for server state management
- React Router v7 for client-side routing
- TailwindCSS with
tailwind-mergeandclsxfor styling - Radix UI primitives for accessible components
- Vite for build tooling
- Vitest + React Testing Library for testing
Directory Structure
designer/src/
api/ # API service functions
components/ # React components (feature-organized)
contexts/ # React context providers
hooks/ # Custom hooks
lib/ # Utility functions (cn, etc.)
types/ # TypeScript type definitions
utils/ # Helper functions
test/ # Test utilities and mocks
Core Patterns
Component Composition
- Use composition over inheritance
- Prefer small, focused components
- Use
forwardReffor components that wrap DOM elements - Apply
displayNameto forwardRef components for DevTools
State Management
- Local UI state:
useState,useReducer - Server state: TanStack Query (
useQuery,useMutation) - Shared UI state: React Context with custom hooks
- Form state: Controlled components with validation
Hooks
- Follow Rules of Hooks (top-level, consistent order)
- Create custom hooks for reusable logic
- Use query key factories for TanStack Query
- Memoize expensive computations with
useMemo - Stabilize callbacks with
useCallback
Styling
- Use
cn()fromlib/utilsto merge Tailwind classes - Use
cva(class-variance-authority) for component variants - Follow dark mode conventions with
dark:prefix
Related Guides
- components.md - Component patterns
- hooks.md - Hook patterns and rules
- state.md - State management patterns
- performance.md - Performance optimization
- security.md - Security best practices
Quick Reference
// Utility for merging Tailwind classes
import { cn } from '@/lib/utils'
cn('base-class', condition && 'conditional-class', className)
// Query key factory pattern
export const projectKeys = {
all: ['projects'] as const,
lists: () => [...projectKeys.all, 'list'] as const,
list: (ns: string) => [...projectKeys.lists(), ns] as const,
}
// Context with validation hook
const MyContext = createContext<MyContextType | undefined>(undefined)
export function useMyContext() {
const ctx = useContext(MyContext)
if (!ctx) throw new Error('useMyContext must be within MyProvider')
return ctx
}
Testing
import { renderWithProviders } from '@/test/utils'
import { screen } from '@testing-library/react'
test('renders component', () => {
renderWithProviders(<MyComponent />)
expect(screen.getByText('Hello')).toBeInTheDocument()
})
When not to use it
- →React applications using legacy Class components
- →Non-TypeScript React projects
Prerequisites
Limitations
- →Requires developer familiarity with Radix UI
- →Restricted to specific library versions
How it compares
It enforces strict design subsystem patterns rather than generic React best practices.
Compared to similar skills
react-skills side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| react-skills (this skill) | 1 | 7mo | No flags | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| frontend-testing | 11 | 3mo | Review | Intermediate |
| feature-flags | 6 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by llama-farm
View all by llama-farm →You might also like
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
frontend-testing
langgenius
Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
react-hook-form-writer
dust-tt
Write and refactor React forms using react-hook-form with Zod validation. Use when creating new form components, converting existing forms to react-hook-form, or implementing form validation patterns.
ui-testing
alinaqi
Visual testing - catch invisible buttons, broken layouts, contrast
react-web
alinaqi
React web development with hooks, React Query, Zustand