AgentSkillsCN

Frontend CSS

按照项目的规范(Tailwind实用类)编写一致、可维护的CSS,同时尽量减少自定义CSS并遵守设计系统令牌。在编写或编辑CSS文件、React组件中的Tailwind类(.tsx、.jsx文件)、实现设计系统颜色/间距/排版、使用Tailwind实用类、决定框架实用类与自定义CSS之间、用tree-shaking优化生产环境的CSS、配置Tailwind主题扩展,或在整个应用中保持设计一致性时使用此技能。

SKILL.md
--- frontmatter
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