tailwind
Tailwind CSS v4 patterns and design systems. Use when configuring Tailwind themes, building components, implementing dark mode, using container queries, migrating from v3, integrating shadcn/ui, or fixing build errors. Use for tailwind, css, styling, theme, design-tokens.
What this skill does
# Tailwind CSS (v4+)
## Overview
Tailwind CSS v4 skill covering CSS-first configuration, design tokens, component patterns, shadcn/ui integration, dark mode, container queries, migration from v3, and custom utilities.
**When to use:** Configuring Tailwind themes, building utility-first components, implementing dark mode, using container queries, migrating from v3, integrating shadcn/ui, troubleshooting build errors.
**When NOT to use:** Tailwind v3 legacy projects that will not upgrade, projects using a different styling approach (CSS Modules, styled-components) without plans to adopt Tailwind.
## Quick Reference
| Pattern | API | Key Points |
| -------------------- | ----------------------------------------------------- | ------------------------------------------------ |
| CSS-first config | `@theme { --color-brand: oklch(...); }` | All config in CSS, no `tailwind.config.js` |
| Import entry | `@import "tailwindcss";` | Replaces `@tailwind base/components/utilities` |
| Custom utilities | `@utility name { ... }` | Replaces `@layer utilities`, works with variants |
| Functional utilities | `@utility tab-* { tab-size: --value(--tab-size-*); }` | Accept dynamic values via `--value()` |
| Plugin loading | `@plugin "@tailwindcss/typography";` | Replaces `require()` in config |
| Container queries | `@container` parent + `@md:` child | Built-in, no plugin needed |
| Named containers | `@container/sidebar` + `@md/sidebar:` | Scope queries to specific containers |
| Dark mode variant | `@custom-variant dark (&:where(.dark, .dark *));` | Class-based dark mode override |
| Theme inline | `@theme inline { --color-bg: var(--bg); }` | Inlines values at build, single-theme only |
| Source detection | `@source "../node_modules/my-lib";` | Explicitly add scan paths |
| Reference import | `@reference "../../app.css";` | Use theme in Vue/Svelte scoped styles |
| Override defaults | `--color-*: initial;` inside `@theme` | Reset a category before redefining |
| Dynamic values | `grid-cols-(--my-var)` | Use CSS variables in utility values |
| Text shadows | `text-shadow-*` | Built-in text shadow utilities |
| Starting styles | `starting:opacity-0` | `@starting-style` variant for entry animations |
| Masks | `mask-*` | CSS mask utilities for image/gradient masking |
| Field sizing | `field-sizing-content` | Auto-sizing textareas and inputs |
| Inset shadows | `inset-shadow-*`, `inset-ring-*` | Inner shadow and ring utilities |
| User validation | `user-valid:`, `user-invalid:` | Form validation after user interaction |
| Pointer queries | `pointer-fine:`, `pointer-coarse:` | Target input device precision |
| Inert | `inert:opacity-50` | Style inert elements |
| Logical spacing | `pbs-*`, `pbe-*`, `mbs-*`, `mbe-*` | Block-direction padding/margin (v4.2) |
| Logical sizing | `inline-*`, `block-*`, `min-inline-*`, `max-block-*` | Logical width/height utilities (v4.2) |
| Logical inset | `inset-s-*`, `inset-e-*`, `inset-bs-*`, `inset-be-*` | Logical positioning; replaces `start-*`/`end-*` |
| Logical borders | `border-bs-*`, `border-be-*` | Block-direction border utilities (v4.2) |
| Font features | `font-features-['smcp']` | OpenType `font-feature-settings` (v4.2) |
| New color palettes | `mauve`, `olive`, `mist`, `taupe` | Additional neutral palettes (v4.2) |
| Webpack integration | `@tailwindcss/webpack` | Run Tailwind as a webpack plugin (v4.2) |
| Color space | OKLCH | Default in v4, sRGB fallbacks generated |
## Common Mistakes
| Mistake | Correct Pattern |
| ----------------------------------------- | ------------------------------------------------ |
| Using `tailwind.config.js` in v4 | Configure via `@theme { ... }` in CSS |
| `hsl(var(--background))` double-wrap | Reference directly: `var(--background)` |
| `:root`/`.dark` inside `@layer base` | Define at root level, outside any `@layer` |
| `@apply` with `@layer components` classes | Use `@utility` directive for custom utilities |
| `@theme inline` for multi-theme switching | Use `@theme` without `inline` for dynamic themes |
| Raw colors like `bg-blue-500` everywhere | Semantic tokens (`bg-primary`) that auto-adapt |
| `require()` or `@import` for plugins | Use `@plugin "package-name";` |
| `tailwindcss-animate` in v4 | Use `tw-animate-css` instead |
| Missing `@theme inline` with shadcn/ui | Map all CSS variables in `@theme inline` block |
| Using `theme('colors.brand')` in CSS | Use `var(--color-brand)` native CSS variables |
| Using deprecated `start-*`/`end-*` inset | Use `inset-s-*`/`inset-e-*` logical utilities |
## Delegation
- **Class pattern discovery and usage examples**: Use `Explore` agent
- **v3 to v4 migration across multiple files**: Use `Task` agent
- **Design token hierarchy and theming architecture**: Use `Plan` agent
> If the `motion` skill is available, delegate complex animation patterns (spring physics, gestures, scroll-linked) to it.
## References
- [Configuration](references/configuration.md) -- CSS-first config, @theme, @theme inline, @utility, @plugin, @source, @reference, @variant directives
- [Design Tokens](references/design-tokens.md) -- OKLCH token system, brand scales, semantic tokens, shadows, z-index, fluid typography
- [Component Patterns](references/component-patterns.md) -- Layouts, grids, container queries, 3D transforms, subgrid, CVA variants
- [UI Patterns](references/ui-patterns.md) -- Buttons, forms, navigation, cards, typography with variants, states, accessibility
- [Dark Mode](references/dark-mode.md) -- Class-based dark mode, multi-theme systems, ThemeProvider, @custom-variant
- [shadcn/ui Integration](references/shadcn-integration.md) -- Four-step architecture, components.json, tw-animate-css, Vite setup
- [Migration](references/migration.md) -- v3 to v4 migration steps, breaking changes, upgrade tool, common gotchas
- [Troubleshooting](references/troubleshooting.md) -- Common errors, build fixes, CSS layer issues, PostCSS problems
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.