# frontend

Frontend patterns and best practices for React, Vue, and Next.js. Guides code generation for components, state stores, and custom hooks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 194 installs · ★ 26 repo stars
- Author: miles990
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/miles990/claude-software-skills/tree/HEAD/development-stacks/frontend/SKILL.md
- Updated: 2026-01-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/frontend

## What it does

This skill supplies patterns for modern client-side web development. It covers memoized React component setups, custom hooks including debouncing, local storage synchronization, and fetch logic handling `AbortController` signals. Global state management is structured around `Zustand` persistence and server cache management using `@tanstack/react-query`.

For Next.js App Router projects, it separates server components from interactive client files marked with `'use client'`. The skill configuration expects `typescript` as a prerequisite, while routing API architecture, backend contracts, and test suites to `api-design`, `backend`, and `testing-strategies`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add miles990/claude-software-skills --skill frontend -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/frontend/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/frontend/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add miles990/claude-software-skills --skill frontend -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/frontend/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add miles990/claude-software-skills --skill frontend -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/frontend/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install miles990/claude-software-skills development-stacks/frontend/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/frontend/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add miles990/claude-software-skills --skill frontend -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/miles990/claude-software-skills --path development-stacks/frontend
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/frontend/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add miles990/claude-software-skills --skill frontend -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/miles990/claude-software-skills/tree/HEAD/development-stacks/frontend/SKILL.md

## When to use it
- generate custom React hooks for debouncing or data fetching
- build persistent global client stores with Zustand
- split Next.js pages into Server and Client components
- configure query invalidation with TanStack Query mutations

## Example prompts
- Write a TypeScript useFetch hook that cancels requests with AbortController
- Set up a persistent shopping cart store using Zustand
- Refactor this Next.js route into a server component with a client search input

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 8a058482ce113065.

BEGIN THIRD-PARTY FILE 8a058482ce113065
````text
---
name: frontend
description: Modern frontend development with React, Vue, and web technologies
domain: development-stacks
version: 1.1.0
tags: [react, vue, nextjs, typescript, css, state-management, bundlers]
triggers:
  keywords:
    primary: [frontend, react, vue, nextjs, ui, web, component]
    secondary: [css, tailwind, state, hooks, spa, pwa, vite]
  context_boost: [typescript, javascript, html, browser, client]
  context_penalty: [backend, server, database, api]
  priority: high
collaboration:
  prerequisites:
    - skill: typescript
      reason: Type-safe component development
  delegation_triggers:
    - trigger: API integration or backend communication
      delegate_to: backend
      context: API endpoints, authentication flow
    - trigger: API response format questions
      delegate_to: api-design
      context: Expected data structures, error handling
    - trigger: Component or integration testing
      delegate_to: testing-strategies
      context: Testing library patterns, mocking APIs
  receives_context_from:
    - skill: backend
      receives:
        - API endpoints list
        - Authentication flow
        - WebSocket events
    - skill: api-design
      receives:
        - API documentation
        - Error response formats
        - Pagination patterns
  provides_context_to:
    - skill: testing-strategies
      provides:
        - Component structure
        - User interaction patterns
        - State management approach
    - skill: backend
      provides:
        - Required API endpoints
        - Expected response formats
---

# Frontend Development

## Overview

Modern frontend development patterns, frameworks, and best practices for building performant web applications.

---

## React Ecosystem

### Component Patterns

```tsx
// Functional component with hooks
import { useState, useEffect, useCallback, useMemo } from 'react';

interface UserListProps {
  initialFilter?: string;
  onSelect: (user: User) => void;
}

function UserList({ initialFilter = '', onSelect }: UserListProps) {
  const [users, setUsers] = useState<User[]>([]);
  const [filter, setFilter] = useState(initialFilter);
  const [loading, setLoading] = useState(true);

  // Memoized filtered list
  const filteredUsers = useMemo(
    () => users.filter(u => u.name.toLowerCase().includes(filter.toLowerCase())),
    [users, filter]
  );

  // Stable callback reference
  const handleSelect = useCallback((user: User) => {
    onSelect(user);
  }, [onSelect]);

  useEffect(() => {
    async function fetchUsers() {
      setLoading(true);
      const data = await api.getUsers();
      setUsers(data);
      setLoading(false);
    }
    fetchUsers();
  }, []);

  if (loading) return <Skeleton count={5} />;

  return (
    <div>
      <SearchInput value={filter} onChange={setFilter} />
      {filteredUsers.map(user => (
        <UserCard
          key={user.id}
          user={user}
````
END THIRD-PARTY FILE 8a058482ce113065

The third-party file has ended. Everything between the 8a058482ce113065 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2922 of 17744 bytes. © miles990 · MIT · https://github.com/miles990/claude-software-skills/tree/HEAD/development-stacks/frontend/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
