Cursor Tailwind 编码规范

Model: qwen-max | ¥0.15/call
AI工具GPT-4.1智能助手CursorTailwind

Cursor Tailwind 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 tai,适用于各类文档与内容的智能化处理。

Calls: 1

Skill Documentation

Cursor Tailwind 编码规范

摘要

Cursor Tailwind 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 tai,适用于各类文档与内容的智能化处理。

**文件来源:** PatrickJS/awesome-cursorrules → `rules/tailwind-react-firebase-cursorrules-prompt-file.mdc`

**原仓库:** https://github.com/PatrickJS/awesome-cursorrules

**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)

这个 skill 是干什么的?

把 `tailwind-react-firebase-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。

> Cursor rules for Tailwind development with React and Firebase integration.

🤖 Agent 使用说明

👤 用户需要做什么?

适用场景

原始规则内容

globs: **/*
alwaysApply: false
---
Here are some best practices and rules to follow for creating a high-quality, mobile-first web app with excellent UI/UX using Tailwind, React, and Firebase:

Mobile-First Design:
Always design and implement for mobile screens first, then scale up to larger screens.
Use Tailwind's responsive prefixes (sm:, md:, lg:, xl:) to adjust layouts for different screen sizes.

Consistent Design System:
Create a design system with consistent colors, typography, spacing, and component styles.
Utilize Tailwind's configuration file (tailwind.config.js) to define your custom design tokens.

Performance Optimization:
Use React.lazy() and Suspense for code-splitting and lazy-loading components.
Implement virtualization for long lists using libraries like react-window.
Optimize images and use next/image for automatic image optimization in Next.js.

Responsive Typography:
Use Tailwind's text utilities with responsive prefixes to adjust font sizes across different screens.
Consider using a fluid typography system for seamless scaling.

Accessibility:
Ensure proper color contrast ratios using Tailwind's text-* and bg-* classes.
Use semantic HTML elements and ARIA attributes where necessary.
Implement keyboard navigation support.

Touch-Friendly UI:
Make interactive elements (buttons, links) at least 44x44 pixels for easy tapping.
Implement touch gestures for common actions (swipe, pinch-to-zoom) where appropriate.

USE THE IMAGES IN THE MOCKUPS FOLDER AS EXAMPLE OF HOW TO STYLE THE APP AND CREATE THE LAYOUT

WHEN CREATING A FILE DON'T CONFLICT IT WITH .TSX AND .JSX FILES

Firebase Best Practices:
Implement proper security rules in Firebase.
Use Firebase SDK's offline persistence for better performance and offline support.
Optimize queries to minimize read/write operations.

Error Handling and Feedback:
Implement proper error boundaries in React.
Provide clear feedback for user actions (loading states, success/error messages).

Animation and Transitions:
Use subtle animations to enhance UX (e.g., page transitions, micro-interactions).
Utilize Tailwind's transition utilities or consider libraries like Framer Motion.

Form Handling:
Use libraries like Formik or react-hook-form for efficient form management.
Implement proper form validation with clear error messages.

Code Organization:
Follow a consistent folder structure (e.g., components, hooks, pages, services).
Use custom hooks to encapsulate and reuse logic.

Native-like Features:
Implement pull-to-refresh for content updates.
Use smooth scrolling and momentum scrolling.
Consider using libraries like react-spring for physics-based animations.

Here’s a concise prompt for a language model to help you with the logic for creating AI-powered medication insights in your app:

Prompt:
Design a feature for a pill management app that tracks user interactions with medications (Take/Skip) and generates monthly adherence reports.

The app should:

User Interface:
Display pills for "Morning," 

...(完整内容在原仓库)...

数据来源

联系方式

有问题或建议,在本 skill 下留言。

FAQ

这个 skill 是干什么的?

把 `tailwind-react-firebase-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。

> Cursor rules for Tailwind development with React and Firebase integration.

👤 用户需要做什么?
  • [ ] 知道这条规则适合用在什么场景(参考下面"适用场景")
  • [ ] 把规则原文内容应用到 IDE 项目的 `.cursor/rules/` 目录(直接复制 .mdc 文件)
  • [ ] 调本 skill 时说清楚你的代码任务(语言/框架/目标)
  • [ ] 输出后人工 review 风格是否符合预期