Communitygithub.com

Adamparishspok/skills

여러 앱이나 프로토타입을 하나의 공유 컴포넌트 라이브러리로 통합하면서 각각의 고유한 디자인을 유지합니다. 중복된 로컬 컴포넌트(버튼, 셀렉트, 필드, 모달, 페이지네이터, 토스트)를 찾고, 공유 컴포넌트를 토큰 기반으로 만들어 각 제품군이나 앱이 자신만의 측정값을 설정하도록 하며, 변형 이름 매핑, 앱별로 유지할 항목 결정, 그리고 사용자 정의 토큰을 조용히 깨뜨리는 tailwind-merge 함정을 다룹니다. 여러 앱이 각자 자체 Btn/Select/Modal을 발전시켰을 때, 디자인 시스템 컴포넌트가 두 번째 제품에 "맞지 않을" 때, 또는 앱 제품군을 리테마할 때 사용합니다.

skills란 무엇인가요?

이 스킬은 여러 앱이나 프로토타입이 각자 성장시킨 중복된 UI 컴포넌트(예: 버튼, 셀렉트, 모달)를 하나의 공유 컴포넌트 라이브러리로 통합하는 방법을 제공합니다. 각 앱의 고유한 외관을 유지하면서 중복을 제거하는 것이 핵심 목표입니다. 이를 위해 컴포넌트를 '토큰 크기'로 만들어 동작, 마크업, 상태는 공유하되 각 테마가 크기, 반경, 채우기 등을 자체적으로 정의하도록 합니다. 주로 Claude Code, Cursor와 같은 AI 에이전트 기반 개발 환경에서 사용되며, `@theme` CSS 지시문과 `cn()` 유틸리티 함수(tailwind-merge)의 사용자 정의 토큰 등록 문제를 구체적으로 다룹니다. 또한 앱별 인벤토리 작성, 변형 이름 매핑, 앱별 시각적 회귀 테스트를 통한 검증 작업을 단계별로 안내하며, `aria-invalid`와 `focus-visible` 스타일 충돌이나 버튼의 기본 `type="submit"` 문제 같은 실제 함정도 해결합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Adamparishspok/skills/tree/HEAD/skills/multi-app-design-system

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

여러 앱, 하나의 시스템

일반적인 실패 사례: 앱 A를 위해 키트를 만들었는데, 앱 B의 버튼이 4px 더 높고 2px 더 둥글어서 B가 "이번 한 번만" 포크합니다. 앱이 5개가 되면 6개의 버튼, 8개의 셀렉트, 3개의 모달이 생기고, 모두 동일한 작업을 수행합니다.

공유 컴포넌트를 토큰 크기로 만드세요. 동작, 마크업 및 상태를 전달하고 각 테마가 측정값을 제공합니다. 그런 다음 앱별로 통합하세요.

토큰 크기 컴포넌트

앱마다 다른 모든 측정값을 테마 토큰에서 읽어옵니다.

@theme {
  --spacing-btn-sm: 1.75rem;  --spacing-btn-px-sm: 0.625rem;
  --spacing-btn-md: 2.25rem;  --spacing-btn-px-md: 0.875rem;
  --spacing-field: 2.125rem;  /* input / select height */
  --text-label: 0.8125rem;
}
md: "h-btn-md px-btn-px-md text-sm",
icon: "size-btn-md",

그 다음:

  • 제품군은 한 번의 테마에서 토큰을 재정의하고, 그 안의 모든 앱은 고유한 측정 컨트롤을 얻습니다.
  • 반경, 채우기 및 그림자는 이미 토큰입니다 (rounded-field, bg-accent, --shadow-card).
  • 채우기는 색상과 장식 클래스를 조합합니다. 예를 들어 bg-accent accent-fill입니다. 장식(광택)만 정의하는 테마는 투명 버튼을 절대 렌더링하지 않습니다.

references/button.tsx를 참조하세요.

앱별 통합 과정

  1. 로컬 복사본 목록을 작성합니다. 각 앱에서 export function (Btn|Button|IconBtn|Select|Field|Input|Modal|Dialog|Sheet|Badge|Empty|Pager|Toast|Stat|Status|Spinner)를 찾습니다. 호출 지점 수를 셉니다.

  2. 테마 적용 후 공유 컴포넌트와 일치하는 항목을 교체하고 삭제합니다. 변형 이름을 명시적으로 매핑하고 매핑을 기록합니다.

    로컬 이름공유 변형
    primary, navyaccent
    secondaryoutline
    quiet, softsubtle
    danger (solid)danger-solid
  3. 앱별 특화 항목은 앱별로 유지합니다:

    • 도메인 위젯, 차트 및 앱 크롬;
    • 모양이 브랜드 자체인 컨트롤 (iOS 슬래브, Carbon 평면 컨트롤, 48px 알약 CTA);
    • 공유 컴포넌트에 없는 동작이 있는 컨트롤 (삼중 상태 체크박스, 제거 가능한 칩, "임의" 재설정 항목, 다중 선택 필터).

    얇은 래퍼는 한 가지를 추가할 때 괜찮습니다. 그 이유를 주석에 적으세요.

  4. 네이티브 <select> 및 메뉴 기반 셀렉트를 하나의 Select로 교체합니다.

    • Radix Select는 ""를 "값 없음"으로 예약합니다. "all"과 같은 센티넬을 사용하고 다시 매핑하세요.
    • aria-labelledby 및 aria-describedby를 전달하세요.
    • selectOption()을 호출하는 워크스루 스크립트는 콤보박스를 클릭한 다음 옵션을 클릭해야 합니다.
  5. 각 앱을 자체 스크린샷과 대조하여 확인합니다(visual-regression-pass 참조). 실제 차이는 일반적으로 의도된 것입니다: 크기, 광택, 누름 스케일.

tailwind-merge 함정 (cn())

tailwind-merge는 Tailwind의 내장 스케일만 알고 있습니다. 사용자 정의 토큰은 세 가지 조용한 방식으로 깨집니다.

  • 알 수 없는 간격 토큰. cn("h-btn-md", "h-10")은 둘 다 유지합니다. h-btn-md가 높이인지 모르기 때문에 스타일시트 순서가 우선순위를 결정합니다. 호출자의 h-10이 토큰에 밀려 40px 버튼이 36px로 렌더링되었습니다. 토큰을 등록하세요: extendTailwindMerge({ extend: { theme: { spacing: ["btn-sm","btn-md","field", …] } } }).
  • 알 수 없는 텍스트 크기. cn("text-meta", "text-ink")는 text-meta를 색상으로 처리하고 드롭합니다. 크기를 등록하세요: theme: { text: ["meta","micro","label"] }.
  • 사용자 정의 그림자 및 색상. text-14가 text-t3 옆에 있거나, 임의의 shadow-[var(--x)]가 명명된 그림자 옆에 있을 때: 동일한 문제입니다. 코드베이스가 모든 곳에 폐쇄된 사용자 정의 스케일을 가지고 있다면, 거기서는 일반 clsx를 사용하세요.

references/cn.ts를 참조하세요.

초점과 유효성 검사

  • aria-invalid:ring-* 스타일은 focus-visible:ring-*보다 우선하여 초점이 맞춰진 유효하지 않은 필드에서 초점 링을 숨깁니다. aria-invalid:not-focus-visible:ring-…을 작성하세요.
  • 폼 내부의 <button>은 폼을 제출합니다. 공유 Button이 type="button"을 기본값으로 하지 않으면 변환된 모든 제출이 아닌 호출 지점에서 설정해야 합니다.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Adamparishspok/skills

Make a website, web app or online store ready for AI agents. Scan it with Cloudflare's Agent Readiness checks, decide which checks apply to this kind of site, ship the discovery files and headers in priority order, and add the AI-first basics the scanner does not score (server-rendered content, JSON-LD, llms.txt). Covers robots.txt AI rules, Content Signals, sitemap, Markdown for Agents (Accept text/markdown), Link headers, API catalog, OAuth discovery, auth.md, MCP server card, A2A agent card, agent skills index, WebMCP, and commerce protocols (ACP, UCP, AP2, MPP, x402). Use when making a site AI-ready, agent-ready or AI-first, or fixing an isitagentready.com or Cloudflare Agent Readiness report. Triggers on: AI ready, agent ready, AI-first, agent readiness, isitagentready, AI Crawl Control, Markdown for Agents, text/markdown, llms.txt, GPTBot, ClaudeBot, AI crawlers, Content-Signal, ai-train, api-catalog, .well-known, oauth-protected-resource, auth.md, MCP server card, agent card, agent skills, WebMCP, a...

Adamparishspok/skills

Install a complete, lean favicon set on any website or web app — the five files modern browsers, iOS and Android actually use, one block of head markup added once in the root layout, and a check that every file resolves. Covers finding the public folder per framework, generating the set from one SVG (or from a RealFaviconGenerator package), dark-mode SVG icons, maskable manifest icons, cache busting and verification. Use when adding, replacing or auditing a favicon, app icon, apple-touch-icon or web manifest. Triggers on: favicon, favicon.ico, favicon.svg, apple-touch-icon, site.webmanifest, manifest.json, app icon, PWA icon, maskable icon, tab icon, RealFaviconGenerator.

Adamparishspok/skills

Give an interface one shared tempo and a small vocabulary of hover and state micro-interactions: duration tiers (tap/pop/hover/card/layout) for CSS and Motion, swap hand-offs, rows whose highlight grows in, trailing arrows, chevron nudges, card lifts without translate, scroll-edge fades, and icon/label swaps for copy and toggle buttons. Use when animations feel inconsistent, durations are scattered magic numbers, hovers only change colour, or a product feels flat or unfinished. Triggers on: animation duration, transition timing, hover state, micro-interaction, polish, copy button feedback, menu icon to close, back arrow, card hover, scroll fade, motion tokens, Framer Motion durations.

Adamparishspok/skills

Build or migrate a UI's neutral palette (grounds, surfaces, lines, ink/text) as an OKLCH formula driven by a few inputs instead of dozens of hand-picked hex values, with light and dark themes, per-step ladder overrides, a fit script that reproduces existing colours, and a browser contrast audit. Use when creating a theme, adding dark mode, retinting a product, auditing text contrast, or consolidating several apps' palettes. Triggers on: palette, neutrals, grey ramp, dark mode, theme tokens, oklch, retint, hue, contrast audit, design tokens, Tailwind @theme colours.

관련 스킬