frontend-css
使用项目的方法(Tailwind、BEM、CSS 模块)以及适当的设计标记和性能优化来编写一致、可维护的 CSS。在编写或修改样式、CSS 类、Tailwind 实用程序或与样式相关的代码时使用此技能。当处理 *.css、*.scss、*.module.css、tailwind.config.js 等文件或具有内联/实用样式的组件时。当应用设计系统标记(颜色、间距、排版)时,避免框架样式覆盖,或通过清除/tree-shaking 优化 CSS 以进行生产。
📖 中文导读:使用项目的方法(Tailwind、BEM、CSS 模块)以及适当的设计标记和性能优化来编写一致、可维护的 CSS。在编写或修改样式、CSS 类、Tailwind 实用程序或与样式相关的代码时使用此技能。当处理 *.css、*.scss、*.module.css、tailwind.config.js 等文件或具有内联/实用样式的组件时。当应用设计系统标记(颜色、间距、排版)时,避免框架样式覆盖,或通过清除/tree-shaking 优化 CSS 以进行生产。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Frontend CSS description: Write consistent, maintainable CSS using the project's methodology (Tailwind, BEM, CSS Modules) with proper design tokens and performance optimization. Use this skill when writing or modifying styles, CSS classes, Tailwind utilities, or styling-related code. When working on files like *.css, *.scss, *.module.css, tailwind.config.js, or components with inline/utility styles. When applying design system tokens (colors, spacing, typography), avoiding framework style overrides, or optimizing CSS for production with purging/tree-shaking.
When to use this skill:
- When writing new CSS or styling code
- When modifying existing stylesheets or style definitions
- When working on files like *.css, *.scss, *.module.css, or tailwind.config.js
- When applying Tailwind utility classes to components
- When using BEM naming conventions for CSS classes
- When working with CSS Modules or scoped styles
- When applying design tokens (colors, spacing, typography)
- When tempted to override framework default styles
- When deciding between custom CSS and framework utilities
- When configuring CSS purging or tree-shaking for production
- When maintaining consistency with the project's CSS methodology
- When reviewing styles for design system compliance
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.
Instructions
For details, refer to the information provided in this file: frontend CSS