用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill vue命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | vue |
| description | Use when the project uses Vue.js for building reactive user interfaces |
| metadata | {"author":"calcosmic"} |
Prefer the Composition API (<script setup>) over the Options API for new code. It provides better TypeScript support, more flexible logic reuse through composables, and cleaner component organization. Check which API the existing codebase uses before introducing the other.
Use ref() for primitives and reactive() for objects. Remember that reactive() loses reactivity when destructured -- use toRefs() if you need to destructure. Always access ref values with .value in script, but not in templates.
Avoid replacing an entire reactive() object -- mutate its properties instead. Replacing the reference breaks reactivity tracking.
Extract reusable logic into composables (functions prefixed with use). A composable returns reactive state and methods. Keep composables in a composables/ directory and each in its own file.
Composables must be called at the top level of setup() or <script setup>, never inside conditionals or loops.
Props down, events up. Use defineProps() and defineEmits() in <script setup>. For deeply nested communication, use provide/inject rather than prop drilling.
Never mutate props directly. If a child needs to modify parent data, emit an event.
Use v-show instead of v-if for elements that toggle frequently -- v-show keeps the DOM node and just toggles CSS display. Use v-if for conditional blocks that rarely change.
Add key attributes on v-for lists using stable unique identifiers, never indices for dynamic lists.
Lazy-load route components with dynamic imports: () => import('./views/Heavy.vue').
Keep templates declarative. Complex logic belongs in computed properties, not inline expressions. If a template expression has more than one ternary or logical operator, extract it to a computed.
Use scoped styles (<style scoped>) to prevent CSS leaking between components. Use :deep() only when you genuinely need to style child component internals.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.