360 Secure SkillHub
360 安全技能中心

nuxt-modules

面向 Nuxt 模块开发,提供 defineNuxtModule 模式、Kit 工具、hooks、E2E 测试、发布流程和 CI/CD 模板;按任务加载开发、测试发布、CI 三份参考文档,覆盖 npm 发布与 GitHub Actions 配置。

onmax
热度 33.01
最近更新 2026-10-19 02:47:29
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码生成 / DevOps / API 集成 / 模板 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add onmax/nuxt-skills/nuxt-modules
Metadata
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

Type Location Use Case
Published npm package @nuxtjs/, nuxt- distribution
Local modules/ dir Project-specific extensions
Inline nuxt.config.ts Simple 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