frontend-css

DevanB 的头像作者 DevanB

遵循项目方法论(Tailwind 实用类)编写一致、可维护的 CSS,同时最小化自定义 CSS 并遵循设计系统令牌。编写或编辑 CSS 文件、React 组件(.tsx、.jsx 文件)中的 Tailwind 类、实施设计系统颜色/间距/排版、使用 Tailwind 实用类、在框架实用程序与自定义 CSS 之间做决定、使用 tree-shaking 优化生产 CSS、配置 Tailwind 主题扩展或在整个应用程序中保持设计一致性时使用此技能。

📖 中文导读:遵循项目方法论(Tailwind 实用类)编写一致、可维护的 CSS,同时最小化自定义 CSS 并遵循设计系统令牌。编写或编辑 CSS 文件、React 组件(.tsx、.jsx 文件)中的 Tailwind 类、实施设计系统颜色/间距/排版、使用 Tailwind 实用类、在框架实用程序与自定义 CSS 之间做决定、使用 tree-shaking 优化生产 CSS、配置 Tailwind 主题扩展或在整个应用程序中保持设计一致性时使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Frontend CSS description: Write consistent, maintainable CSS following the project's methodology (Tailwind utility classes) while minimizing custom CSS and adhering to design system tokens. Use this skill when writing or editing CSS files, Tailwind classes in React components (.tsx, .jsx files), when implementing design system colors/spacing/typography, when using Tailwind utility classes, when deciding between framework utilities vs. custom CSS, when optimizing CSS for production with tree-shaking, when configuring Tailwind theme extensions, or when maintaining design consistency across the application.

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 writing or editing CSS files in the project
  • When applying Tailwind CSS utility classes in React components (.tsx, .jsx files)
  • When implementing design system tokens (colors, spacing, typography)
  • When configuring Tailwind theme extensions using the @theme directive
  • When deciding between using framework utilities vs. writing custom CSS
  • When maintaining consistent styling patterns across components
  • When optimizing CSS for production with purging/tree-shaking
  • When avoiding unnecessary framework style overrides
  • When working with the project's CSS methodology (Tailwind, BEM, utility-first, etc.)
  • When implementing responsive styles using Tailwind breakpoints
  • When ensuring CSS performance and bundle size optimization

Instructions

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