api-design-principles
REST 및 GraphQL API 설계 원칙 가이드. 새로운 API 설계, API 스펙 리뷰, API 설계 표준 수립 시 활용. 트리거: "API 설계", "REST", "GraphQL", "엔드포인트 설계", "API…
Stitch 스크린을 React 컴포넌트 시스템으로 변환합니다 — 디자인 토큰 추출, 컴포넌트 분해, TypeScript 타입 생성, 자동 검증 포함. Triggers on: Stitch React, 컴포넌트 변환, React 변환, HTML to React. NOT for: 새 React 앱 생성, API 구현.
$ npx -y skills add jh941213/my-cc-harness --skill stitch-react --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/stitch-reactContext preview
The summary Claude sees to decide when to auto-load this skill.
Stitch 스크린을 React 컴포넌트 시스템으로 변환합니다 — 디자인 토큰 추출, 컴포넌트 분해, TypeScript 타입 생성, 자동 검증 포함. Triggers on: Stitch React, 컴포넌트 변환, React 변환, HTML to React. NOT for: 새 React 앱 생성, API 구현.
name: stitch-react description: "Stitch 스크린을 React 컴포넌트 시스템으로 변환합니다 — 디자인 토큰 추출, 컴포넌트 분해, TypeScript 타입 생성, 자동 검증 포함. Triggers on: Stitch React, 컴포넌트 변환, React 변환, HTML to React. NOT for: 새 React 앱 생성, API 구현." user-invocable: true allowed-tools: - "mcp__stitch__*" - "mcp__stitch*" - "Read" - "Write" - "Edit" - "Bash"
Stitch에서 생성된 HTML 스크린을 재사용 가능한 React 컴포넌트 시스템으로 변환합니다. 디자인 토큰 추출, 컴포넌트 분해, 자동 검증을 포함합니다.
이 스킬은 Stitch의 정적 HTML 출력을 프로덕션 레디 React 컴포넌트로 변환합니다:
1. **디자인 토큰 추출**: 색상, 타이포그래피, 간격을 토큰으로 추출 2. **컴포넌트 분해**: HTML을 재사용 가능한 컴포넌트로 분리 3. **TypeScript 지원**: Props 타입 정의 자동 생성 4. **검증**: 생성된 컴포넌트의 문법 및 타입 검증
# Stitch MCP로 스크린 HTML 다운로드 [prefix]:get_screen 호출 → htmlCode.downloadUrl에서 HTML 다운로드 → source.html로 저장
Stitch HTML에서 Tailwind 클래스와 인라인 스타일을 분석하여 디자인 토큰을 추출합니다.
// tokens/colors.ts
export const colors = {
// Primary
primary: {
DEFAULT: '#0066FF',
hover: '#0052CC',
light: '#E6F0FF',
},
// Neutral
neutral: {
50: '#F9FAFB',
100: '#F3F4F6',
200: '#E5E7EB',
// ...
900: '#111827',
},
// Semantic
success: '#10B981',
error: '#EF4444',
warning: '#F59E0B',
} as const;// tokens/typography.ts
export const typography = {
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
fontSize: {
xs: ['0.75rem', { lineHeight: '1rem' }],
sm: ['0.875rem', { lineHeight: '1.25rem' }],
base: ['1rem', { lineHeight: '1.5rem' }],
lg: ['1.125rem', { lineHeight: '1.75rem' }],
xl: ['1.25rem', { lineHeight: '1.75rem' }],
'2xl': ['1.5rem', { lineHeight: '2rem' }],
'3xl': ['1.875rem', { lineHeight: '2.25rem' }],
},
fontWeight: {
normal: '400',
medium: '500',
semibold: '600',
bold: '700',
},
} as const;// tokens/spacing.ts
export const spacing = {
px: '1px',
0: '0',
0.5: '0.125rem',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
20: '5rem',
24: '6rem',
} as const;HTML 구조를 분석하여 재사용 가능한 컴포넌트로 분해합니다.
| 원칙 | 설명 | |------|------| | 단일 책임 | 각 컴포넌트는 하나의 역할만 | | 재사용성 | 여러 곳에서 사용될 패턴 식별 | | 구성 가능성 | 작은 컴포넌트로 큰 컴포넌트 구성 | | Props 기반 | 하드코딩 대신 Props로 커스터마이징 |
components/
├── primitives/ # 기본 요소
│ ├── Button.tsx
│ ├── Input.tsx
│ ├── Text.tsx
│ └── Icon.tsx
├── patterns/ # 재사용 패턴
│ ├── Card.tsx
│ ├── Badge.tsx
│ ├── Avatar.tsx
│ └── Tooltip.tsx
├── blocks/ # 섹션 블록
│ ├── Header.tsx
│ ├── Footer.tsx
│ ├── Hero.tsx
│ └── Features.tsx
└── layouts/ # 레이아웃
├── PageLayout.tsx
└── GridLayout.tsx// components/primitives/Button.tsx
import { forwardRef, type ButtonHTMLAttributes } from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils';
const buttonVariants = cva(
// Base styles
'inline-flex items-center justify-center rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
primary: 'bg-primary text-white hover:bg-primary-hover',
secondary: 'bg-neutral-100 text-neutral-900 hover:bg-neutral-200',
outline: 'border border-neutral-200 bg-white hover:bg-neutral-50',
ghost: 'hover:bg-neutral-100',
destructive: 'bg-error text-white hover:bg-error/90',
},
size: {
sm: 'h-8 px-3 text-sm',
md: 'h-10 px-4 text-sm',
lg: 'h-12 px-6 text-base',
icon: 'h-10 w-10',
},
},
defaultVariants: {
variant: 'primary',
size: 'md',
},
}
);
export interface ButtonProps
extends ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
isLoading?: boolean;
}
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, isLoading, children, disabled, ...props }, ref) => {
return (
<button
ref={ref}
className={cn(buttonVariants({ variant, size }), className)}
disabled={disabled || isLoading}
{...props}
>
{isLoading ? (
<span className="mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
) : null}
{children}
</button>
);
}
);
Button.displayName = 'Button';// components/patterns/Card.tsx
import { forwardRef, type HTMLAttributes } from 'react';
import { cn } from '@/lib/utils';
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
variant?: 'default' | 'outlined' | 'elevated';
}
export const Card = forwardRef<HTMLDivElement, CardProps>(
({ className, variant = 'default', ...props }, ref) => {
const variants = {
default: 'bg-white rounded-xl',
outlined: 'bg-white rounded-xl border border-neutral-200',
elevated: 'bg-white rounded-xl shadow-lg',
};
return (
<div
ref={ref}
className={cn(variants[variant], className)}
{...props}
/>
);
}
);
Card.displayName = 'Card';
// Sub-components
export const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => (
<div ref={ref} className={cn('p-6 pb-0', className)} {...props} />
)
);
export const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElemenREST 및 GraphQL API 설계 원칙 가이드. 새로운 API 설계, API 스펙 리뷰, API 설계 표준 수립 시 활용. 트리거: "API 설계", "REST", "GraphQL", "엔드포인트 설계", "API…
Python asyncio 및 async/await 패턴 가이드. 비동기 API, 동시성 시스템, I/O 바운드 애플리케이션 구축 시 활용. 트리거: "asyncio", "async/await", "비동기 Python",…
레포에서 실질적인 작업(구현·수정·배포·디버깅)을 시작할 때, 새 레포를 처음 파악할 때, 작업을 마치고 기억할 지식이 생겼을 때 사용. 작업 유형에 맞는 docs·메모리만 선택적으로 로드하는 라우팅 테이블을 운영한다
Ralph Loop 병렬 버전. 여러 에이전트가 worktree에서 동시에 PRD 항목을 처리한다. 트리거: "PRD 항목 병렬 구현", "병렬 구현", "autodev parallel", "워크트리 병렬 개발", "병렬 랄프"…
Ralph Loop 기반 자율 개발 루프. Stop Hook이 세션 종료를 가로채어 PRD 항목을 하나씩 완료하며 자동 커밋한다. 트리거: "autodev", "자율 개발", "밤새 돌려", "랄프 루프", "ralph loop",…
기능 추가·컴포넌트 생성·동작 변경 등 모든 창작 작업 전에 사용. 구현 전에 의도·요구사항·설계를 대화로 확정 (심층 인터뷰가 필요한 대규모 기능은 /spec 사용)