cohesion-coupling-review
10
总安装量
4
周安装量
#30666
全站排名
安装命令
npx skills add https://github.com/7spade/black-tortoise --skill cohesion-coupling-review
Agent 安装分布
opencode
4
gemini-cli
4
replit
4
claude-code
4
codex
4
mcpjam
3
Skill 文档
High Cohesion / Low Coupling (Review Skill)
Use when
- A change touches multiple folders/layers/capabilities.
- Youâre tempted to import a file from another capability.
- âSharedâ is being considered for convenience.
Checklist (fast)
- Ownership: which capability/bounded context owns the rule/data?
- Cohesion: is the logic colocated with its change reason?
- Coupling: are dependencies narrow (ports/events) rather than concrete imports?
- Public surface: can exports be reduced to the minimal stable interface?
- Import hygiene: any deep imports into another capability/layer?
- Promotion: does it truly qualify for
shared(2+ contexts, no business policy)?
Smallest fixes (preferred order)
- Move code to the owner (increase cohesion).
- Introduce/adjust a port or event (reduce coupling).
- Narrow exports / add an explicit entry point (stabilize interface).
- Only then consider
shared(if it meets promotion rules).
References
.github/instructions/06-cohesion-coupling-copilot-instructions.md.github/instructions/05-design-principles-copilot-instructions.mdscripts/dependency-cruiser.js