ワンクリックで
tailwind-css
Use for Tailwind v4 styling: add/fix classes, configure or migrate Tailwind, use tailwind-variants, or tw-animate-css.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use for Tailwind v4 styling: add/fix classes, configure or migrate Tailwind, use tailwind-variants, or tw-animate-css.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use only when explicitly asked to archive/prune/compact/roll over checked tasks from TODO.md into `.ai/todos/TODO_UNTIL_YYYY_MM_DD.md`, leaving unchecked tasks.
Use only when explicitly invoked for Git commit workflows: stage intended changes, craft Conventional Prefix Format messages by default, Natural Language messages with --natural or configured repos, commit, and optionally --all, --staged, --deep, --close, or --push.
Use for dependency updates: update/bump deps, npm/pnpm/yarn/bun package upgrades, outdated checks, package.json updates, or taze.
Use for release versioning: bump/cut/tag a release, bump version, create a release, changelog updates, or version tagging.
Use for GitHub PR/issue/discussion workflows: create/update PRs or issues, post comments, start discussions; triggers include create/open PR, file/update issue, yeet.
Use to polish recently changed code: simplify for readability/maintainability and run a risk-profiled review that autonomously applies fixes. Default runs both passes; pass --simplify or --review for one. Covers code/PR review, audits, bug/security checks, reviewing diffs or changes, cleanup, refactoring, and reducing complexity.
| disable-model-invocation | false |
| name | tailwind-css |
| user-invocable | false |
| description | Use for Tailwind v4 styling: add/fix classes, configure or migrate Tailwind, use tailwind-variants, or tw-animate-css. |
Expert guidance for Tailwind CSS v4, CSS-first configuration, modern utility patterns, and type-safe component styling with tailwind-variants.
Tailwind CSS v4 eliminates tailwind.config.ts in favor of CSS-only configuration. All configuration lives in CSS files using special directives.
Core Directives:
@import "tailwindcss" - Entry point that loads Tailwind@theme { } - Define or extend design tokens@theme static { } - Define tokens that should not generate utilities@utility - Create custom utilities@custom-variant - Define custom variantsMinimal Example:
@import "tailwindcss";
@theme {
--color-brand: oklch(0.72 0.11 178);
--font-display: "Inter", sans-serif;
--spacing-edge: 1.5rem;
}
All theme tokens defined with @theme automatically become available as utility classes. For example, --color-brand can be used as bg-brand, text-brand, border-brand, etc.
Use eslint-plugin-better-tailwindcss for Tailwind CSS v4 class validation and style enforcement.
Correctness Rules (errors):
no-conflicting-classes - Detect classes that override each otherno-unknown-classes - Flag classes not registered with TailwindStylistic Rules (warnings):
enforce-canonical-classes - Use standard v4 class namesenforce-shorthand-classes - Use abbreviated class versionsno-deprecated-classes - Remove outdated class namesno-duplicate-classes - Eliminate redundant declarationsno-unnecessary-whitespace - Clean up extra spacingExamples:
// ❌ Bad: separate padding
<div className="px-6 py-6">
// ✅ Good: shorthand
<div className="p-6">
// ❌ Bad: separate width/height
<div className="w-6 h-6">
// ✅ Good: size utility
<div className="size-6">
Run the project's ESLint check after modifying Tailwind classes to validate all changes across the codebase.
For detailed coding patterns covering layout, spacing, typography, colors, borders, gradients, arbitrary values, class merging, image sizing, z-index, and dark mode, see references/coding-preferences.md.
Use CSS Modules only as a last resort for complex CSS that cannot be easily written with Tailwind classes.
All .module.css files must include @reference "#tailwind"; at the top to enable Tailwind utilities and theme tokens inside the module.
Example:
/* component.module.css */
@reference "#tailwind";
.component {
/* Complex CSS that can't be expressed with Tailwind utilities */
/* Can still use Tailwind utilities and theme tokens */
}
references/tailwind-variants.md for patterns@theme configuration for available tokenstv() from tailwind-variants for type-safe variantsExample:
import { tv } from "tailwind-variants";
const button = tv({
base: "rounded-lg px-4 py-2 font-medium",
variants: {
color: {
primary: "bg-blue-600 text-white",
secondary: "bg-gray-600 text-white",
},
size: {
sm: "text-sm",
md: "text-base",
lg: "text-lg",
},
},
});
references/tailwind-v4-rules.md for breaking changesbg-linear-*, not bg-gradient-*)bg-my-color, not bg-[--var-my-color])@theme configuration@theme configuration first to see available colors/20, /50, etc.)Example:
// ✅ Good: theme token with opacity
<div className="bg-brand/20 text-brand">
// ❌ Avoid: arbitrary hex
<div className="bg-[#4f46e5]/20 text-[#4f46e5]">
references/tw-animate-css.md for available animationsanimate-in or animate-out) with effect classes[0.625rem] syntax, not 2.5Example:
// Enter: fade + slide up
<div className="fade-in slide-in-from-bottom-4 duration-300 animate-in">
// Exit: fade + slide down
<div className="fade-out slide-out-to-bottom-4 duration-200 animate-out">
| Aspect | Pattern |
|---|---|
| Configuration | CSS-only: @theme, @utility, @custom-variant |
| Gradients | bg-linear-*, bg-radial, bg-conic |
| Opacity | Modifier syntax: bg-black/50 |
| Line Height | Modifier syntax: text-base/7 |
| Font Features | font-features-zero, font-features-ss01, etc. |
| CSS Variables | bg-my-color (auto-created from @theme) |
| CSS Modules | @reference "#tailwind"; at top |
| Class Merging | cn() for conditionals; plain string for static |
| Viewport | min-h-dvh (not min-h-screen) |
| Component Variants | references/tailwind-variants.md |
| Animations | references/tw-animate-css.md |
| V4 Rules | references/tailwind-v4-rules.md |
references/tailwind-v4-rules.md — Breaking changes, removed/renamed utilities, layout rules, typography, gradients, CSS variables, new v4 features, common pitfallsreferences/tailwind-variants.md — Component variants, slots API, composition, TypeScript integration, responsive variantsreferences/tw-animate-css.md — Enter/exit animations, slide/fade/zoom utilities, spacing gotchas