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.
npx skills add Mindrally/skills --skill react -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/react/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/react/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react -a codex2Manually: put the files in place
.agents/skills/react/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react -a cursor2Manually: put the files in place
.cursor/skills/react/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills react2Manually: put the files in place
.github/skills/react/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path reactManually: put the files in place
.devin/skills/react/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.