shadcn
Что он делает
Этот скилл помогает агенту работать с библиотекой компонентов shadcn/ui, которая предоставляет готовые части для экранов веб-приложений. Он нужен людям, которые создают веб-приложения с этой библиотекой.
Когда использовать
- ✓Когда вы хотите добавить готовую кнопку, форму или карточку в проект shadcn/ui.
- ✓Когда компонент в вашем приложении выглядит неправильно и вы хотите оформить его так, как задумала библиотека.
- ✓Когда вы хотите найти готовый компонент в библиотеке, прежде чем создавать свой.
Ссылка на скилл
https://github.com/different-ai/openwork/blob/dev/.opencode/skills/shadcn/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Добавьте в моё приложение форму входа с помощью компонентов 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, orbunx --bun shadcn@latest— based on the project'spackageManager. Examples below usenpx shadcn@latestbut 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
- Use existing components first. Use
npx shadcn@latest searchto check registries before writing custom UI. Check community registries too. - Compose, don't reinvent. Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
- Use built-in variants before custom styles.
variant="outline",size="sm", etc. - Use semantic colors.
bg-primary,text-muted-foreground— never raw values likebg-blue-500.
Critical Rules
These rules are always enforced. Each links to a file with Incorrect/Correct code pairs.
Styling & Tailwind → styling.md
classNamefor layout, not styling. Never override component colors or typography.- No
space-x-*orspace-y-*. Useflexwithgap-*. For vertical stacks,flex flex-col gap-*. - Use
size-*when width and height are equal.size-10notw-10 h-10. - Use
truncateshorthand. Notoverflow-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-indexon overlay components. Dialog, Sheet, Popover, etc. handle their own stacking.
Forms & Inputs → forms.md
- Forms use
FieldGroup+Field. Never use rawdivwithspace-y-*orgrid gap-*for form layout. InputGroupusesInputGroupInput/InputGroupTextarea. Never rawInput/TextareainsideInputGroup.- Buttons inside inputs use
InputGroup+InputGroupAddon. - Option sets (2–7 choices) use
ToggleGroup. Don't loopButtonwith manual active state. FieldSet+FieldLegendfor grouping related checkboxes/radios. Don't use adivwith a heading.- Field validation uses
data-invalid+aria-invalid.data-invalidonField,aria-invalidon the control. For disabled:data-disabledonField,disabledon the control.
Component Structure → composition.md
- Items always inside their Group.
SelectItem→SelectGroup.DropdownMenuItem→DropdownMenuGroup.CommandItem→CommandGroup. - Use
asChild(radix) orrender(base) for custom triggers. Checkbasefield fromnpx shadcn@latest info. → base-vs-radix.md - Dialog, Sheet, and Drawer always need a Title.
DialogTitle,SheetTitle,DrawerTitlerequired for accessibility. UseclassName="sr-only"if visually hidden. - Use full Card composition.
CardHeader/CardTitle/CardDescription/CardContent/CardFooter. Don't dump everything inCardContent. - Button has no
isPending/isLoading. Compose withSpinner+data-icon+disabled. TabsTriggermust be insideTabsList. Never render triggers directly inTabs.Avataralways needsAvatarFallback. 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. Usetoast()fromsonner. - Use
Separatorinstead of<hr>or<div className="border-t">. - Use
Skeletonfor loading placeholders. No customanimate-pulsedivs. - Use
Badgeinstead of custom styled spans.
Icons → icons.md
- Icons in
Buttonusedata-icon.data-icon="inline-start"ordata-icon="inline-end"on the icon. - No sizing classes on icons inside components. Components handle icon sizing via CSS. N
Частые вопросы
Работает ли скилл только с проектами shadcn/ui?
Да. Он применяется к проектам, которые используют shadcn/ui, и такие проекты отмечены файлом components.json.
Может ли он добавлять новые компоненты в проект?
Да. Он может добавить компоненты из реестра 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
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
create-plugin
24kПомогает агенту создать плагин OpenCode с собственными инструментами и хуками, используя правильную структуру для API плагина.
upload-photo
24kПозволяет агенту прикрепить скриншот или видео к запросу на слияние или задаче GitHub с альтернативным текстом для доступности.
connect-openwork-mcp
24kПомогает агенту подключиться к шлюзу OpenWork MCP, чтобы использовать скиллы, плагины и подключения вашей команды в OpenWork.
install-openwork
24kПозволяет агенту установить бесплатное настольное приложение OpenWork на ваш компьютер и помочь выполнить первую задачу.
Похожие скиллы
angular-developer
280kПомогает агенту писать код на Angular и советовать по структуре проекта. Полезен для новых проектов, создания частей кода и улучшения производительности.
frontend-a11y
280kПомогает агенту делать веб-интерфейсы доступными для всех, чтобы сайты и приложения работали с программами чтения с экрана и клавиатурой.
frontend-patterns
280kАгент применяет современные паттерны фронтенд-разработки: оптимизирует производительность, управляет состоянием и следует практикам React и Next.js.