frontend-css

majiayu000 的头像作者 majiayu000

使用一致的方法、设计系统、框架实用程序和最小的自定义样式编写和维护 CSS,以获得更好的性能和可维护性。在编写或修改 CSS 文件、样式模块、Tailwind 类、样式组件、CSS-in-JS 或 UI 组件的任何样式代码时,请使用此技能。在应用实用程序类、维护颜色/间距/版式的设计标记、使用 Tailwind 或 Bootstrap 等 CSS 框架、避免框架样式覆盖、通过清除/树摇动优化 CSS 进行生产或实现响应式样式时,请使用此功能。在处理 .css、.scss、.module.css 文件或向组件添加 className/style 属性时使用此选项。

📖 中文导读:使用一致的方法、设计系统、框架实用程序和最小的自定义样式编写和维护 CSS,以获得更好的性能和可维护性。在编写或修改 CSS 文件、样式模块、Tailwind 类、样式组件、CSS-in-JS 或 UI 组件的任何样式代码时,请使用此技能。在应用实用程序类、维护颜色/间距/版式的设计标记、使用 Tailwind 或 Bootstrap 等 CSS 框架、避免框架样式覆盖、通过清除/树摇动优化 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