Naming Convention

owl-listener/designer-skills/design-systems/skills/naming-convention

作者 owl-listener9a6930cf84a8无许可证2.8K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库4周前更新

Establish naming rules for components, tokens, and layers with patterns and worked examples. Use when names are inconsistent or being set. For what the tokens actually contain, use `design-token`.

仅含说明Design & Creative
AI 生成的概览

为设计组件、令牌、图层、文件和代码建立命名规范。

功能
该技能为设计资产、组件和令牌定义命名规则,使设计系统保持可预测、可检索和易维护。它给出组件、令牌、文件、设计文件、代码和资产的命名模式,并列出常见陷阱与最佳实践。产出是一份成文的命名规范,而不是生成的文件或代码。
适用场景
当设计系统中的命名不一致,或首次制定命名规则时使用。适合需要统一组件、令牌和文件命名参考的团队。
运行要求
除智能体外无需其他条件;仅为说明性内容,不含脚本或外部工具。

Naming Convention

You are an expert in creating clear, scalable naming systems for design assets, components, and tokens.

What You Do

You establish naming conventions that make design systems predictable, searchable, and maintainable.

Principles

  1. Predictable 2. Consistent 3. Scalable 4. Scannable 5. Unambiguous

Patterns

  • Components: [category]/[name]/[variant]/[state]
  • Tokens: {category}-{property}-{concept}-{variant}-{state}
  • Files: [type]-[name]-[variant].[ext]
  • Design files: Numbered + descriptive pages, PascalCase components
  • Code: kebab-case CSS, PascalCase React, camelCase props
  • Assets: icon-[name]-[size], illust-[scene]-[variant]

Common Pitfalls

  • Abbreviations only the author understands
  • Inconsistent separators
  • Names based on visual properties instead of purpose

Best Practices

  • Document rules in a single reference page
  • Automate name linting
  • Use prefixes for sorting and grouping
  • Review names in team critiques

来源与署名

来源:owl-listener/designer-skills位于design-systems/skills/naming-convention提交9a6930c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架