Co-Pilot / 辅助式
更新于 a month ago

vue-best-practices

Hhyf0
0.5k
hyf0/vue-skills/skills/vue-best-practices
82
Agent 评分

💡 摘要

一个用于在Vue 3和TypeScript中应用最佳实践以增强组件开发的技能。

🎯 适合人群

Vue开发者TypeScript爱好者前端工程师代码审查者软件架构师

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析低风险

风险:Low。建议检查:是否发起外网请求(SSRF/数据外发)。以最小权限运行,并在生产环境启用前审计代码与依赖。


name: vue-best-practices description: Vue 3 and Vue.js best practices for TypeScript, vue-tsc, and Volar. This skill should be used when writing, reviewing, or refactoring Vue components to ensure correct typing patterns. Triggers on tasks involving Vue components, props extraction, wrapper components, template type checking, or Volar configuration. license: MIT metadata: author: hyf0 version: "8.0.0"

Capability Rules

| Rule | Keywords | Description | |------|----------|-------------| | extract-component-props | get props type, wrapper component, extend props, inherit props, ComponentProps | Extract types from .vue components | | vue-tsc-strict-templates | undefined component, template error, strictTemplates | Catch undefined components in templates | | fallthrough-attributes | fallthrough, $attrs, wrapper component | Type-check fallthrough attributes | | strict-css-modules | css modules, $style, typo | Catch CSS module class typos | | data-attributes-config | data-, strictTemplates, attribute | Allow data- attributes | | volar-3-breaking-changes | volar, vue-language-server, editor | Fix Volar 3.0 upgrade issues | | module-resolution-bundler | cannot find module, @vue/tsconfig, moduleResolution | Fix module resolution errors | | define-model-update-event | defineModel, update event, undefined | Fix model update errors | | with-defaults-union-types | withDefaults, union type, default | Fix union type defaults | | deep-watch-numeric | watch, deep, array, Vue 3.5 | Efficient array watching | | vue-directive-comments | @vue-ignore, @vue-skip, template | Control template type checking | | vue-router-typed-params | route params, typed router, unplugin | Fix route params typing |

Efficiency Rules

| Rule | Keywords | Description | |------|----------|-------------| | hmr-vue-ssr | hmr, ssr, hot reload | Fix HMR in SSR apps | | pinia-store-mocking | pinia, mock, vitest, store | Mock Pinia stores |

Reference

五维分析
清晰度8/10
创新性7/10
实用性9/10
完整性8/10
可维护性9/10
优缺点分析

优点

  • 提高代码质量
  • 增强类型安全
  • 促进更好的组件设计
  • 支持现代Vue特性

缺点

  • 新用户可能需要学习曲线
  • 在简单项目中可能引入复杂性
  • 依赖特定工具
  • 可能无法涵盖所有边缘情况

相关技能

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 hyf0.