360 Secure SkillHub
360 安全技能中心

tailwind

该 Skill 提供 Tailwind CSS v4 的样式与配置最佳实践,覆盖构建配置、CSS 生成、打包优化、工具类模式、组件架构、主题令牌、响应式与动画共 8 类 42 条规则,并给出错误与正确代码示例;适用于配置构建工具、迁移 v4 样式、优化 CSS 包体以及实现响应式与主题。

PyModel
热度 0.00
最近更新 2026-10-18 21:48:36
分类:开发依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:代码生成 / 代码审查 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add pymodel/react-frontend-skills/tailwind
Metadata
name
tailwind
description
Tailwind CSS v4 styling and configuration.

Tailwind Labs Tailwind CSS v4 Best Practices

Comprehensive performance optimization guide for Tailwind CSS v4 applications, maintained by Tailwind Labs. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Configuring Tailwind CSS v4 build tooling (Vite plugin, PostCSS, CLI)
  • Writing or migrating styles using v4's CSS-first approach
  • Optimizing CSS bundle size and build performance
  • Implementing responsive designs with breakpoints or container queries
  • Setting up theming with @theme directive and design tokens

Rule Categories by Priority

Priority Category Impact Prefix
1 Build Configuration CRITICAL build-
2 CSS Generation CRITICAL gen-
3 Bundle Optimization HIGH bundle-
4 Utility Patterns HIGH util-
5 Component Architecture MEDIUM-HIGH comp-
6 Theming & Design Tokens MEDIUM theme-
7 Responsive & Adaptive MEDIUM resp-
8 Animation & Transitions LOW-MEDIUM anim-

Quick Reference

1. Build Configuration (CRITICAL)

2. CSS Generation (CRITICAL)

3. Bundle Optimization (HIGH)

4. Utility Patterns (HIGH)

5. Component Architecture (MEDIUM-HIGH)

6. Theming & Design Tokens (MEDIUM)

7. Responsive & Adaptive (MEDIUM)

8. Animation & Transitions (LOW-MEDIUM)

How to Use

Run in the project root first:

npx -y @pymodel/react-frontend-skills detect                 # installed vs. targeted versions
npx -y @pymodel/react-frontend-skills scan --skill tailwind  # deprecated APIs → rule IDs

Read references/<rule-id>.md for each rule above that matches the task and for each scan hit: why it matters, then incorrect vs. correct code.