用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/arbazkhan971/godmode --skill vue命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | vue |
| description | Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing. |
/godmode:vue, "Vue app", "Vue component"cat package.json 2>/dev/null \
| grep -E '"vue"|"nuxt"|"@vue/"'
cat node_modules/vue/package.json 2>/dev/null \
| grep '"version"'
Vue version: <2.x / 3.x>
Build tool: Vite | Webpack | Nuxt
API style: Composition | Options | Mixed
State: Pinia | Vuex | none
Router: Vue Router | file-based (Nuxt)
CSS: Tailwind | UnoCSS | SCSS | scoped
TypeScript: yes | no
Meta-framework: Nuxt 3 | none
IF starting fresh: "Need SSR? Use Nuxt."
| Factor | Composition API | Options API |
|-------------|-----------------|-------------|
| Vue version | Vue 3 (native) | Vue 2 & 3 |
| TypeScript | Excellent | Requires decorators|
| Logic reuse | Composables | Mixins (fragile)|
| Organization| By feature | By option type|
| Bundle | Tree-shakeable | Full runtime |
| Complex comp| Scales well | Gets unwieldy|
IF new Vue 3 project: Composition API + <script setup>
IF existing Vue 2: keep Options unless migrating
IF mixed codebase: plan migration, don't stay mixed
WHEN team is new to Vue: Options first, then migrate
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import type { User } from '@/types'
const props = defineProps<{ userId: string }>()
const emit = defineEmits<{ save: [user: User] }>()
</script>
Composable rules:
use prefix: useAuth, useCart| Store | Purpose | Persistence |
|--------------|---------------|-------------|
| useAuthStore | Authentication| localStorage |
| useUserStore | User profile | Session only |
| useCartStore | Shopping cart | localStorage |
Rules:
| Path | Component | Guard |
|---------------|-----------|-------------|
| / | Home.vue | none |
| /dashboard | Dashboard | auth-required|
| /admin/* | Admin | admin-only |
| /:pathMatch(*)| NotFound | none |
Rules:
| Route | Strategy | Reason |
|---------------|---------|---------------|
| / | SSG | Static, fast |
| /blog/:slug | ISR 60s | Content, SEO |
| /dashboard | SPA | Auth-gated |
| /products/:id | SSR | Dynamic, SEO |
// nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
'/': { prerender: true },
'/blog/**': { isr: 60 },
'/dashboard/**': { ssr: false },
}
})
Rules:
# Run unit/component tests
npx vitest run
# Run e2e tests
npx playwright test
# Type check
npx vue-tsc --noEmit
Coverage target: >80% statements, >70% branches.
| Check | Status |
|-------------------------------|--------|
| API style consistent | PASS |
| <script setup> used | PASS |
| TypeScript strict | PASS |
| Composables use* convention | PASS |
| Pinia setup syntax | PASS |
| Routes lazy-loaded | PASS |
| Props typed (defineProps<T>) | PASS |
| Emits typed (defineEmits<T>) | PASS |
| No v-html with user input | PASS |
| Every v-for has :key | PASS |
Log to .godmode/vue-results.tsv:
timestamp\taction\tcomponents\tstores\tcomposables\tstatus
Print: Vue: {action}. Components: {N}. Stores: {N}. vue-tsc: {status}. Status: {DONE|PARTIAL}.
KEEP if: vue-tsc passes AND tests pass
AND audit shows no regressions
DISCARD if: type errors OR test failures
OR bundle exceeds budget. Revert immediately.
STOP when:
- All audit checks PASS
- vue-tsc --noEmit exits 0
- vitest run exits 0
- No v-for without :key, no v-html, no mixins