본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)33k · #8758

frontend-dev-guidelines

하는 일

이 스킬은 AI 에이전트에게 최신 React 개발 지침을 제공합니다. 일관된 구조와 좋은 성능을 원하며 React 앱을 만드는 개발자를 위한 것입니다.

사용하는 경우

  • ✓새 React 컴포넌트, 페이지 또는 기능을 만들 때.
  • ✓데이터를 불러오고, 라우팅을 설정하거나, MUI로 컴포넌트를 스타일링할 때.
  • ✓React 앱의 성능을 개선하고 싶은 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/frontend-dev-guidelines/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/frontend-dev-guidelines/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 React 앱에 데이터를 불러오고 우리 파일 구조를 따르는 새 청구서 페이지를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 컴포넌트와 기능에 대한 체크리스트를 따릅니다. 여기에는 지연 로딩, Suspense 기반 데이터 가져오기, 정해진 폴더 구조가 포함됩니다. 그다음 이 패턴에 맞는 코드를 씁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Frontend Development Guidelines

Purpose

Comprehensive guide for modern React development, emphasizing Suspense-based data fetching, lazy loading, proper file organization, and performance optimization.

When to Use This Skill

  • Creating new components or pages
  • Building new features
  • Fetching data with TanStack Query
  • Setting up routing with TanStack Router
  • Styling components with MUI v7
  • Performance optimization
  • Organizing frontend code
  • TypeScript best practices

Quick Start

New Component Checklist

Creating a component? Follow this checklist:

  • Use React.FC<Props> pattern with TypeScript
  • Lazy load if heavy component: React.lazy(() => import())
  • Wrap in <SuspenseLoader> for loading states
  • Use useSuspenseQuery for data fetching
  • Import aliases: @/, ~types, ~components, ~features
  • Styles: Inline if <100 lines, separate file if >100 lines
  • Use useCallback for event handlers passed to children
  • Default export at bottom
  • No early returns with loading spinners
  • Use useMuiSnackbar for user notifications

New Feature Checklist

Creating a feature? Set up this structure:

  • Create features/{feature-name}/ directory
  • Create subdirectories: api/, components/, hooks/, helpers/, types/
  • Create API service file: api/{feature}Api.ts
  • Set up TypeScript types in types/
  • Create route in routes/{feature-name}/index.tsx
  • Lazy load feature components
  • Use Suspense boundaries
  • Export public API from feature index.ts

Import Aliases Quick Reference

Alias Resolves To Example
@/ src/ import { apiClient } from '@/lib/apiClient'
~types src/types import type { User } from '~types/user'
~components src/components import { SuspenseLoader } from '~components/SuspenseLoader'
~features src/features import { authApi } from '~features/auth'

Defined in: vite.config.ts lines 180-185


Common Imports Cheatsheet

// React & Lazy Loading
import React, { useState, useCallback, useMemo } from 'react';
const Heavy = React.lazy(() => import('./Heavy'));

// MUI Components
import { Box, Paper, Typography, Button, Grid } from '@mui/material';
import type { SxProps, Theme } from '@mui/material';

// TanStack Query (Suspense)
import { useSuspenseQuery, useQueryClient } from '@tanstack/react-query';

// TanStack Router
import { createFileRoute } from '@tanstack/react-router';

// Project Components
import { SuspenseLoader } from '~components/SuspenseLoader';

// Hooks
import { useAuth } from '@/hooks/useAuth';
import { useMuiSnackbar } from '@/hooks/useMuiSnackbar';

// Types
import type { Post } from '~types/post';

Topic Guides

🎨 Component Patterns

Modern React components use:

  • React.FC<Props> for type safety
  • React.lazy() for code splitting
  • SuspenseLoader for loading states
  • Named const + default export pattern

Key Concepts:

  • Lazy load heavy components (DataGrid, charts, editors)
  • Always wrap lazy components in Suspense
  • Use SuspenseLoader component (with fade animation)
  • Component structure: Props → Hooks → Handlers → Render → Export

📖 Complete Guide: resources/component-patterns.md


📊 Data Fetching

PRIMARY PATTERN: useSuspenseQuery

  • Use with Suspense boundaries
  • Cache-first strategy (check grid cache before API)
  • Replaces isLoading checks
  • Type-safe with generics

API Service Layer:

  • Create features/{feature}/api/{feature}Api.ts
  • Use apiClient axios instance
  • Centralized methods per feature
  • Route format: /form/route (NOT /api/form/route)

📖 Complete Guide: resources/data-fetching.md


📁 File Organization

features/ vs components/:

  • features/: Domain-specific (posts, comments, auth)
  • components/: Truly reusable (SuspenseLoader, CustomAppBar)

Feature Subdirectories:

features/
  my-feature/
    api/          # API service layer
    components/   # Feature components
    hooks/        # Custom hooks
    helpers/      # Utility functions
    types/        # TypeScript types

📖 Complete Guide: resources/file-organization.md


🎨 Styling

Inline vs Separate:

  • <100 lines: Inline `const styles: Record<string, SxProp
자주 묻는 질문

어떤 데이터 가져오기 방식을 쓰나요?

TanStack Query와 useSuspenseQuery를 사용하는 Suspense 기반 데이터 가져오기를 씁니다.

어떤 스타일링 라이브러리를 다루나요?

MUI 버전 7의 스타일링을 다룹니다.

기능 폴더는 어떻게 구성되나요?

각 기능은 API 호출, 컴포넌트, 훅, 헬퍼, 타입을 위한 하위 폴더를 가진 자체 폴더를 가집니다.

상세 정보

작성자의 원본 설명

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8758
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬