Skip to main content
skill CX Codex

react · mindrally — Claude Code skill: React coding rules for agents

This skill gives your agent a fixed React style: hooks, Server Components, Tailwind, TypeScript. Useful when several people or agents touch the same codebase.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill react -a claude-code
Open on GitHub

What react does

The skill turns the assistant into a senior front-end developer covering ReactJS, NextJS, JavaScript and TypeScript. It ships as a set of rules the agent follows while writing components: early returns instead of nested conditions, Tailwind classes for all styling, the class: prefix instead of ternaries in class attributes, handle-prefixed event handler names, accessibility on every interactive element.

Components are declared with the function keyword but assigned as const. Directories and files use kebab-case, exports are named, and the file order is fixed: component, subcomponents, helpers, static content, types. On state and performance the skill advises skipping 'use client' where React Server Components will do, wrapping client components in Suspense with fallbacks, and using dynamic imports for code splitting.

TypeScript runs in strict mode, interfaces beat types, enums are replaced with maps. If your project already has a linter that disagrees with these rules, the agent will keep pulling code toward the skill — worth checking your configs before installing.

What it helps with

  • keep components in one style without manual review
  • order a file as component, subcomponents, types
  • drop unnecessary 'use client' and keep Server Components
  • memoize callbacks with useCallback
  • add ARIA and keyboard navigation to interactive elements

Example prompts for the agent

  • Generate a login form component following the react skill rules
  • Refactor this component: remove 'use client' if it isn't needed
  • Split this page into Server Components and move the client part into Suspense

How to install react

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill react -a claude-code

2Manually: put the files in place

~/.claude/skills/react/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/react/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about react

How do I install the react skill in Claude?

Run npx skills add Mindrally/skills --skill react -a claude-code. The skill lands at ~/.claude/skills/react/SKILL.md.

What does the react skill do?

It describes React development rules to the agent: component structure, state and performance handling, TypeScript integration.

Which frameworks and libraries does the skill cover?

ReactJS, NextJS, TypeScript, TailwindCSS, Shadcn and Radix.

Source text

SKILL.md · Apache-2.0
---
name: react
description: Expert in React development with modern patterns, hooks, and performance optimization
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# React

You are a senior front-end developer specializing in ReactJS, NextJS, JavaScript, TypeScript, HTML, CSS, and modern UI/UX frameworks like TailwindCSS, Shadcn, and Radix.

## Code Implementation Guidelines

- Use early returns whenever possible to make the code more readable
- Apply Tailwind classes exclusively for styling; avoid traditional CSS
- Use the "class:" prefix instead of ternary operators in class attributes
- Employ descriptive naming conventions with "handle" prefixes for event handlers
- Implement accessibility features on all interactive elements

## Component Development

- Define components using the `function` keyword rather than arrow functions
- Prefer `const` declarations for functions (e.g., `const toggle = () =>`)
- Structure files with exported components first, followed by subcomponents, helpers, static content, and types
- Use kebab-case for directory and file names (`components/auth-wizard`)
- Favor named exports for components

## State & Performance

- Minimize `'use client'` directives; favor React Server Components
- Implement `useCallback` for memoizing callback functions
- Use `useMemo` for expensive computations
- Wrap client components in Suspense with fallbacks
- Use dynamic imports for code splitting

## Best Practices

- Follow functional and declarative programming patterns
- Avoid unnecessary complexity and code duplication
- Use TypeScript with strict mode enabled
- Implement comprehensive error handling with user-friendly messages
- Ensure full keyboard navigation and ARIA attributes for accessibility

## TypeScript Integration

- Use TypeScript for all code; prefer interfaces over types
- Avoid enums; use maps instead
- Use functional components with TypeScript interfaces

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Frontend and UI →

react by other authors comes first.

react vercel-labs This skill turns json-render JSON specs into React component trees. Use it when building JSON-driven UIs or defining a component catalog for generated specs. CX Codex +1 16,300installs react pproenca A skill with 49 React 19 rules and a codebase review algorithm. Useful when writing components, migrating from React 18, or auditing a repo. CX Codex +1 489installs typescript-nodejs-nextjs-react-ui-css-cursorrules- PatrickJS A Cursor rule that pins down how the agent writes TypeScript, Next.js App Router, React and Tailwind code. Useful when generated components drift from your conventions. ★ 41,011repo stars nextjs-react-typescript-cursorrules-prompt-file PatrickJS A Cursor rule that tells the agent how to write code in Next.js 14 App Router, React and TypeScript projects. ★ 41,011repo stars react-patterns giuseppe-trisciuoglio Teaches your agent React 19 and Next.js App Router patterns: Server Components, Server Actions, useOptimistic, Suspense boundaries. Useful when the app is already on React 19. CX Codex +1 4,800installs react-expert https://github.com/Jeffallan A skill for React 18+, Next.js App Router, and create-react-app work. It writes components and hooks, debugs rendering, and migrates class components to functions. CX Codex +1 5,500installs bencium-code-conventions bencium Sets Bence's conventions for React and Next.js projects, covering the stack, code style, tests and workflow. Use it when building or setting up work under those rules. CX Codex +1 3,300installs data-viz-2025 curiositech A skill for React, Next.js and TypeScript projects: helps build interactive charts, dashboards and data stories with Tailwind CSS. CX Codex +1 304installs

From the same set214

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor