一键导入
component-design
Guide the design of beautiful, accessible, systematic UI components. Auto-triggers when creating or restyling components in FE Designer mode.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide the design of beautiful, accessible, systematic UI components. Auto-triggers when creating or restyling components in FE Designer mode.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Verify WCAG 2.1 AA compliance by analyzing HTML structure, ARIA usage, contrast, keyboard patterns, and semantic markup. Runs before completion in FE Designer mode.
Audit design system consistency — check tokens, spacing, colors, typography usage across the codebase. Triggers when modifying shared styles or on user request.
Self-critique visual output before completion. Evaluates visual hierarchy, CTA clarity, cognitive load, spacing consistency, and layout priority. MUST run before attempt_completion in FE Designer mode.
MANDATORY: Run validation tools after EVERY code change. Do not finish until code is error-free.
Auto-enforce coding standards after every code change in Code mode. Checks file size, nesting, naming, error handling, and anti-patterns.
Monitor and manage context window usage to prevent overflow and optimize token efficiency.
| name | component-design |
| description | Guide the design of beautiful, accessible, systematic UI components. Auto-triggers when creating or restyling components in FE Designer mode. |
| risk | safe |
| source | self |
| tags | ["design","components","ui","accessibility","tokens"] |
Auto-trigger when:
codebase_search("design tokens OR theme OR --color- OR --space-")
codebase_search("component OR Button OR Card OR Modal")
Khi styling một component, KIỂM TRA xem có reference file phù hợp không:
references/buttons.mdreferences/forms-inputs.mdreferences/cards-containers.mdreferences/navigation.mdreferences/modals-dialogs.mdreferences/typography-patterns.mdreferences/layout-grid.mdCHỈ đọc reference file liên quan (1-2 files tối đa). KHÔNG đọc tất cả. Dùng ĐÚNG ✅ patterns từ reference. Tránh SAI ❌ patterns.
Before writing code, produce a brief spec:
Apply in this order:
Run the UI Critique checklist from ui-critique-discipline.md:
When component needs logic beyond styling:
switch_mode or new_task with context:
## Context
Design spec for [ComponentName] completed in FE Designer mode.
## Task
Implement component logic: [specific logic needed]
## Constraints
- Use provided styling hooks (CSS classes / custom properties listed above)
- Do not modify token values or styling approach
- Maintain semantic HTML structure as specified
## Expected Output
Working component with business logic integrated into the design spec
Detailed rules: .roo/rules-fe-designer/component-design-patterns.md
Visual standards: .roo/rules-fe-designer/visual-design-standards.md
Accessibility: .roo/rules-fe-designer/accessibility-standards.md
Self-critique: .roo/rules-fe-designer/ui-critique-discipline.md