Skip to content
affaan-m avatar

Frontend Patterns

Patterns for React and Next.js covering components, custom hooks, state management, and render performance.

CCM score
65 of 100
skills.sh installs
17.6K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers composition and compound components, render props, custom hooks, Context with reducers, and memoization techniques
  • Includes worked examples for Card, Tabs, DataLoader, useToggle, useQuery, useDebounce, and a MarketProvider reducer
  • Warns that a fetcher or options object recreated each render can trigger an infinite refetch loop, and shows ref-based stability
  • Designed for building or reviewing React and Next.js components, state, and render performance

Install

$ npx -y skills add affaan-m/ecc --skill frontend-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Frontend Development Patterns

Modern frontend patterns for React, Next.js, and performant user interfaces.

When to Activate

  • Building React components (composition, props, rendering)
  • Managing state (useState, useReducer, Zustand, Context)
  • Implementing data fetching (SWR, React Query, server components)
  • Optimizing performance (memoization, virtualization, code splitting)
  • Working with forms (validation, controlled inputs, Zod schemas)
  • Handling client-side routing and navigation
  • Building accessible, responsive UI patterns

Component Patterns

Composition Over Inheritance

// PASS: GOOD: Component composition
interface CardProps {
  children: React.ReactNode
  variant?: 'default' | 'outlined'
}

export function Card({ children, variant = 'default' }: CardProps) {
  return <div className={`card card-${variant}`}>{children}</div>
}

export function CardHeader({ children }: { children: React.ReactNode }) {
  return <div className="card-header">{children}</div>
}

export function CardBody({ children }: { children: React.ReactNode }) {
  return <div className="card-body">{children}</div>
}

Details

Repository
github.com/affaan-m/ecc
Category
Frontend & UI Code
First seen
Jul 14, 2026

Questions

What does the frontend-patterns skill do for Claude Code?

The frontend-patterns skill gives the agent patterns for React and Next.js, covering component composition, custom hooks, state management, and render performance. It applies when building or reviewing React or Next.js components, state, or render performance.

Is frontend-patterns a good skill for React and Next.js work?

It sits in the Frontend and UI Code category, where it ranks in the top 100. Its other topics include data fetching, forms with Zod schemas, client-side routing, and accessible responsive UI patterns.

How do I install the frontend-patterns skill?

Run npx -y skills add affaan-m/ecc --skill frontend-patterns -y in a project to install it. Once installed, the agent can apply React and Next.js component, state, and performance patterns to your code.

Which skills lead frontend-patterns in its category?

The category leaders include vercel-react-best-practices, web-design-guidelines, design-taste-frontend, and vercel-composition-patterns. frontend-patterns focuses on general React, Next.js, state, and performance patterns with worked code examples.

More from affaan-m/ecc

All 257

Similar to Frontend Patterns

More Frontend & UI Code