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

shadcn

하는 일

이 스킬은 웹 앱 화면을 위한 기성 부품을 제공하는 shadcn/ui 컴포넌트 라이브러리로 AI 에이전트를 안내합니다. 이 라이브러리로 웹 앱을 만드는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓shadcn/ui 프로젝트에 기성 버튼, 양식, 카드를 추가하고 싶을 때.
  • ✓앱의 컴포넌트가 이상하게 보여 라이브러리의 의도대로 스타일을 맞추고 싶을 때.
  • ✓직접 만들기 전에 라이브러리에 이미 있는 컴포넌트를 확인하고 싶을 때.

스킬 링크

https://github.com/different-ai/openwork/blob/dev/.opencode/skills/shadcn/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“shadcn 컴포넌트를 사용해 제 앱에 로그인 양식을 추가해 주세요.”

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

작동 방식

이 스킬은 프로젝트 설정과 컴포넌트 문서를 읽은 뒤, 라이브러리의 의도에 맞게 부품을 추가하거나 조정합니다.

기술 내용 (원본 SKILL.md)

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

shadcn/ui

A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.

IMPORTANT: Run all CLI commands using the project's package runner: npx shadcn@latest, pnpm dlx shadcn@latest, or bunx --bun shadcn@latest — based on the project's packageManager. Examples below use npx shadcn@latest but substitute the correct runner for the project.

Current Project Context

!`npx shadcn@latest info --json`

The JSON above contains the project config and installed components. Use npx shadcn@latest docs <component> to get documentation and example URLs for any component.

Principles

  1. Use existing components first. Use npx shadcn@latest search to check registries before writing custom UI. Check community registries too.
  2. Compose, don't reinvent. Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
  3. Use built-in variants before custom styles. variant="outline", size="sm", etc.
  4. Use semantic colors. bg-primary, text-muted-foreground — never raw values like bg-blue-500.

Critical Rules

These rules are always enforced. Each links to a file with Incorrect/Correct code pairs.

Styling & Tailwind → styling.md

  • className for layout, not styling. Never override component colors or typography.
  • No space-x-* or space-y-*. Use flex with gap-*. For vertical stacks, flex flex-col gap-*.
  • Use size-* when width and height are equal. size-10 not w-10 h-10.
  • Use truncate shorthand. Not overflow-hidden text-ellipsis whitespace-nowrap.
  • No manual dark: color overrides. Use semantic tokens (bg-background, text-muted-foreground).
  • Use cn() for conditional classes. Don't write manual template literal ternaries.
  • No manual z-index on overlay components. Dialog, Sheet, Popover, etc. handle their own stacking.

Forms & Inputs → forms.md

  • Forms use FieldGroup + Field. Never use raw div with space-y-* or grid gap-* for form layout.
  • InputGroup uses InputGroupInput/InputGroupTextarea. Never raw Input/Textarea inside InputGroup.
  • Buttons inside inputs use InputGroup + InputGroupAddon.
  • Option sets (2–7 choices) use ToggleGroup. Don't loop Button with manual active state.
  • FieldSet + FieldLegend for grouping related checkboxes/radios. Don't use a div with a heading.
  • Field validation uses data-invalid + aria-invalid. data-invalid on Field, aria-invalid on the control. For disabled: data-disabled on Field, disabled on the control.

Component Structure → composition.md

  • Items always inside their Group. SelectItem → SelectGroup. DropdownMenuItem → DropdownMenuGroup. CommandItem → CommandGroup.
  • Use asChild (radix) or render (base) for custom triggers. Check base field from npx shadcn@latest info. → base-vs-radix.md
  • Dialog, Sheet, and Drawer always need a Title. DialogTitle, SheetTitle, DrawerTitle required for accessibility. Use className="sr-only" if visually hidden.
  • Use full Card composition. CardHeader/CardTitle/CardDescription/CardContent/CardFooter. Don't dump everything in CardContent.
  • Button has no isPending/isLoading. Compose with Spinner + data-icon + disabled.
  • TabsTrigger must be inside TabsList. Never render triggers directly in Tabs.
  • Avatar always needs AvatarFallback. For when the image fails to load.

Use Components, Not Custom Markup → composition.md

  • Use existing components before custom markup. Check if a component exists before writing a styled div.
  • Callouts use Alert. Don't build custom styled divs.
  • Empty states use Empty. Don't build custom empty state markup.
  • Toast via sonner. Use toast() from sonner.
  • Use Separator instead of <hr> or <div className="border-t">.
  • Use Skeleton for loading placeholders. No custom animate-pulse divs.
  • Use Badge instead of custom styled spans.

Icons → icons.md

  • Icons in Button use data-icon. data-icon="inline-start" or data-icon="inline-end" on the icon.
  • No sizing classes on icons inside components. Components handle icon sizing via CSS. N
자주 묻는 질문

shadcn/ui 프로젝트에서만 작동하나요?

네. components.json 파일로 표시되는 shadcn/ui 프로젝트에 적용됩니다.

프로젝트에 새 컴포넌트를 추가할 수 있나요?

네. shadcn 레지스트리의 컴포넌트를 소스 코드로 프로젝트에 추가할 수 있습니다.

컴포넌트 사용법을 설명할 수 있나요?

네. 어떤 컴포넌트든 문서와 사용 예시를 가져올 수 있습니다.

상세 정보

작성자의 원본 설명

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

repo: different-ai/openwork

인기도

GitHub 스타
24k
순위
#10111
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬