Skip to main content
prompt GP ChatGPT

Tailwind CSS taste — ChatGPT prompt: what it does, how to install

Tailwind CSS taste is a prompt for ChatGPT, Claude.ai, and Claude Code that sets utility-first styling rules, design tokens, and bans arbitrary pixel sizes in Tailwind CSS code.

CC0-1.0 ★ 178,201 updated 2026-10-24

Open on GitHub

What Tailwind CSS taste does

This prompt instructs AI coding agents on strict Tailwind CSS practices, requiring design tokens for colors, spacing, and typography instead of arbitrary values like w-[437px]. It enforces prettier-plugin-tailwindcss for automated class sorting and clsx with tailwind-merge for safe prop overriding. Static class strings are mandated to let the scanner detect them properly.

The rules cover mobile-first styling, container queries, semantic color names for dark mode, and focus-visible rings for accessibility. It also details when to use the typography plugin, how to handle animations with motion-reduce, and limits the use of !important and arbitrary spacing.

For Claude Code, place the file at .claude/commands/prompts.csv.md. Provide the prompt to your AI assistant before generating frontend markup to enforce these conventions.

What it helps with

  • configure design tokens in the Tailwind theme
  • eliminate arbitrary pixel values in component markup
  • sort classes automatically with Prettier
  • implement dark mode with semantic CSS variables
  • handle component variants cleanly with a typed helper

Example prompts for the agent

  • Apply Tailwind CSS taste rules to this component markup
  • Review the frontend code against Tailwind CSS taste guidelines
  • Refactor arbitrary Tailwind classes into proper theme tokens

How to install Tailwind CSS taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about Tailwind CSS taste

How to install Tailwind CSS taste in Claude Code?

Create the file .claude/commands/prompts.csv.md and save the prompt text inside it.

What does Tailwind CSS taste do?

It provides a set of engineering rules for writing clean utility-first Tailwind CSS markup with AI agents.

What tools and libraries are mentioned in the prompt?

The prompt references Prettier plugin for Tailwind, clsx, tailwind-merge, cva, and Storybook.

Source text

prompts.csv · CC0-1.0
# Tailwind CSS taste of a utility-first UI engineer
- Configure design tokens (colors, spacing, radii, fonts) once in the Tailwind theme and never hardcode hex values or arbitrary pixel sizes in markup. Confidence: 0.90
- Prefer theme-scale utilities over arbitrary values like `w-[437px]`; treat each arbitrary value as a missing token to add or a design to question. Confidence: 0.85
- Extract repeated utility groups into components (React, Vue, Svelte) rather than `@apply` classes in CSS files. Confidence: 0.85
- Reserve `@apply` for styling third-party markup or CMS content you cannot add classes to. Confidence: 0.75
- Use `prettier-plugin-tailwindcss` so class order is automatic and never argued about in review. Confidence: 0.95
- Build class names from complete static strings; never concatenate fragments like `text-${color}-500`, because the scanner cannot see them. Confidence: 0.95
- Use `clsx` plus `tailwind-merge` (or a `cn()` helper) so component props can override default classes without conflicts. Confidence: 0.85
- Model component variants with a typed variant helper such as `cva` instead of long ternary chains in `className`. Confidence: 0.80
- Write mobile-first: unprefixed utilities are the base and `sm:`, `md:`, `lg:` only add changes for wider screens. Confidence: 0.90
- Use container queries (`@container`, `@md:`) for reusable components whose layout depends on their slot, not the viewport. Confidence: 0.70
- Implement dark mode with CSS variables behind semantic color names like `bg-surface` and `text-muted`, rather than sprinkling `dark:` on every element. Confidence: 0.80
- Always style keyboard focus with `focus-visible:` rings and never remove outlines without a visible replacement. Confidence: 0.95
- Use the `typography` plugin's `prose` classes for long-form rendered Markdown instead of hand-styling every tag. Confidence: 0.80
- Keep `content`/source paths tight so builds stay fast and unused utilities never ship. Confidence: 0.85
- Use `group-*` and `peer-*` variants for parent and sibling state instead of adding JavaScript for hover or checked styles. Confidence: 0.75
- Respect `motion-reduce:` for animations and keep transitions short, around 150 to 200 ms. Confidence: 0.80
- Split a class list over several lines or into a variant object once it passes roughly 10 to 12 utilities. Confidence: 0.65
- Keep spacing on a consistent scale and use `gap-*` on flex and grid parents instead of margins on children. Confidence: 0.85
- Avoid `!important` modifiers except to override third-party styles you cannot change. Confidence: 0.80
- Document the token palette and the core components in Storybook or a styleguide page so designers and developers share one vocabulary. Confidence: 0.70

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Frontend and UI →

From the same set218

The whole set →
API Rate Limiting taste API Rate Limiting taste — a prompt for ChatGPT that defines rate limiting rules for API endpoints. Helps design backend protection against abuse and traffic spikes. GP ChatGPT ★ 178,201repo stars Python Type Hints taste The Python Type Hints taste ChatGPT prompt sets conventions for typing Python code. It covers annotations, type choices, and static checking. GP ChatGPT ★ 178,201repo stars Secrets Management taste Secrets Management taste — a prompt for ChatGPT that defines security standards and best practices for secrets management. GP ChatGPT ★ 178,201repo stars Tokio Async Rust taste The Tokio Async Rust taste prompt for ChatGPT sets engineering conventions for asynchronous Rust services built with Tokio. It applies while writing or reviewing code that handles task cancellation, network timeouts, and shutdown. GP ChatGPT ★ 178,201repo stars Vite Frontend Tooling taste The Vite Frontend Tooling taste ChatGPT prompt sets preferences for building frontend projects with Vite. It covers app setup, type checks, tests, and release builds. GP ChatGPT ★ 178,201repo stars Linux Server Hardening taste Linux Server Hardening taste — a prompt for ChatGPT provides an operations engineering ruleset for hardening Linux servers. It guides base image setup, SSH access policies, and automated configuration via Ansible or cloud-init. GP ChatGPT ★ 178,201repo stars Database Schema Design taste The Database Schema Design taste ChatGPT prompt sets rules for designing relational database schemas. It covers keys, constraints, indexes, and data storage. GP ChatGPT ★ 178,201repo stars Solidity Smart Contract taste The Solidity Smart Contract taste prompt for ChatGPT, Claude.ai, and Claude Code sets security standards for writing Solidity smart contracts. It helps protocol engineers implement best practices during development. GP ChatGPT ★ 178,201repo stars

Project sponsors

Companies that keep this analytics open