| name | nuxt4-dev |
| description | Full-stack Nuxt 4 development skill. Use this skill whenever working on a Nuxt 4 project needing help with:
- Project setup and configuration (Nuxt 4.x, nuxt.config.ts, app/ directory structure)
- Tailwind CSS v4 integration (@nuxt/ui v4.5+, CSS-first configuration)
- Nuxt UI v3/v4 components (UTable with id/accessorKey, UModal with title/description props)
- Prisma ORM setup (v6.x, better-sqlite3 adapter, migrations, singleton db.ts pattern)
- Authentication with nuxt-auth-utils (v0.5.x, email/password, OAuth GitHub/Google)
- Testing with Vitest (v4.x) and Playwright (v1.58+)
- Admin dashboard patterns (role-based access, protected routes, data tables)
Make sure to use this skill whenever the user mentions Nuxt, even if they just say "add a table", "set up login", or "create a dashboard" - this skill covers the complete workflow from initialization to deployment.
|
Nuxt 4 Full-Stack Development Guide
This skill helps you develop full-stack applications with Nuxt 4, Tailwind CSS v4, Nuxt UI, Prisma ORM, and nuxt-auth-utils.
Quick Start
When starting a new Nuxt 4 project or adding features, follow these steps:
- Project Setup - Initialize Nuxt 4 with required modules
- Database Setup - Configure Prisma ORM
- Authentication - Set up nuxt-auth-utils for login/register/OAuth
- UI Components - Use Nuxt UI v4 components correctly
- Testing - Write unit and E2E tests
Core Technologies
| Technology | Purpose | Key Files |
|---|
| Nuxt 4 | Full-stack framework | nuxt.config.ts, app/, server/ |
| Tailwind CSS v4 | Styling | assets/css/main.css |
| Nuxt UI v3/v4 | UI components | components/, pages/ |
| Prisma ORM | Database | prisma/schema.prisma, server/utils/db.ts |
| nuxt-auth-utils | Authentication | server/api/auth/, server/utils/db-auth.ts |
| Vitest | Unit testing | test/unit/, vitest.config.ts |
| Playwright | E2E testing | test/e2e/, playwright.config.ts |
When to Use This Skill
Use this skill when:
- Setting up a new Nuxt 4 project with full-stack capabilities
- Configuring Tailwind CSS v4 in a Nuxt project
- Using Nuxt UI components (especially UTable, UModal)
- Setting up Prisma with SQLite/PostgreSQL
- Implementing authentication (email/password or OAuth)
- Writing tests for Nuxt applications
- Debugging common Nuxt 4 issues
Reference Files
For detailed information on specific topics, read these reference files:
- Project Structure โ
references/project-structure.md - app/ directory, auto-imports, common pitfalls
- Tailwind v4 โ
references/tailwind4.md - CSS configuration, new v4 features
- Nuxt UI v4 โ
references/nuxt-ui-v4.md - Component usage, common pitfalls
- Prisma โ
references/prisma.md - Schema design, migrations, client setup
- Testing โ
references/testing.md - Vitest unit tests, Playwright E2E
- Authentication โ
references/auth.md - nuxt-auth-utils, OAuth setup
Project Structure
project/
โโโ app/ # Nuxt 4 app directory (replaces pages/, components/)
โ โโโ assets/css/ # CSS files (main.css for Tailwind)
โ โโโ components/ # Vue components
โ โโโ composables/ # Composable functions
โ โโโ pages/ # Page components
โโโ server/
โ โโโ api/ # API endpoints
โ โโโ routes/ # Server routes (OAuth callbacks)
โ โโโ utils/ # Server utilities (db.ts, db-auth.ts)
โโโ prisma/
โ โโโ schema.prisma # Database schema
โ โโโ migrations/ # Database migrations
โโโ test/
โ โโโ unit/ # Vitest unit tests
โ โโโ e2e/browser/ # Playwright E2E tests
โโโ nuxt.config.ts # Nuxt configuration
โโโ vitest.config.ts # Unit test config
โโโ vitest.e2e.config.ts # E2E test config
โโโ playwright.config.ts # Playwright config
Common Workflows
Adding a New Feature
- Update
prisma/schema.prisma with new models
- Run
pnpm prisma migrate dev to generate migration
- Create API endpoints in
server/api/
- Create UI components in
app/components/ or app/pages/
- Write tests in
test/unit/ or test/e2e/
Debugging Common Issues
- UTable column errors โ Check
references/nuxt-ui-v4.md for id vs key
- UModal accessibility warnings โ Add
title and description props
- Prisma client not found โ Run
pnpm prisma generate
- Auth session not working โ Check
server/utils/db-auth.ts setup
- Composable not defined โ Ensure composables are in
app/composables/, remove manual imports, restart dev server
- Failed to resolve import ~/composables/ โ Move composables to
app/composables/, delete .nuxt/ and restart