Agent skill

Component Patterns

by revfactory in revfactory/harness-100

React/Next.js 컴포넌트 설계 패턴 라이브러리. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passedFrontend & Design

Install Component Patterns

skills CLI
$ npx skills add revfactory/harness-100 --skill component-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 component-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/16-fullstack-webapp/.claude/skills/component-patterns .claude/skills/component-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
component-patterns
GitHub stars
1.3k
Token cost
~1.1k tokens
SKILL.md length
411 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

React/Next.js 컴포넌트 설계 패턴 라이브러리. An agent skill from revfactory/harness-100.

  • Works in 6 steps: Compound Components → Render Props / Children as Function → Custom Hooks (추출 패턴) → …
  • Tasks that involve State management
  • SKILL.md covers 대상 에이전트, 컴포넌트 설계 패턴, 상태관리 전략 선택 가이드 and Next.js App Router 폴더 구조, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Component Patterns is an agent skill from revfactory/harness-100. React/Next.js 컴포넌트 설계 패턴 라이브러리. Compound/Render Props/HOC/Custom Hooks 패턴, 상태관리 전략(Zustand/React Query/Context), 폴더 구조 컨벤션을 제공하는 frontend-dev 확장 스킬. '컴포넌트 패턴', 'React 패턴', '상태관리', '폴더 구조', 'Custom Hook', '컴포넌트 분리' 등 프론트엔드 아키텍처 설계 시 사용한다. 단, 실제 코드 구현이나 백엔드 로직은 이 스킬의 범위가 아니다.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering State management. It works with React, TanStack, Next.js and Zustand. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve State management

Example prompts

  • “React 패턴”
  • “Custom Hook”
  • “/component-patterns”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Compound Components
  2. Render Props / Children as Function
  3. Custom Hooks (추출 패턴)
  4. Container/Presentational 분리
  5. Higher-Order Component (HOC)
  6. Headless Component

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Component Patterns loads about 1.1k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 411 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 411 words, ~1,078 tokens.

Download SKILL.mdSave it as .claude/skills/component-patterns/SKILL.md (or your agent's skills folder).
name
component-patterns
description
React/Next.js 컴포넌트 설계 패턴 라이브러리. Compound/Render Props/HOC/Custom Hooks 패턴, 상태관리 전략(Zustand/React Query/Context), 폴더 구조 컨벤션을 제공하는 frontend-dev 확장 스킬. '컴포넌트 패턴', 'React 패턴', '상태관리', '폴더 구조', 'Custom Hook', '컴포넌트 분리' 등 프론트엔드 아키텍처 설계 시 사용한다. 단, 실제 코드 구현이나 백엔드 로직은 이 스킬의 범위가 아니다.

Component Patterns — React/Next.js 컴포넌트 설계 패턴

frontend-dev 에이전트가 프론트엔드 개발 시 활용하는 컴포넌트 패턴, 상태관리 전략, 프로젝트 구조 레퍼런스.

대상 에이전트

frontend-dev — 이 스킬의 패턴을 컴포넌트 설계와 상태관리에 직접 적용한다.

컴포넌트 설계 패턴

1. Compound Components

부모-자식이 암묵적 상태를 공유하는 패턴.

적합: Tab, Accordion, Dropdown, Select 등 복합 UI 구조: <Select> + <Select.Trigger> + <Select.Option> 핵심: Context로 상태 공유, children으로 유연한 구성

2. Render Props / Children as Function

렌더링 로직을 외부에 위임.

적합: 데이터 fetching 래퍼, 마우스/스크롤 추적 구조: <DataLoader render={(data) => <UI data={data} />} /> 주의: Hook 패턴으로 대체 가능한 경우 Hook 우선

3. Custom Hooks (추출 패턴)

상태 로직을 재사용 가능한 Hook으로 추출.

적합: 폼 관리, API 호출, 로컬스토리지, 디바운스 네이밍: use 프리픽스 필수 — useForm, useDebounce, useAuth

4. Container/Presentational 분리

데이터 로직(Container)과 UI 표현(Presentational) 분리.

적합: 대규모 앱, 테스트 용이성 필요 시 Container: 데이터 fetch, 상태 관리, 이벤트 핸들러 Presentational: props만 받아 렌더링, 순수 함수적

5. Higher-Order Component (HOC)

컴포넌트를 감싸 기능을 추가.

적합: 인증 가드, 레이아웃 래퍼, 에러 바운더리 네이밍: with 프리픽스 — withAuth, withLayout 주의: Hook/Context로 대체 가능하면 그것 우선

6. Headless Component

UI 없이 동작/상태만 제공.

적합: 디자인 시스템에 구애받지 않는 로직 공유 예시: headless useCombobox, useDialog, useTable

상태관리 전략 선택 가이드

상태 유형추천 도구근거
UI 로컬 상태useState, useReducer컴포넌트 내부
서버 상태React Query (TanStack Query)캐싱, 리페치, 낙관적 업데이트
전역 클라이언트 상태Zustand간결, 보일러플레이트 최소
복잡한 전역 상태Zustand + Immer불변성 편의
URL 상태nuqs / useSearchParams필터, 페이지네이션
폼 상태React Hook Form + Zod유효성 검증 통합
테마/언어Context + Provider변경 빈도 낮음
Show full SKILL.md (163 more words)Show less
상태 배치 결정 흐름
이 상태를 URL에서 복원해야 하는가? → URL 상태
서버 데이터인가? → React Query
여러 컴포넌트가 공유하는가? → Zustand
한 컴포넌트 내부인가? → useState
복잡한 전환 로직인가? → useReducer

Next.js App Router 폴더 구조

권장 구조 (Feature-Based)
src/
├── app/                    # Next.js App Router
│   ├── (auth)/             # 인증 관련 라우트 그룹
│   │   ├── login/page.tsx
│   │   └── register/page.tsx
│   ├── (main)/             # 메인 라우트 그룹
│   │   ├── dashboard/page.tsx
│   │   └── settings/page.tsx
│   ├── api/                # API Routes
│   │   └── [...]/route.ts
│   ├── layout.tsx          # 루트 레이아웃
│   └── page.tsx            # 홈
├── components/
│   ├── ui/                 # 범용 UI (Button, Input, Modal)
│   └── features/           # 기능별 컴포넌트
│       ├── auth/
│       └── dashboard/
├── hooks/                  # Custom Hooks
├── lib/                    # 유틸, 설정
│   ├── api.ts              # API 클라이언트
│   ├── auth.ts             # 인증 유틸
│   └── utils.ts
├── stores/                 # Zustand 스토어
├── types/                  # TypeScript 타입
└── styles/                 # 전역 스타일

컴포넌트 파일 컨벤션

항목규칙
파일명PascalCase: UserProfile.tsx
디렉토리kebab-case: user-profile/
인덱스index.ts로 re-export
테스트UserProfile.test.tsx 동일 디렉토리
스토리UserProfile.stories.tsx 동일 디렉토리
타입같은 파일 또는 types.ts 분리

성능 최적화 패턴

패턴언제도구
메모이제이션비싼 계산, 잦은 리렌더useMemo, React.memo
지연 로딩초기 번들 크기React.lazy, next/dynamic
가상화1000+ 아이템 리스트@tanstack/react-virtual
이미지 최적화이미지 로딩next/image
코드 스플리팅라우트별 분리App Router 자동
낙관적 업데이트즉각 피드백React Query onMutate
Debounce검색, 입력useDeferredValue 또는 custom hook

에러 처리 패턴

계층적 에러 바운더리
RootErrorBoundary (전역)
  └── LayoutErrorBoundary (섹션별)
      └── ComponentErrorFallback (개별)
API 에러 처리
HTTP 상태클라이언트 처리
401자동 로그아웃 + 리다이렉트
403권한 없음 UI
404Not Found 페이지
422폼 필드별 에러 표시
429재시도 + 대기 안내
500일반 에러 UI + 재시도 버튼

접근성 (a11y) 체크리스트

  • 모든 이미지에 alt 텍스트
  • 키보드 네비게이션 (Tab, Enter, Escape)
  • ARIA 라벨 (aria-label, role)
  • 색상 대비 4.5:1 이상
  • 포커스 표시자 visible
  • 스크린 리더 테스트
  • 시맨틱 HTML (button, nav, main, section)

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ko/16-fullstack-webapp/.claude/skills/component-patterns of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Component Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Component Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Component Patterns this skillrevfactory/harness-1001.3k—~1.1kAutomated safety check: PassApache-2.0
React ExpertJeffallan/claude-skills12k—~1.4kAutomated safety check: PassMIT
Nextjs15 Initbear2u/my-skills933—~2.4kAutomated safety check: PassNone
Opik Frontend Patternscomet-ml/opik22k—~1.1kAutomated safety check: PassApache-2.0
State Managementemanueleielo/deepagents-open-lovable111—~1.7kAutomated safety check: PassNone
Moai Ref React Patternsmodu-ai/moai-adk1.2k—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • React Expert

    Jeffallan/claude-skills

    Builds React 19 components in TypeScript with Server Components, useActionState forms, custom hooks and state libraries, checked with tsc and React Testing Library.

    12k GitHub stars~1.4k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Nextjs15 Init

    bear2u/my-skills

    A skill your agent uses when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack

    933 GitHub stars~2.4k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Sets the conventions for the Opik React frontend: TanStack Query for data, Zustand for shared state, one-way layer imports and a fix for Google Translate crashes.

    22k GitHub stars~1.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • State Management

    emanueleielo/deepagents-open-lovable

    State management patterns - Zustand, Jotai, Context. An agent skill from emanueleielo/deepagents-open-lovable.

    111 GitHub stars~1.7k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Moai Ref React Patterns

    modu-ai/moai-adk

    React/Next.js component design patterns, state management strategies, and project structure reference for frontend development.

    1.2k GitHub stars~1.8k tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Web

    alinaqi/maggy

    React web development with hooks, React Query, Zustand. An agent skill from alinaqi/maggy.

    707 GitHub stars~3.6k tokensUpdated 13 days ago
    Frontend & DesignAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Component Patterns

What does Component Patterns do?

React/Next.js 컴포넌트 설계 패턴 라이브러리. An agent skill from revfactory/harness-100. Component Patterns is an agent skill from revfactory/harness-100.js 컴포넌트 설계 패턴 라이브러리.

When should I use Component Patterns?

Component Patterns fits situations like: tasks that involve State management.

How do I install Component Patterns in Claude Code?

Run `npx skills add revfactory/harness-100 --skill component-patterns -a claude-code`. Or copy the skill folder (ko/16-fullstack-webapp/.claude/skills/component-patterns in revfactory/harness-100) into .claude/skills/component-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Component Patterns in Codex?

Run `npx skills add revfactory/harness-100 --skill component-patterns -a codex`. Or copy the skill folder (ko/16-fullstack-webapp/.claude/skills/component-patterns in revfactory/harness-100) into .agents/skills/component-patterns in your project. Codex loads it when a task matches its description.

Can I use Component Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill component-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/component-patterns, .gemini/skills/component-patterns, .github/skills/component-patterns and .opencode/skills/component-patterns in your project.

What does Component Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Component Patterns is instructions for the agent only.

Does Component Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Component Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Component Patterns use?

Component Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Component Patterns use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Component Patterns?

Skills that share tags, products or a category with Component Patterns: React Expert (Jeffallan/claude-skills, 12k stars), Nextjs15 Init (bear2u/my-skills, 933 stars), Opik Frontend Patterns (comet-ml/opik, 22k stars) and State Management (emanueleielo/deepagents-open-lovable, 111 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Component Patterns?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.