Agent skill
Nuxt
Nuxt 3 applications must keep these standards to ensure SSR quality.
Stars
10
Forks
1
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/nuxt
SKILL.md
Nuxt Framework Rules
CRITICAL: Nuxt 3 applications must keep these standards to ensure SSR quality.
Quality Commands
- Lint:
npm run lint - Type check:
npm run type-check - Unit tests:
npm run test - Build for production:
npm run build - Generate static output (if applicable):
npm run generate
Project Structure
- Define routes with file-based routing under
pages/ - Keep server API handlers within
server/api/ - Organize composables in
composables/ - Place reusable UI components in
components/ - Store state via Pinia modules in
stores/
Implementation Guidelines
- Use runtime config via
useRuntimeConfig()for secrets - SSR-safe operations only inside
onServerPrefetch/server routes - Prefer
definePageMetato control page-level features - Maintain i18n messages in
/locales - Cache heavy computations with Nitro storage if needed
Pre-Commit Commands
bash
npm run lint
npm run type-check
npm run test
npm run build
Documentation
- Keep
/docs/nuxt-architecture.mdcurrent with route layout and middleware - Document server API contracts in
/docs/api.md - Capture deployment steps (SSR vs static) in
/docs/deployment.md
Didn't find tool you were looking for?