← 返回 Skills 市场
Nuxt Project Standard
作者
Bovin Phang
· GitHub ↗
· v2.4.0
· MIT-0
48
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fec-nuxt-project-standard
功能描述
Use when creating or reviewing Nuxt 3 projects, file routes, pages, layouts, SSR/SSG/SPA behavior, Nuxt data fetching, route middleware, plugins, modules, se...
使用说明 (SKILL.md)
Nuxt 3 项目规范
适用于使用 Nuxt 3 + Vue 3 + TypeScript 的仓库。
Purpose
规范 Nuxt 3 项目中 SSR/SSG 渲染模式、组合式 API、自动导入、数据获取、路由中间件和模块插件的工程实践,确保约定式开发和类型安全。
Procedure
- 先识别目标属于 Nuxt pages/layouts、渲染模式、数据获取、route middleware、plugin/module 还是 server route。
- 明确 SSR / SSG / SPA 选择,避免服务端可执行代码依赖
window或document。 - 数据获取优先使用 Nuxt 的
useFetch/useAsyncData,并检查水合一致性。 - 路由鉴权、redirect 和权限问题与路由保护 workflow 对齐。
- 通用 Vue 组件架构问题分流到 Vue 项目 workflow。
项目结构
├── app.vue # 根组件
├── nuxt.config.ts # Nuxt 配置
│
├── pages/ # 基于文件的路由
│ ├── index.vue # /
│ ├── login.vue # /login
│ ├── dashboard/
│ │ ├── index.vue # /dashboard
│ │ └── users/
│ │ ├── index.vue # /dashboard/users
│ │ └── [id].vue # /dashboard/users/:id
│ └── [...slug].vue # 捕获所有
│
├── layouts/ # 布局
│ ├── default.vue
│ └── auth.vue
│
├── components/ # 自动导入组件
│ ├── Button/
│ │ └── Button.vue
│ └── AppHeader.vue
│
├── composables/ # 组合式函数(自动导入)
│ ├── useAuth.ts
│ └── useFetch.ts
│
├── server/ # 服务端 API
│ ├── api/ # API 路由
│ │ └── users/
│ │ └── index.get.ts
│ ├── middleware/ # 服务端中间件
│ └── utils/ # 服务端工具
│
├── plugins/ # 插件
│ └── i18n.client.ts
│
├── middleware/ # 路由中间件
│ └── auth.ts
│
├── public/ # 静态资源
├── assets/ # 需构建的资源
└── types/ # 类型定义
渲染模式
| 模式 | 配置 | 说明 |
|---|---|---|
| SSR | 默认 | ssr: true |
| SSG | nuxt generate |
预渲染所有页面 |
| SPA | ssr: false |
纯客户端渲染 |
// nuxt.config.ts
export default defineNuxtConfig({
ssr: true, // 或 false
});
数据获取
useFetch/useAsyncData:服务端 + 客户端,自动去重$fetch:直接请求,适合服务端或一次性调用useLazyAsyncData:不阻塞导航,适合非首屏- 避免在
setup顶层混用同步/异步逻辑导致水合不匹配
路由与布局
pages/下文件自动生成路由- 动态路由:
[id].vue、[...slug].vue - 布局:
layout选项或layouts/default.vue默认 - 嵌套路由:
pages/parent/child.vue需配合NuxtPage
中间件
middleware/下文件自动注册- 页面级:
definePageMeta({ middleware: ['auth'] }) - 全局:
nuxt.config.ts的router.middleware - 服务端中间件:
server/middleware/
插件与模块
- 插件:
plugins/*.ts,支持.client、.server后缀 - 模块:
modules/或node_modules,在nuxt.config中modules: []
Constraints
- 服务端可访问的代码不要依赖
window、document - 使用
useState共享状态时注意 SSR 序列化 - 图片使用
NuxtImg,链接使用NuxtLink - 避免在
setup顶层使用await导致阻塞,优先用useAsyncData/useFetch
Expected Output
- 页面按
pages/约定式路由组织,动态路由正确配置 - 渲染模式(SSR/SSG/SPA)选择正确,
nuxt.config.ts配置清晰 - 数据获取使用
useFetch/useAsyncData,自动去重和水合 - Composables 和组件自动导入正确,服务端/客户端边界清晰
安全使用建议
Install only if you want these ClawHub-specific maintenance workflows. Review the autoreview helper's default full-access mode and use --no-yolo if you do not want nested review tools to run outside normal sandbox prompts; use moderation and GitHub publishing commands only with the intended account and after checking targets and reasons.
能力评估
Purpose & Capability
The skills describe ClawHub maintenance, UI proof, moderation, autoreview, and Convex workflows; the commands and data access they request fit those stated purposes.
Instruction Scope
Several workflows can run impactful commands, including GitHub CLI operations, Convex deployment or insight commands, UI proof publishing, and ClawHub moderation actions, but the artifacts scope them to explicit tasks and include confirmation or verification guidance for sensitive writes.
Install Mechanism
No hidden installer, postinstall hook, obfuscated bootstrap, or automatic execution path was observed; artifacts are skill markdown, references, icons, agent metadata, and one Bash helper for autoreview.
Credentials
The requested environment access is broad in places, especially the autoreview helper's default full-access nested review mode and use of existing local auth tokens, but this is disclosed and tied to repo maintenance workflows.
Persistence & Privilege
No background persistence, credential harvesting, startup modification, or privilege escalation behavior was found; persisted outputs are expected artifacts such as proof files, review output, comments, or audited moderation changes.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install fec-nuxt-project-standard - 安装完成后,直接呼叫该 Skill 的名称或使用
/fec-nuxt-project-standard触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.4.0
- Renamed the skill to "fec-nuxt-project-standard" and updated the description for broader workflow alignment.
- Added new documentation and metadata files: LICENSE, README.md, metadata.json, and package.json.
- Removed redundant documentation file (skill-card.md).
- Clarified the skill’s purpose, procedure, and constraints for Nuxt 3 projects.
- Enhanced instructions around identifying Nuxt-specific concerns vs. generic Vue issues.
- No changes to core Nuxt conventions or project structure.
元数据
常见问题
Nuxt Project Standard 是什么?
Use when creating or reviewing Nuxt 3 projects, file routes, pages, layouts, SSR/SSG/SPA behavior, Nuxt data fetching, route middleware, plugins, modules, se... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 48 次。
如何安装 Nuxt Project Standard?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install fec-nuxt-project-standard」即可一键安装,无需额外配置。
Nuxt Project Standard 是免费的吗?
是的,Nuxt Project Standard 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Nuxt Project Standard 支持哪些平台?
Nuxt Project Standard 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Nuxt Project Standard?
由 Bovin Phang(@bovinphang)开发并维护,当前版本 v2.4.0。
推荐 Skills