shadcn-management
提供基于 shadcn/ui 的组件管理与集成能力,支持通过语义化查询快速添加单个组件或构建多组件复合界面,自动获取安装指令与实现示例,并可协同前端设计技能完成主题定制与视觉增强,适用于现代 React 项目的高效 UI 开发。
| name | shadcn-management |
| description | Manage shadcn/ui components using MCP tools. Use when user needs to:
(1) Add new shadcn components to a project
(2) Build complex UI features requiring multiple components
(3) Research component implementations and examples
(4) Get component installation commands
Triggers: "add shadcn", "shadcn component", "build UI with shadcn", "install component", "create form", "create dialog"
|
Shadcn Component Management
Prerequisites
Verify project setup:
▼text复制代码shadcn___get_project_registries
If no components.json exists, instruct user: npx shadcn@latest init
Quick Add Workflow
For simple component additions (e.g., "add a date picker"):
-
Search - Find component in registry:
▼text复制代码shadcn___search_items_in_registries(registries, query) -
View - Get implementation details:
▼text复制代码shadcn___view_items_in_registries(items: ["@shadcn/component-name"]) -
Examples - Get usage demo:
▼text复制代码shadcn___get_item_examples_from_registries(registries, query: "component-demo") -
Install - Get add command:
▼text复制代码shadcn___get_add_command_for_items(items: ["@shadcn/component-name"]) -
Output - Provide installation command and example code
Complex Build Workflow
For multi-component features (e.g., "build a login form"), see references/workflows.md.
When to use Complex Build:
- Feature requires 3+ components
- Need component hierarchy planning
- Building complete sections (forms, dashboards, modals)
Component Naming Patterns
Common search queries:
- Forms:
form,input,select,checkbox,radio-group - Layout:
card,dialog,sheet,drawer,tabs - Feedback:
alert,toast,skeleton,progress - Navigation:
button,dropdown-menu,navigation-menu
Example queries for demos: form-demo, card-with-form, dialog-demo
After Implementation
Always run audit:
▼text复制代码shadcn___get_audit_checklist
Custom Styling & Theming
Shadcn provides structural foundation with default styling. For custom aesthetics:
Invoke frontend-design skill when:
- User wants unique/distinctive visual style beyond default shadcn theme
- Need custom typography, color schemes, or motion effects
- Building landing pages or marketing sites requiring creative design
- User mentions "custom styling", "unique design", "not generic"
Workflow:
- Use
shadcn-managementfor component structure and composition - Invoke
frontend-designfor visual customization:- Custom CSS variables in
globals.css - Tailwind theme extensions in
tailwind.config.js - Animation and micro-interaction enhancements
- Typography and color refinements
- Custom CSS variables in
Customization targets:
@/app/globals.css- CSS variables, custom fontstailwind.config.js- theme colors, fonts, animations- Component-level className overrides









