
This covers the full spectrum of Nuxt module development, from scaffolding published npm packages to writing project-local extensions. You get defineNuxtModule patterns, Kit utilities, hook systems, and the runtime/server split that lets modules inject components, composables, plugins, and API routes into user apps. The references include E2E testing setups and copy-paste CI/CD workflows for release automation. It's aimed at developers who need to package reusable Nuxt functionality, whether for public distribution or internal use. The module starter template and playground structure make it straightforward to test your code before publishing, which is honestly the hardest part of getting module development right.
$ npx -y skills add onmax/nuxt-skills --skill nuxt-modules --agent claude-codeInstalls into .claude/skills of the current project.
Guide for creating Nuxt modules that extend framework functionality.
Related skills: nuxt (basics), vue (runtime patterns)
npx nuxi init -t module my-module
cd my-module && npm install
npm run dev # Start playground
npm run dev:build # Build in watch mode
npm run test # Run tests
Consider loading these reference files based on your task:
dependsOn, choosing watcher behavior, or targeting regenerationDO NOT load all files at once. Load only what's relevant to your current task.
| Type | Location | Use Case |
|---|---|---|
| Published | npm package | @nuxtjs/, nuxt- distribution |
| Local | modules/ dir | Project-specific extensions |
| Inline | nuxt.config.ts | Simple one-off hooks |
my-module/
├── src/
│ ├── module.ts # Entry point
│ └── runtime/ # Injected into user's app
│ ├── components/
│ ├── composables/
│ ├── plugins/
│ └── server/
├── playground/ # Dev testing
└── test/fixtures/ # E2E tests
Sponsors