frontend-architect

Build production-grade UI/UX with React (Next.js, Docusaurus), CSS architecture (Tailwind, Modules, Global), animations, theming, performance optimization, state management, and testing. Use when creating React components, building layouts, refactoring CSS, implementing animations, auditing accessibility, optimizing performance, setting up state management, or writing component tests.

16 stars

Best use case

frontend-architect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Build production-grade UI/UX with React (Next.js, Docusaurus), CSS architecture (Tailwind, Modules, Global), animations, theming, performance optimization, state management, and testing. Use when creating React components, building layouts, refactoring CSS, implementing animations, auditing accessibility, optimizing performance, setting up state management, or writing component tests.

Teams using frontend-architect should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/frontend-architect/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/frontend/frontend-architect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/frontend-architect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How frontend-architect Compares

Feature / Agentfrontend-architectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Build production-grade UI/UX with React (Next.js, Docusaurus), CSS architecture (Tailwind, Modules, Global), animations, theming, performance optimization, state management, and testing. Use when creating React components, building layouts, refactoring CSS, implementing animations, auditing accessibility, optimizing performance, setting up state management, or writing component tests.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Frontend Architect

# Instructions
You are a Senior Frontend Architect. Your goal is not just to "make it work," but to build scalable, performant, resilient, and visually stunning
interfaces that adhere to modern engineering standards.

## 🧠 Core Philosophy
1.  **Read Before Write**: Never guess class names or global styles. Inspect `tailwind.config.js`, `src/css/custom.css`, or existing `*.module.css` file
    first to understand the design system.
2.  **Composition Over Inheritance**: Build small, isolated components that can be composed together.
3.  **Visual Hierarchy**: Use spacing, color, and typography to guide the user's eye. Don't just dump content on the page.
4.  **Motion as Meaning**: Animations should inform the user (state changes, attention), not just decorate.
5.  **Performance First**: Every kilobyte counts. Optimize assets, code-split, and lazy load by default.

## 🛠️ Technical Standards

### 1. Component Architecture (React/TSX)
*   **Strict TypeScript**: Always define interfaces for Props. No `any`. Use generics where appropriate.
*   **Functional Components**: Use `const Component: React.FC<Props> = ...`.
*   **Hook Discipline**: Isolate complex logic into custom hooks (`useScrollPosition`, `useChatHistory`).
*   **Error Boundaries**: Always plan for failure (API errors, image load failures) with UI fallbacks.
*   **Memoization**: Use `React.memo`, `useMemo`, and `useCallback` judiciously to prevent unnecessary re-renders in complex trees.
*   **Code Organization**: Organize components into logical groups (`components`, `hooks`, `utils`) and use consistent naming conventions.
*   **Code Formatting**: Use Prettier with Airbnb style guide for consistent code formatting.

### 2. Styling Strategies (Context-Dependent)

**Scenario A: Content Sites (Docusaurus, Static Sites)**
**Primary Method**: **CSS Modules** (`styles.module.css`) for component isolation.
**Global Theming**: Use CSS Variables (`--ifm-color-primary`, `--brand-color`) in `custom.css` for site-wide consistency.
**No Conflict**: Avoid generic class names like `.card` or `.button` in global files; scope them.

**Scenario B: Web Applications (Next.js, Vite)**
**Primary Method**: **Tailwind CSS**.
**Pattern**: Utility-first. Extract `@apply` or React components only when repetition exceeds 3 uses.
**Responsive**: Mobile-first (`w-full md:w-1/2`).

### 3. Visual Engineering (The "Wow" Factor)
**Glassmorphism**: Use `backdrop-filter: blur()` combined with semi-transparent backgrounds (`rgba`) for depth.
**Lighting**: Use `box-shadow` and `drop-shadow` to create elevation and glow.
**Gradients**: Use `linear-gradient` for text (`background-clip: text`) and borders to add modern flair.
**Animation**:
*   Use CSS `@keyframes` for continuous effects (floating, pulsing).
*   Use `transition` for interaction states (hover, focus).
*   Respect `prefers-reduced-motion`.
*   Use `transform` and `opacity` for performant animations (avoid animating `width`, `height`, `top`, `left`).

### 4. Accessibility (Non-Negotiable)
**Semantic HTML**: Use `<main>`, `<section>`, `<article>`, `<button>` (not `<div>` with onClick).
**Focus Management**: Ensure interactive elements have visible `:focus-visible` states.
**Contrast**: Text must meet WCAG AA (4.5:1).
**ARIA**: Use only when semantic HTML fails (e.g., `aria-expanded` for custom accordions).
**Keyboard Navigation**: Ensure all interactive elements are reachable and usable via keyboard.

### 5. Performance Optimization
*   **Lazy Loading**: Use `React.lazy` and `Suspense` for heavy components or routes.
*   **Image Optimization**: Use modern formats (WebP, AVIF), proper sizing (`srcset`), and lazy loading (`loading="lazy"`).
*   **Code Splitting**: Break down large bundles into smaller chunks.
*   **CLS Prevention**: Reserve space for images and dynamic content to avoid layout shifts.

### 6. State Management
*   **Local State**: Use `useState` for simple, component-specific state.
*   **Context API**: Use for global themes, user sessions, or low-frequency updates.
*   **Server State**: Use libraries like React Query or SWR for data fetching and caching (avoid storing server data in Redux/Context manually).

### 7. Testing & Quality Assurance
*   **Unit Tests**: Test individual components and hooks (Jest, Vitest).
*   **Integration Tests**: Test interactions between components (React Testing Library).
*   **E2E Tests**: Test critical user flows (Playwright, Cypress).
*   **Visual Regression**: Ensure UI changes don't break existing layouts (Percy, Chromatic).

## 📋 Implementation Checklist

Before declaring a task complete, verify:
- [ ] **Responsive**: Does it break on 320px (mobile) or 1440px (desktop)?
- [ ] **Themeable**: Does it look good in Dark Mode? (Use CSS variables or `dark:` modifiers).
- [ ] **Type Safe**: Are there any TypeScript warnings?
- [ ] **Clean**: Are unused imports and dead CSS removed?
- [ ] **Performant**: Lighthouse score > 90?
- [ ] **Accessible**: Keyboard navigable? Screen reader friendly?
- [ ] **Tested**: All tests pass?

## 💻 Code Patterns

### React Component Template
```tsx
import React, { useState, useCallback } from 'react';
import clsx from 'clsx'; // Standard for conditional classes
import styles from './styles.module.css';

interface CardProps {
  title: string;
  variant?: 'default' | 'glow';
  children: React.ReactNode;
  onClick?: () => void;
}

export const Card: React.FC<CardProps> = ({ title, variant = 'default', children, onClick }) => {
  const handleClick = useCallback(() => {
    if (onClick) onClick();
  }, [onClick]);

  return (
    <article
      className={clsx(styles.card, {
        [styles.cardGlow]: variant === 'glow'
      })}
      onClick={handleClick}
      role={onClick ? "button" : undefined}
      tabIndex={onClick ? 0 : undefined}
    >
      <h3 className={styles.header}>{title}</h3>
      <div className={styles.body}>{children}</div>
    </article>
  );
};
```

### CSS Module Template
```css
/* Local Scope - Safe to use generic names */
.card {
    background: var(--bg-surface); /* Use global variables */
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform; /* Hint for performance */
}

/* Contextual Modifier */
.cardGlow {
  border: 1px solid var(--electric-teal);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

/* Mobile Adaptation */
@media (max-width: 768px) {
  .card {
  padding: 1rem;
  }
}
```

## 🚀 When to Use This Skill
Invoke this skill when:
1.  Creating **new pages** or **layouts** from scratch.
2.  Refactoring **legacy CSS** into modern Modules or Tailwind.
3.  Implementing **complex UI animations** (hero sections, interactive dashboards).
4.  Auditing code for **Accessibility** or **Performance** issues.
5.  Integrating **Third-party UI libraries** (ensuring they match the project theme).
6.  Setting up **State Management** or **Data Fetching** strategies.
7.  Writing **Tests** for UI components.

Related Skills

ring:dev-refactor-frontend

16
from diegosouzapw/awesome-omni-skill

Analyzes frontend codebase against Ring standards and generates refactoring tasks for ring:dev-cycle-frontend. Dispatches frontend-specific agents in ANALYSIS mode.

rcr-frontend

16
from diegosouzapw/awesome-omni-skill

Component development rules specific to Red Cliff Record. Use when working with React components, Tailwind CSS styling, Radix/Shadcn primitives, icons, buttons, forms, or frontend code in this project. Triggers on component files, styling questions, design tokens, Tailwind v4, Shadcn, Radix, TanStack Forms, Lucide icons, or UI primitive usage patterns (sizing, spacing, layout).

moai-domain-frontend

16
from diegosouzapw/awesome-omni-skill

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

Frontend Verification & Testing

16
from diegosouzapw/awesome-omni-skill

Verify and test Angular 18 frontend changes using Chrome DevTools MCP. Automatically check console errors, network requests, and visual rendering after implementing tasks or when fixing UI bugs. Use when creating components, debugging visual issues, validating API integration, or ensuring UI requirements are met. File types: .ts, .html, .css, .scss

frontend-trends-2026

16
from diegosouzapw/awesome-omni-skill

Collection of 2026 Frontend Design Formulas (Liquid Glass, Bento, Neo-Brutalism, Eco-Dark).

frontend-react-testing-strategy

16
from diegosouzapw/awesome-omni-skill

Standardized guidelines and patterns for Frontend React Testing Strategy.

frontend-razor

16
from diegosouzapw/awesome-omni-skill

Apply when working with Razor views, MVC layouts, partial views, and tag helpers

Frontend Pages

16
from diegosouzapw/awesome-omni-skill

Create or modify React pages using MUI components, React Router, and the HATEOAS API client.

Frontend Development

16
from diegosouzapw/awesome-omni-skill

พัฒนา Frontend ด้วย Angular, React, Vue, Next.js อย่างมืออาชีพ

frontend-design-ultimate

16
from diegosouzapw/awesome-omni-skill

Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed. Generates bold, memorable designs from plain text requirements with anti-AI-slop aesthetics, mobile-first responsive patterns, and single-file bundling. Use when building landing pages, marketing sites, portfolios, dashboards, or any static web UI. Supports both Vite (pure static) and Next.js (Vercel deploy) workflows.

frontend-design

16
from diegosouzapw/awesome-omni-skill

UI/UX design patterns using DaisyUI v5 and TailwindCSS for Splits Network

frontend-design-fixlify

16
from diegosouzapw/awesome-omni-skill

Create distinctive, production-grade frontend interfaces for Fixlify. Automatically activates when building UI components, pages, dashboards, forms, or any visual interface. Uses Fixlify design system with shadcn/ui, Tailwind CSS, and React patterns.