/nuxt-modern-dev:tailwindcss4from nuxt-modern-dev
Guides Tailwind CSS 4 usage in Nuxt/Vue projects: setup via @tailwindcss/vite, migration from v3, and enforcing utility-first patterns.
Ships in nuxt-modern-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Baseline: Tailwind 4.x via @tailwindcss/vite. Confirm the exact version from the repository lockfile.
| ALWAYS | NEVER |
|---|---|
| Utility classes in templates | style="..." or :style for layout/color/spacing |
@tailwindcss/vite plugin | @nuxtjs/tailwindcss module (v3 path) |
CSS @theme for design tokens | New tailwind.config.js as primary config |
| Extract repeated UI to components | Large @apply blocks as a style system |
Responsive + state variants (md:, hover:) | <style scoped> for anything Tailwind can do |
Violating the letter of the Tailwind-only rule is violating the spirit. Hooks may block scoped/inline styles; skills still teach the judgment call.
@apply soup@theme in app/assets/css/main.cssreferences/migration-v3-to-v4.md// nuxt.config.ts
import tailwindcss from '@tailwindcss/vite'
export default defineNuxtConfig({
vite: { plugins: [tailwindcss()] },
css: ['~/assets/css/main.css'],
})
/* app/assets/css/main.css */
@import "tailwindcss";
@theme {
--color-brand: #2563eb;
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}
<!-- good -->
<button class="rounded-xl bg-blue-600 px-6 py-3 text-white hover:bg-blue-700">
Submit
</button>
<!-- bad -->
<button style="padding: 12px">Submit</button>
<style scoped>
.btn { padding: 12px; }
</style>
bun add -d tailwindcss @tailwindcss/vite
# remove legacy: @nuxtjs/tailwindcss, tailwind.config.js (after migration)
| When | Read |
|---|---|
| Migrating from Tailwind 3 | references/migration-v3-to-v4.md |
| Excuse | Reality |
|---|---|
| "Just one scoped style" | Becomes many; use utilities or a component |
| "Need arbitrary values always" | Prefer theme tokens; arbitrary is escape hatch |
| "v3 config still works fine" | New apps and migrations use v4 CSS-first path |
@tailwindcss/vite, not Nuxt Tailwind module@theme when brand-specificWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tailwindcss4, nuxt-styling, vue-ui, migration-v3-to-v4, utility-first
npx claudepluginhub pstuart/pstuart --plugin nuxt-modern-dev7 skills in this plugin
/accessibility-auditAudit web pages and apps for WCAG 2.1 AA accessibility compliance. Use when fixing lighthouse issues, contrast ratios, ARIA labels, or keyboard navigation./nuxt4-frontendUse when building or reviewing Nuxt 4 apps, app/ directory layout, pages, layouts, server routes, composables, layers, or Nuxt data fetching./security-auditSecurity audit checklist for web applications. Use when reviewing security posture, checking for vulnerabilities, or hardening a deployment./typescript-strictUse when writing or reviewing TypeScript in Vue, Nuxt, Node, or shared TS utilities, fixing type errors, or deciding how to type API responses and composables./vue3-compositionUse when writing Vue 3 components or composables, choosing Options vs Composition API, handling reactivity, provide/inject, or script setup patterns./web-qualityUse when setting up or running ESLint, Prettier, Vitest, or Playwright for Nuxt/Vue projects, deciding what to test, or enforcing pre-deploy quality gates.Other plugins' skills for the same job