# Frontend patterns

> Frontend patterns is an open-source agent skill for developer tools. Gives your agent React, Next.js, state and performance patterns for building UIs. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/Fmarzochi/EGC/tree/main/.agents/skills/frontend-patterns
- **Repository:** https://github.com/fmarzochi/egc
- **GitHub stars:** 71
- **License:** Apache-2.0
- **Skill name:** frontend-patterns
- **Collection:** https://github.com/Fmarzochi/EGC
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill is a reference of frontend coding patterns that an agent applies when building React components or Next.js interfaces. It covers component composition, compound components, render props, custom hooks for toggles, async fetching and debouncing, reducer-based state with context, memoization, code splitting, list virtualization, controlled forms with validation, error boundaries, animation with Framer Motion, and keyboard and focus handling for accessibility.

The examples are written in TypeScript and are meant to be adapted rather than copied directly. The skill also sets privacy guidance: it asks the agent to use synthetic or domain-generic data in examples, avoid logging or displaying sensitive personal data, and avoid adding analytics or third-party scripts without approval.

The skill expects a React or Next.js project. Some patterns reference libraries such as Zustand, SWR, React Query, Zod and TanStack Virtual, so those packages are needed when the corresponding pattern is used.

## When your agent uses it

> Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Fmarzochi/EGC/tree/HEAD/.agents/skills/frontend-patterns)
- [License: Apache-2.0](https://github.com/Fmarzochi/EGC/tree/HEAD/.agents/skills/frontend-patterns)

## Features

- **Component composition patterns:** Shows how to build flexible components using children, compound components and render props.
- **Custom hooks library:** Provides reusable hooks for toggles, async data fetching and debounced values.
- **State management with reducers:** Describes context plus reducer setups for sharing application state across components.
- **Performance optimization techniques:** Covers memoization, lazy loading with Suspense and virtualized long lists.
- **Form validation patterns:** Explains controlled inputs with field-level validation and error messages.
- **Accessibility and focus handling:** Demonstrates keyboard navigation in dropdowns and focus management in modals.

## Good for

- Refactor a React component to use compound components
- Add debounced search to an input field in Next.js
- Set up a virtualized list for a large dataset
- Build a validated form with controlled inputs
- Add an error boundary around a dashboard section
- Make a dropdown keyboard-accessible

## Install

### Claude Code

This skill ships in the `egc` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Fmarzochi/EGC
/plugin install egc@egc
```

Or copy only this skill to `~/.claude/skills/frontend-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/frontend-patterns &&
cp -R "$tmp/.agents/skills/frontend-patterns" ~/.claude/skills/frontend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/frontend-patterns` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/frontend-patterns` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/frontend-patterns &&
cp -R "$tmp/.agents/skills/frontend-patterns" ~/.agents/skills/frontend-patterns &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/frontend-patterns` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/frontend-patterns` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/frontend-patterns &&
cp -R "$tmp/.agents/skills/frontend-patterns" ~/.cursor/skills/frontend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/frontend-patterns` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Fmarzochi/EGC.git --path .agents/skills/frontend-patterns
```

Or copy the folder to `~/.gemini/skills/frontend-patterns` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/frontend-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/frontend-patterns &&
cp -R "$tmp/.agents/skills/frontend-patterns" ~/.copilot/skills/frontend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/frontend-patterns` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Fmarzochi/EGC.git
```

Then copy `EGC/.agents/skills/frontend-patterns` into your agent's skills folder as `frontend-patterns`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Frontend patterns need to run?

It has no scripts. It is a set of instructions and code examples for React and Next.js projects, written in TypeScript.

### Does Frontend patterns change any files on its own?

It has no scripts or tools of its own. It guides the agent's code suggestions when frontend work matches its described topics.

### When does the agent use Frontend patterns?

When the task involves building React components, managing state, fetching data, optimizing performance, working with forms, routing, or building accessible responsive UI.

### How do I install Frontend patterns in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/frontend-patterns to use it in all your projects, or to .claude/skills/frontend-patterns in one project. Or install the egc plugin, which includes it: /plugin marketplace add Fmarzochi/EGC, then /plugin install egc@egc.

### Does Frontend patterns run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Frontend patterns?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Frontend patterns?

The closest alternatives to Frontend patterns are Frontend UI engineering, Frontend UI engineering, React frontend, React patterns and Premium frontend UI.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Frontend UI engineering](https://ai-powered.com/skills/frontend-ui-engineering-ajyadav013-2): Frontend UI engineering is an open-source agent skill for developer tools.
- [Frontend UI engineering](https://ai-powered.com/skills/frontend-ui-engineering): Frontend UI engineering is an open-source agent skill for developer tools.
- [React frontend](https://ai-powered.com/skills/react-frontend): React frontend is an open-source agent skill for developer tools.
- [React patterns](https://ai-powered.com/skills/react-patterns-tonyghiani): React patterns is an open-source agent skill for developer tools.
- [Premium frontend UI](https://ai-powered.com/skills/premium-frontend-ui): Premium frontend UI is an open-source agent skill for design and media.
- [Frontend engineering edho ferdian](https://ai-powered.com/skills/frontend-engineering-edho-ferdian): Frontend engineering edho ferdian is an open-source agent skill for developer tools.
- [Frontend design](https://ai-powered.com/skills/frontend-design-lichamnesia): Frontend design is an open-source agent skill for design and media.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns-fmarzochi): Backend patterns is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/frontend-patterns-fmarzochi
