AgentSkillsCN

Frontend CSS

遵循项目既定的方法论,无论是使用Tailwind实用类、BEM命名法、CSS模块,还是styled-components,编写可维护的CSS。在使用CSS为UI组件或页面进行样式设计,应用设计系统中的颜色与间距令牌,或与CSS框架合作时,应使用此技能。在编写实用类、自定义样式,或响应式设计规则时,应使用此技能。在处理.css、.scss、.module.css文件,或在JSX/模板中使用内联样式时,应使用此技能。在建立或维护设计令牌,以确保风格的一致性时,应使用此技能。在通过清除或树摇,优化CSS以适应生产构建时,应使用此技能。

SKILL.md
--- frontmatter
name: Frontend CSS
description: Write maintainable CSS following the project's established methodology, whether using Tailwind utility classes, BEM naming, CSS modules, or styled-components. Use this skill when styling UI components or pages with CSS, applying design system tokens for colors and spacing, or working with CSS frameworks. When writing utility classes, custom styles, or responsive design rules. When working with .css, .scss, .module.css files, or inline styles in JSX/templates. When establishing or maintaining design tokens for consistent styling. When optimizing CSS for production builds with purging or tree-shaking unused styles.

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 styling UI components or pages with CSS, Tailwind, or other styling approaches
  • When applying design system tokens for colors, spacing, typography, or shadows
  • When working with CSS files (.css, .scss, .sass, .less, .module.css)
  • When writing utility classes or custom CSS styles
  • When implementing responsive design rules with media queries or breakpoints
  • When working with CSS-in-JS solutions (styled-components, emotion, CSS modules)
  • When applying Tailwind utility classes or customizing Tailwind configuration
  • When following BEM naming conventions or other CSS methodologies
  • When optimizing CSS bundle size with purging or tree-shaking
  • When avoiding framework style overrides and working with framework patterns

Instructions

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