PluginBench
Skill
Pass
Audit score 90

nuxt-modules

onmax/nuxt-skills

Create, test, and publish Nuxt modules with defineNuxtModule patterns, Kit utilities, and CI/CD automation.

What is nuxt-modules?

Skill for building Nuxt modules that extend framework functionality through published npm packages, local project modules, or runtime/server extensions. Use when developing reusable module features, setting up E2E tests, or automating module releases and CI/CD workflows.

  • Define and structure Nuxt modules using defineNuxtModule and Kit utilities
  • Create runtime extensions (components, composables, plugins) injected into user apps
  • Build server extensions (API routes, middleware) for backend functionality
  • Write and run E2E tests for module behavior in fixtures
  • Publish modules to npm with @nuxtjs/ or nuxt- naming conventions
  • Set up CI/CD workflows for automated testing and releases

How to install nuxt-modules

npx skills add https://github.com/onmax/nuxt-skills --skill nuxt-modules
Prerequisites
  • Node.js and npm installed
  • Basic Nuxt and Vue knowledge
  • Understanding of module anatomy and defineNuxtModule pattern
Claude Code
Cursor
Windsurf
Cline

How to use nuxt-modules

  1. 1.Run npx nuxi init -t module my-module to scaffold a new module
  2. 2.Review references/development.md for module structure and Kit utilities
  3. 3.Implement module features in src/module.ts and src/runtime/
  4. 4.Use the playground/ directory to test module functionality locally
  5. 5.Load references/testing-and-publishing.md to write E2E tests
  6. 6.Use references/ci-workflows.md templates to set up automated workflows
  7. 7.Run npm run test to validate module behavior
  8. 8.Publish to npm following best practices from testing-and-publishing.md

Use cases

Good for
  • Building a reusable UI component library as a published Nuxt module
  • Creating a local project module in modules/ directory for app-specific extensions
  • Developing a Nuxt module that adds authentication or API integration features
  • Setting up automated testing and publishing pipelines for module releases
  • Extending Nuxt with custom server middleware or API route handlers
Who it's for
  • Nuxt framework developers
  • Module authors publishing to npm
  • Teams building reusable framework extensions
  • Developers setting up module CI/CD pipelines

nuxt-modules FAQ

What's the difference between published, local, and inline modules?

Published modules are distributed via npm with @nuxtjs/ or nuxt- naming. Local modules live in a project's modules/ directory for project-specific extensions. Inline modules are simple one-off hooks defined directly in nuxt.config.ts.

Where should I put components, composables, and plugins?

Place them in src/runtime/ subdirectories (components/, composables/, plugins/). These are automatically injected into the user's app when the module is installed.

How do I test my module before publishing?

Use the playground/ directory for manual testing and test/fixtures/ for E2E tests. Run npm run dev to start the playground and npm run test to run automated tests.

What CI/CD workflows are available?

The references/ci-workflows.md file provides copy-paste templates for automated testing, linting, and publishing workflows.

Do I need to understand Nuxt Kit?

Yes, Nuxt Kit provides utilities for module development. See references/development.md for Kit utilities and hooks available for your module.

Full instructions (SKILL.md)

Source of truth, from onmax/nuxt-skills.


name: nuxt-modules description: "Use when creating Nuxt modules: (1) Published npm modules (@nuxtjs/, nuxt-), (2) Local project modules (modules/ directory), (3) Runtime extensions (components, composables, plugins), (4) Server extensions (API routes, middleware), (5) Releasing/publishing modules to npm, (6) Setting up CI/CD workflows for modules. Provides defineNuxtModule patterns, Kit utilities, hooks, E2E testing, and release automation." license: MIT

Nuxt Module Development

Guide for creating Nuxt modules that extend framework functionality.

Related skills: nuxt (basics), vue (runtime patterns)

Quick Start

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

Available Guidance

Loading Files

Consider loading these reference files based on your task:

DO NOT load all files at once. Load only what's relevant to your current task.

Module Types

TypeLocationUse Case
Publishednpm package@nuxtjs/, nuxt- distribution
Localmodules/ dirProject-specific extensions
Inlinenuxt.config.tsSimple one-off hooks

Project Structure

my-module/
├── src/
│   ├── module.ts           # Entry point
│   └── runtime/            # Injected into user's app
│       ├── components/
│       ├── composables/
│       ├── plugins/
│       └── server/
├── playground/             # Dev testing
└── test/fixtures/          # E2E tests

Resources