skills/vue-cohesion-coupling/SKILL.md
Vue组件设计最佳实践 - 快速创建高质量、可维护的Vue组件。包含完整代码示例、反模式避坑指南、组件通信模式、代码审查清单。Use whenever: (1) Creating or modifying Vue components, (2) Deciding component structure and communication patterns, (3) Refactoring messy or tightly-coupled components, (4) Implementing props/events/Vuex communication, (5) Reviewing Vue code for quality issues, (6) Asking 'how should I structure this component?' or 'is this component well-designed?'. Helps avoid common mistakes like over-coupling, mixed responsibilities, and direct component access.
npx skillsauth add caobingsheng/skills vue-cohesion-couplingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
本skill提供Vue.js组件设计中高内聚低耦合的完整指导,帮助创建可维护、可测试、可复用的组件架构。
高内聚:组件内部功能紧密相关,职责单一明确 低耦合:组件之间依赖关系最小化,相互独立
评估组件职责:
设计组件接口:
实现高内聚:
实现低耦合:
$parent、$children访问组件检查高内聚:
检查低耦合:
参见 patterns.md 了解:
参见 examples.md 查看:
参见 best-practices.md 获取:
步骤:
参考:patterns.md 的设计模式部分
步骤:
参考:patterns.md 的组件拆分策略
选择通信方式:
参考:best-practices.md 的组件通信部分
检查要点:
参考:best-practices.md 的代码审查检查清单
$parent、$children访问组件Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
Examples from other skills:
fill_fillable_fields.py, extract_form_field_info.py - utilities for PDF manipulationdocument.py, utilities.py - Python modules for document processingAppropriate for: Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
Note: Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
Examples from other skills:
communication.md, context_building.md - detailed workflow guidesAppropriate for: In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
Files not intended to be loaded into context, but rather used within the output Claude produces.
Examples from other skills:
Appropriate for: Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
Any unneeded directories can be deleted. Not every skill requires all three types of resources.
development
Use when working with tdd workflows tdd refactor
testing
Generate failing tests for the TDD red phase to define expected behavior and edge cases.
development
Implement the minimal code needed to make failing tests pass in the TDD green phase.
tools
Use when working with tdd workflows tdd cycle