Enforces strict UI and coding standards for React projects to ensure maintainability and theme consistency.
Install
mkdir -p .claude/skills/react-components-undp && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17413" && unzip -o skill.zip -d .claude/skills/react-components-undp && rm skill.zipInstalls to .claude/skills/react-components-undp
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 + UI conventions for apps/web (MUI v7 + Tailwind). Use when building or editing a React component — structure, theme colors, memoization, filter state, and Spanish-only UI text.Key capabilities
- →Structure React components with one component per file
- →Handle loading, error, and edge cases with early returns
- →Use theme colors from `theme.palette.*`
- →Prevent unnecessary re-renders with `React.memo`, `useMemo`, and `useCallback`
- →Store screen-level filter selections in URL query params
- →Ensure all user-facing text is in Spanish
How it works
The skill guides the creation and editing of React components by enforcing rules for file structure, error handling, styling with theme colors, memoization, and state management. It also specifies language requirements.
Inputs & outputs
When to use react-components
- →Build new React component according to standards
- →Refactor UI for theme consistency
- →Optimize component re-renders
About this skill
Frontend & React Rules
- One component per file: each React component must live in its own file. Do not define multiple components or subcomponents in the same file.
- Early returns: handle loading, error, and edge cases with early returns at the top of the component rather than nesting the main content inside conditionals.
- Avoid excessive ternaries in JSX: prefer early returns or intermediate variables over inline ternary expressions in the render tree. A simple one-line ternary is acceptable; extract anything more complex.
- UI stack: MUI v7 + Tailwind CSS. Follow existing patterns for styling.
- Use theme colors, never hardcoded values: reference colors from the theme (
theme.palette.*) instead of ad-hoc hex/rgb literals. Usealpha()anddarken()from@mui/material/stylesfor transparency or shade variations. For category-specific colors usetheme.palette.requestTypeColors,theme.palette.recognitionTypeColors, and theCATEGORY_COLORSutility inutils/categoryColors.ts. If a required color doesn't exist, add it toapps/web/src/theme/palette.ts(and augment the type inundp-huella-latam.theme.d.ts) rather than hardcoding it inline. - Avoid prop drilling: when data is needed across many component levels, use the Context API or an external state library like Zustand instead of passing props through intermediate components.
- Memoization: prevent unnecessary re-renders with
React.memo,useMemo, anduseCallback. Only reach foruseCallbackwhen the consumer is memoized or the function lands in a hook dependency array — never wrap a baresetState. - Screen filter state in query params: store screen-level filter selections (header dropdowns, search inputs) in URL query params, not local component state. This makes filters shareable, bookmarkable, and persistent across navigation.
- Status chips: every status chip must show a tooltip; the tooltip text is required in the centralized chip config.
- Language: all user-facing text is in Spanish (no i18n library). Dates use
date-fnswith the Spanish locale (es). Labels, placeholders, error messages, tooltips, and button text are all in Spanish.
When not to use it
- →Defining multiple components or subcomponents in the same file
- →Using hardcoded color values
- →Prop drilling when data is needed across many component levels
Limitations
- →Requires MUI v7 + Tailwind CSS
- →All user-facing text must be in Spanish
- →Does not support multiple components per file
How it compares
This skill provides specific conventions for React component architecture, styling with MUI v7 and Tailwind, state management, and internationalization (Spanish-only), offering a standardized approach beyond generic React development.
Compared to similar skills
react-components side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| react-components (this skill) | 0 | 1mo | No flags | Intermediate |
| screenshot-to-code | 204 | 1mo | No flags | Beginner |
| web-artifacts-builder | 49 | 3mo | Review | Intermediate |
| frontend-ui-dark-ts | 4 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
screenshot-to-code
OneWave-AI
Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.
web-artifacts-builder
anthropics
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
frontend-ui-dark-ts
microsoft
Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.
gaming-ui-state-management
TheOrcDev
Patterns for game-like interfaces - health bars, XP bars, mana bars. Apply when building RPG/retro gaming UI components with state-driven visuals.
designer-skills
llama-farm
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
heroui-react
heroui-inc
HeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when working with HeroUI components, installing HeroUI, customizing HeroUI themes, or accessing HeroUI component documentation. Keywords: HeroUI, Hero UI, heroui, @heroui/react, @heroui/styles.