npx skills add https://github.com/onmax/nuxt-skills --skill nuxt针对 Nuxt 4+ 项目 (v4.3+) 的渐进式指南,涵盖最新模式和规范。
适用于以下场景:
根据当前工作内容阅读特定文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
关于 Vue 组合式函数: 请查看 vue 技能的 composables.md(VueUse、组合式 API 模式)
关于 UI 组件: 使用 nuxt-ui 技能
关于数据库/存储: 使用 nuxthub 技能
关于内容驱动型网站: 使用 nuxt-content 技能
关于创建模块: 使用 nuxt-modules 技能
关于项目脚手架/CI: 使用 ts-library 技能
请根据你的任务考虑加载以下参考文件:
请勿一次性加载所有文件。 仅加载与当前任务相关的内容。
// server/api/hello.get.ts
import { z } from 'zod'
export default defineEventHandler(async (event) => {
const { name } = await getValidatedQuery(event, z.object({
name: z.string().default('world'),
}).parse)
return { message: `Hello ${name}` }
})
你正在使用 Nuxt 4+。 主要区别如下:
| 旧版本 (Nuxt 2/3) | 新版本 (Nuxt 4) |
|---|---|
<Nuxt /> | <NuxtPage /> |
context.params | getRouterParam(event, 'name') |
window.origin | useRequestURL().origin |
| 字符串路由 | 带有路由名称的类型化路由器 |
| 独立的布局/ | 使用 <slot> 的父级路由 |
如果你不确定 Nuxt 4 的模式,请先阅读相关的指南文件。
何时获取最新文档:
官方资源:
主技能:约 300 令牌。每个子文件:约 800-1500 令牌。请仅加载与当前任务相关的文件。
每周安装量
3.4K
仓库
GitHub 星标
606
首次出现
2026年1月19日
安全审计
安装于
claude-code2.4K
opencode1.5K
gemini-cli1.5K
github-copilot1.4K
codex1.4K
cursor1.3K
Progressive guidance for Nuxt 4+ projects (v4.3+) with latest patterns and conventions.
Working with:
Read specific files based on current work:
For Vue composables: See vue skill composables.md (VueUse, Composition API patterns) For UI components: use nuxt-ui skill For database/storage: use nuxthub skill For content-driven sites: use nuxt-content skill For creating modules: use nuxt-modules skill For project scaffolding/CI: use ts-library skill
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.
// server/api/hello.get.ts
import { z } from 'zod'
export default defineEventHandler(async (event) => {
const { name } = await getValidatedQuery(event, z.object({
name: z.string().default('world'),
}).parse)
return { message: `Hello ${name}` }
})
You are working with Nuxt 4+. Key differences:
| Old (Nuxt 2/3) | New (Nuxt 4) |
|---|---|
<Nuxt /> | <NuxtPage /> |
context.params | getRouterParam(event, 'name') |
window.origin | useRequestURL().origin |
| String routes | Typed router with route names |
| Separate layouts/ | Parent routes with <slot> |
If you're unsure about Nuxt 4 patterns, read the relevant guidance file first.
When to fetch latest docs:
Official sources:
Main skill: ~300 tokens. Each sub-file: ~800-1500 tokens. Only load files relevant to current task.
Weekly Installs
3.4K
Repository
GitHub Stars
606
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code2.4K
opencode1.5K
gemini-cli1.5K
github-copilot1.4K
codex1.4K
cursor1.3K
99,500 周安装