[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B27SJFCYPTPMAHHD5DXNNX":3,"skill-same:01M7B27SJFCYPTPMAHHD5DXNNX":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7B27SJFCYPTPMAHHD5DXNNX","shadcn-ui-radix-architect",null,"Shadcn UI 与 Radix UI 现代前端无障碍可复用组件架构规范与最佳实践指南。","2428424081cn\u002FSkill-mcp","2428424081cn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211628073?v=4","01M7B248A88Y9AX8SMDNQXEGXP","Java-star","01M7B248B8AR86WG4JF94N28JZ",1,"MIT","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fshadcn-ui-radix-architect\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: shadcn-ui-radix-architect\ndescription: Shadcn UI 与 Radix UI 现代前端无障碍可复用组件架构规范与最佳实践指南。\n---\n\n# Shadcn UI 与 Radix UI 现代前端组件架构规范\n\n本规范指导 AI 生成符合工业级标准、无障碍（WAI-ARIA）就绪且高度可定制的现代 React \u002F Next.js UI 组件。\n\n## 1. 核心设计原则\n\n- **所有权属于用户 (Own your code)**：组件代码直接内嵌在项目中，而非从庞大的外部黑盒 npm 库中引入。\n- **Radix UI 无状态原语 (Headless Primitives)**：负责核心状态机、键盘导航（Keyboard Navigation）、焦点捕获（Focus Trapping）与 ARIA 属性。\n- **CVA (Class Variance Authority)**：严格使用 CVA 管理组件的多变体（variants）与尺寸（sizes）。\n- **Tailwind Merge + Clsx**：所有类名拼接必须通过 `cn(...)` 工具函数进行合并，防止样式优先级冲突。\n\n## 2. 标准组件实现模式 (以 Button 为例)\n\n```tsx\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui\u002Freact-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@\u002Flib\u002Futils\";\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary\u002F90 shadow\",\n        destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive\u002F90 shadow-sm\",\n        outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n        secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary\u002F80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-9 px-4 py-2\",\n        sm: \"h-8 rounded-md px-3 text-xs\",\n        lg: \"h-10 rounded-md px-8\",\n        icon: \"h-9 w-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n);\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {\n  asChild?: boolean;\n}\n\nexport const Button = React.forwardRef\u003CHTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : \"button\";\n    return (\n      \u003CComp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      \u002F>\n    );\n  }\n);\nButton.displayName = \"Button\";\n```\n\n## 3. 强制准则\n\n1. **必须支持 `asChild` 模式**：通过 `@radix-ui\u002Freact-slot` 让组件可渲染为 Link 或其他自定义元素。\n2. **严禁硬编码颜色值**：严禁写死 `#1677ff` 或 `bg-blue-600`，必须使用 CSS 变量代号（如 `bg-primary`, `text-muted-foreground`）。\n3. **微交互与无障碍**：必须包含 `focus-visible:ring` 焦点环与 `disabled:opacity-50` 禁用态。\n","# Shadcn UI 与 Radix UI 现代前端组件架构规范\n\n本规范指导 AI 生成符合工业级标准、无障碍（WAI-ARIA）就绪且高度可定制的现代 React \u002F Next.js UI 组件。\n\n## 1. 核心设计原则\n\n- **所有权属于用户 (Own your code)**：组件代码直接内嵌在项目中，而非从庞大的外部黑盒 npm 库中引入。\n- **Radix UI 无状态原语 (Headless Primitives)**：负责核心状态机、键盘导航（Keyboard Navigation）、焦点捕获（Focus Trapping）与 ARIA 属性。\n- **CVA (Class Variance Authority)**：严格使用 CVA 管理组件的多变体（variants）与尺寸（sizes）。\n- **Tailwind Merge + Clsx**：所有类名拼接必须通过 `cn(...)` 工具函数进行合并，防止样式优先级冲突。\n\n## 2. 标准组件实现模式 (以 Button 为例)\n\n```tsx\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui\u002Freact-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@\u002Flib\u002Futils\";\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary\u002F90 shadow\",\n        destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive\u002F90 shadow-sm\",\n        outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n        secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary\u002F80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-9 px-4 py-2\",\n        sm: \"h-8 rounded-md px-3 text-xs\",\n        lg: \"h-10 rounded-md px-8\",\n        icon: \"h-9 w-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n);\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {\n  asChild?: boolean;\n}\n\nexport const Button = React.forwardRef\u003CHTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : \"button\";\n    return (\n      \u003CComp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      \u002F>\n    );\n  }\n);\nButton.displayName = \"Button\";\n```\n\n## 3. 强制准则\n\n1. **必须支持 `asChild` 模式**：通过 `@radix-ui\u002Freact-slot` 让组件可渲染为 Link 或其他自定义元素。\n2. **严禁硬编码颜色值**：严禁写死 `#1677ff` 或 `bg-blue-600`，必须使用 CSS 变量代号（如 `bg-primary`, `text-muted-foreground`）。\n3. **微交互与无障碍**：必须包含 `focus-visible:ring` 焦点环与 `disabled:opacity-50` 禁用态。\n",{"name":5,"description":7},"main","dec8b35d55bf9c402bc2a6dd12660c86fabef2a9","skills\u002Ffrontend\u002Fshadcn-ui-radix-architect",0,"https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp","https:\u002F\u002Fgithub.com\u002F2428424081cn","2026-08-25 01:43:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add 2428424081cn\u002FSkill-mcp --skill shadcn-ui-radix-architect",{"tool":37,"command":38},"bunx","bunx skills add 2428424081cn\u002FSkill-mcp --skill shadcn-ui-radix-architect",{"tool":40,"command":41},"pnpm","pnpm dlx skills add 2428424081cn\u002FSkill-mcp --skill shadcn-ui-radix-architect","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fshadcn-ui-radix-architect\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"skill.json","REFERENCE","参考文档",1168,"https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fshadcn-ui-radix-architect\u002Fskill.json",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7B2ARPQ51SJ1F7J6M6ACH8Y","web-page-extractor","网页正文智能提纯与清洗工具。抓取网页并剔除 HTML 标签、脚本与样式，输出高信息密度的 Markdown。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-page-extractor\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7B2ANRMF5ZQDF0ZSCZXR4WR","restful-api-standard","企业级 RESTful API 设计准则","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Frestful-api-standard\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7B2AJPJZGPP5JJ9ZHZ4PFS0","fetch-page","抓取网页并提取标题与正文长度，需要网络权限（默认策略为拒绝，须授权）。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Ffetch-page\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7B2AF7A8E436HPVQSP0G0J5","api-tester-toolkit","API 接口网络测试与耗时诊断工具包。发起 HTTP GET\u002FPOST 请求、统计响应耗时与状态码、检查响应数据。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fapi-tester-toolkit\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7B2ADT9B0QE2X4A8J0H772S","semver-bump","语义化版本号升级：major \u002F minor \u002F patch。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Futil\u002Fsemver-bump\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7B2ACMJ6T4AXWYP81T87AK1","translate","中英互译演示实现，内置小词典，用于演示翻译类 skill 的检索与调用。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ftext\u002Ftranslate\u002FSKILL.md",[],[]]