Agent Skills
› n8n-io/n8n
› n8n:design-system
n8n:design-system
GitHub提供前端设计系统的开发规范,指导Vue组件构建、样式管理及UI变更审查。涵盖CSS变量使用、现有组件优先原则、暗黑模式适配及Storybook故事编写标准,确保界面一致性与可维护性。
触发场景
修改 .vue/.css/.scss 文件
新增或重构 UI 组件
审查界面变更
实现深色模式适配
安装
npx skills add n8n-io/n8n --skill n8n:design-system -g -y
SKILL.md
Frontmatter
{
"name": "n8n:design-system",
"description": "Guidelines on using Design System styles and components. Use when working on .vue files in packages\/frontend. Triggers for tasks that include component architecture, styling, UI changes, or feature work."
}
Design System
Comprehensive guide for building, styling, and using components in the frontend.
When to Apply
Reference these guidelines when:
- Working on
.{vue|css|scss}files inpackages/frontend - Adding new components to
packages/frontend/@n8n/design-system - Refactoring styles for Vue components
- Implementing new UI components or features
- Reviewing changes to UI
Rules
- Follow guidelines in
packages/frontend/@n8n/design-system/src/styleguide/*.mdx - ALWAYS use CSS variables for styles from
packages/frontend/@n8n/design-system/src/css/_tokens.scssorpackages/frontend/@n8n/design-system/src/css/_primitives.scss. Use hard-coded values only when no suitable tokens. - ALWAYS prefer using existing components from
packages/frontend/@n8n/design-system/src/components. Prefer components that aren't marked@deprecated. - Use
light-dark()when alternating colors for ligh/dark mode - If you need to add hover/active alpha behavior to solid components, prefer
color-mix()with explicit percentages. - When working with animations or transitions, ALWAYS prefer using mixins from
packages/frontend/@n8n/design-system/src/css/mixins/motion.scss - When reviewing animations, follow the guides in
rules/web-animation-guidelines.md - When reviewing UI changes or adding new components, follow
rules/web-interface-guidelines.md
Storybook Stories
- ALWAYS add new stories to
packages/frontend/@n8n/design-system. - Every story must use one of these title categories:
Style guide: styles, tokens, and utilitiesCore: components used across the appAreas/<Product area>: patterns and components for a specific product area, for exampleAreas/SettingsorAreas/AssistantExperimental: beta components that require caution
Examples
- "Add a modal dialog for confirming workflow deletion" → Use
N8nDialog - "Add a dropdown to select workflow status" → Use
N8nDropdownorN8nSelect - "Add button with + icon to add new tiem" → Wrap
N8nButtonwithiconOnlyprop withN8nTooltipand wrap inN8nTooltip. UseN8nIconand proper aria-label. - "Add a destructive action button" → use
N8nButtonwithvariant="destructive" - "Make background color white/black" → Use
var(--background--surface)for white on light mode and "black" on dark mode - "Animate the title in gracefully" -> Use
fade-in-upmixin frommotion.scsswithvar(--duration--base)
版本历史
- c31d0e5 当前 2026-08-20 19:07


