web-component-design
设计可复用 Web 组件
随着产品增长,前端团队需要能够保持一致性的组件。此技能指导 Claude、Codex 和 Claude Code 处理组件 API、组合模式、样式选择和无障碍检查。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "web-component-design" from https://skillstore.io/skills/wshobson-web-component-design.md and its manifest at https://skillstore.io/api/skills/wshobson-web-component-design/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“web-component-design”。 为设计系统设计一个可复用的 React tabs 组件。
预期结果:
一份组件方案,包含 root 和 child parts、受控和非受控状态选项、ARIA roles、键盘行为和样式 variants。
正在使用“web-component-design”。 为多品牌组件库选择一种样式方案。
预期结果:
对 CSS Modules、utility classes、CSS-in-JS 和零运行时样式的比较,并为 theme tokens 推荐一种方案。
正在使用“web-component-design”。 改进自定义 dropdown menu 的无障碍性。
预期结果:
一份检查清单,涵盖焦点处理、roles、键盘导航、labels、disabled 状态和屏幕阅读器行为。
安全审计
安全AI review found the static alerts are false positives from markdown examples, TypeScript template literals, accessibility key handling, local imports, and documentation links. No prompt injection, data exfiltration intent, shell execution, or secret material was found in the referenced files.
风险因素
⚙️ 外部命令 (48)
🌐 网络访问 (6)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/wshobson-web-component-design/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/wshobson-web-component-design?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/wshobson-web-component-design?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/wshobson-web-component-design/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/wshobson-web-component-design.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
wshobson. (2026). web-component-design security audit report (audit version 4) [Author version unspecified]. Skillstore. https://skillstore.io/skills/wshobson-web-component-design/audits/4BibTeX 引用
@techreport{wshobson-wshobson-web-component-design-2026,
author = {wshobson},
title = {web-component-design security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/wshobson-web-component-design/audits/4},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "web-component-design security audit report (audit version 4)"
version: "unspecified"
type: report
authors:
- name: "wshobson"
date-released: "2026-07-08"
url: "https://skillstore.io/skills/wshobson-web-component-design/audits/4"
identifiers:
- type: other
value: "skillstore:wshobson-web-component-design:audit:4"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
创建设计系统组件
为可复用的 button、dialog、tab 或 form control 定义 variants、props、无障碍行为和样式规则。
标准化组件 API
审查现有组件,并在产品代码库中对齐命名、defaults、组合和 override 模式。
比较框架模式
在 React、Vue 和 Svelte 之间转换 UI 模式,同时保留状态流和无障碍行为。
试试这些提示
使用 web-component-design skill 为 [framework] 设计一个可复用的 [component name]。包括 props、variants、无障碍行为和样式指导。
使用 web-component-design skill 审查这个 [framework] 组件。建议更清晰的组件 API、组合模型和样式方案。
使用 web-component-design skill 设计一个 [pattern] 组件家族。包括 root、subcomponents、状态所有权、键盘支持和使用示例。
使用 web-component-design skill 比较 React、Vue 和 Svelte 针对 [component pattern] 的实现。推荐一种架构并解释权衡。
最佳实践
- 在添加视觉 variants 之前,先从语义化 HTML 和无障碍行为开始。
- 保持组件 API 小巧、类型化,并在整个设计系统中保持一致。
- 使用键盘导航、响应式布局和真实内容来测试示例。
避免
- 当组合能更清晰地表达相同行为时,不要添加大量一次性的 props。
- 在未验证允许的 URLs 和数据处理方式之前,不要将 fetch 示例复制到生产环境。
- 在检查无障碍性和交互状态之前,不要认为视觉样式已经完成。
常见问题
此技能会创建生产就绪的组件吗?
它涵盖哪些框架?
它能帮助选择 CSS 策略吗?
它包含无障碍指导吗?
此技能可以安全发布吗?
为什么风险等级是低而不是安全?
开发者详情
作者
wshobson许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
64ca8af0f54a325752f08bd54e52151061ea659a
维护新鲜度
2026/7/21
使用量
17 次下载 · 347 次浏览