RE

react-components

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.zip

Installs 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.
183 chars✓ has a “when” trigger
Intermediate

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

You give it
React component requirements
You get back
React component adhering to UI conventions and standards

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. Use alpha() and darken() from @mui/material/styles for transparency or shade variations. For category-specific colors use theme.palette.requestTypeColors, theme.palette.recognitionTypeColors, and the CATEGORY_COLORS utility in utils/categoryColors.ts. If a required color doesn't exist, add it to apps/web/src/theme/palette.ts (and augment the type in undp-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, and useCallback. Only reach for useCallback when the consumer is memoized or the function lands in a hook dependency array — never wrap a bare setState.
  • 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-fns with 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.

SkillInstallsUpdatedSafetyDifficulty
react-components (this skill)01moNo flagsIntermediate
screenshot-to-code2041moNo flagsBeginner
web-artifacts-builder493moReviewIntermediate
frontend-ui-dark-ts43moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry