shadcn
यह क्या करती है
यह स्किल shadcn/ui component library के साथ AI एजेंट का मार्गदर्शन करती है, जो वेब ऐप की स्क्रीन के लिए तैयार हिस्से देती है। यह उन लोगों के लिए है जो इस library से वेब ऐप बना रहे हैं।
कब इस्तेमाल करें
- ✓जब आप shadcn/ui प्रोजेक्ट में तैयार बटन, फ़ॉर्म या कार्ड जोड़ना चाहें।
- ✓जब आपके ऐप का कोई component ठीक न दिखे और आप चाहें कि वह library के तरीके से स्टाइल हो।
- ✓जब अपना component बनाने से पहले library में पहले से मौजूद component देखना हो।
Skill का लिंक
https://github.com/different-ai/openwork/blob/dev/.opencode/skills/shadcn/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे ऐप में shadcn components का उपयोग करके एक login फ़ॉर्म जोड़ दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल प्रोजेक्ट की setup और component documentation पढ़ती है, फिर library के तरीके से हिस्से जोड़ती या ठीक करती है।
तकनीकी सामग्री (मूल 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 फ़ाइल से पहचाना जाता है।
क्या यह मेरे प्रोजेक्ट में नए components जोड़ सकती है?
हाँ। यह shadcn registry से components को source code के रूप में प्रोजेक्ट में जोड़ सकती है।
क्या यह बता सकती है कि component कैसे इस्तेमाल करें?
हाँ। यह किसी भी component का documentation और usage examples ला सकती है।
जानकारी
लेखक का मूल विवरण
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
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-plugin
24kयह आपके एजेंट को custom tools और hooks वाला OpenCode plugin बनाने में मदद करती है, जिसकी संरचना plugin के API के अनुसार सही हो।
upload-photo
24kयह आपके एजेंट को GitHub pull request या issue में screenshot या video जोड़ने देती है, accessibility के लिए alt text के साथ।
connect-openwork-mcp
24kयह आपके एजेंट को OpenWork MCP Gateway से जोड़ती है, ताकि वह आपकी टीम के OpenWork skills, plugins और connections इस्तेमाल कर सके।
install-openwork
24kयह आपके एजेंट को मुफ़्त OpenWork desktop ऐप आपके कंप्यूटर पर इंस्टॉल करने और पहला काम शुरू करने में मदद करती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।