frontend-css

使用一致的方法论、设计系统、框架工具和最小自定义样式来编写和维护CSS,以提高性能和可维护性。当编写或修改CSS文件、样式模块、Tailwind类、styled-components、CSS-in-JS或任何UI组件的样式代码时使用此技能。应用工具类、维护颜色/间距/字体的设计令牌、使用Tailwind或Bootstrap等CSS框架、避免框架样式覆盖、使用purging/tree-shaking优化生产环境的CSS、实施响应式样式时使用此技能。在处理.css、.scss、.module.css文件或向组件添加className/style属性时使用此技能。

📖 中文导读:使用一致的方法论、设计系统、框架工具和最小自定义样式来编写和维护CSS,以提高性能和可维护性。当编写或修改CSS文件、样式模块、Tailwind类、styled-components、CSS-in-JS或任何UI组件的样式代码时使用此技能。应用工具类、维护颜色/间距/字体的设计令牌、使用Tailwind或Bootstrap等CSS框架、避免框架样式覆盖、使用purging/tree-shaking优化生产环境的CSS、实施响应式样式时使用此技能。在处理.css、.scss、.module.css文件或向组件添加className/style属性时使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Frontend CSS description: Write and maintain CSS using consistent methodology, design systems, framework utilities, and minimal custom styles for better performance and maintainability. Use this skill when writing or modifying CSS files, style modules, Tailwind classes, styled-components, CSS-in-JS, or any styling code for UI components. Use this when applying utility classes, maintaining design tokens for colors/spacing/typography, working with CSS frameworks like Tailwind or Bootstrap, avoiding framework style overrides, optimizing CSS for production with purging/tree-shaking, or implementing responsive styling. Use this when working on .css, .scss, .module.css files or when adding className/style attributes to components.

Frontend CSS

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle frontend CSS.

When to use this skill:

  • When creating or editing CSS files (.css, .scss, .sass, .less, .module.css)
  • When applying CSS framework utility classes (Tailwind, Bootstrap, etc.) to components
  • When writing styled-components, CSS-in-JS, or inline styles in component files
  • When maintaining design tokens and design system variables (colors, spacing, typography)
  • When implementing consistent CSS methodology (BEM, utility-first, CSS modules)
  • When avoiding excessive custom CSS by leveraging framework patterns and utilities
  • When ensuring CSS performance through purging unused styles and tree-shaking
  • When adding responsive styling and breakpoint-specific styles
  • When working with global stylesheets or component-scoped styles
  • When refactoring to reduce custom CSS and align with framework conventions
  • When setting up CSS configuration files (tailwind.config.js, postcss.config.js)

Instructions

For details, refer to the information provided in this file: frontend CSS